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
| @@ -286,7 +286,7 @@ func (x *AppInfoIface) OverrideLaunch(cb func(AppInfo, *glib.List, *AppLaunchCon | |||
| 286 | 286 | if cb == nil { | |
| 287 | 287 | x.xLaunch = 0 | |
| 288 | 288 | } else { | |
| 289 | - | x.xLaunch = purego.NewCallback(func(AppinfoVarp uintptr, FilesVarp *glib.List, ContextVarp uintptr) bool { | |
| 289 | + | x.xLaunch = purego.NewCallback(func(AppinfoVarp uintptr, FilesVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool { | |
| 290 | 290 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, FilesVarp, AppLaunchContextNewFromInternalPtr(ContextVarp)) | |
| 291 | 291 | }) | |
| 292 | 292 | } | |
| @@ -298,10 +298,11 @@ func (x *AppInfoIface) GetLaunch() func(AppInfo, *glib.List, *AppLaunchContext) | |||
| 298 | 298 | if x.xLaunch == 0 { | |
| 299 | 299 | return nil | |
| 300 | 300 | } | |
| 301 | - | var rawCallback func(AppinfoVarp uintptr, FilesVarp *glib.List, ContextVarp uintptr) bool | |
| 301 | + | var rawCallback func(AppinfoVarp uintptr, FilesVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool | |
| 302 | 302 | purego.RegisterFunc(&rawCallback, x.xLaunch) | |
| 303 | 303 | return func(AppinfoVar AppInfo, FilesVar *glib.List, ContextVar *AppLaunchContext) bool { | |
| 304 | - | return rawCallback(AppinfoVar.GoPointer(), FilesVar, ContextVar.GoPointer()) | |
| 304 | + | var cerr *glib.Error | |
| 305 | + | return rawCallback(AppinfoVar.GoPointer(), FilesVar, ContextVar.GoPointer(), &cerr) | |
| 305 | 306 | } | |
| 306 | 307 | } | |
| 307 | 308 | ||
| @@ -369,7 +370,7 @@ func (x *AppInfoIface) OverrideLaunchUris(cb func(AppInfo, *glib.List, *AppLaunc | |||
| 369 | 370 | if cb == nil { | |
| 370 | 371 | x.xLaunchUris = 0 | |
| 371 | 372 | } else { | |
| 372 | - | x.xLaunchUris = purego.NewCallback(func(AppinfoVarp uintptr, UrisVarp *glib.List, ContextVarp uintptr) bool { | |
| 373 | + | x.xLaunchUris = purego.NewCallback(func(AppinfoVarp uintptr, UrisVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool { | |
| 373 | 374 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, UrisVarp, AppLaunchContextNewFromInternalPtr(ContextVarp)) | |
| 374 | 375 | }) | |
| 375 | 376 | } | |
| @@ -381,10 +382,11 @@ func (x *AppInfoIface) GetLaunchUris() func(AppInfo, *glib.List, *AppLaunchConte | |||
| 381 | 382 | if x.xLaunchUris == 0 { | |
| 382 | 383 | return nil | |
| 383 | 384 | } | |
| 384 | - | var rawCallback func(AppinfoVarp uintptr, UrisVarp *glib.List, ContextVarp uintptr) bool | |
| 385 | + | var rawCallback func(AppinfoVarp uintptr, UrisVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool | |
| 385 | 386 | purego.RegisterFunc(&rawCallback, x.xLaunchUris) | |
| 386 | 387 | return func(AppinfoVar AppInfo, UrisVar *glib.List, ContextVar *AppLaunchContext) bool { | |
| 387 | - | return rawCallback(AppinfoVar.GoPointer(), UrisVar, ContextVar.GoPointer()) | |
| 388 | + | var cerr *glib.Error | |
| 389 | + | return rawCallback(AppinfoVar.GoPointer(), UrisVar, ContextVar.GoPointer(), &cerr) | |
| 388 | 390 | } | |
| 389 | 391 | } | |
| 390 | 392 | ||
| @@ -427,7 +429,7 @@ func (x *AppInfoIface) OverrideSetAsDefaultForType(cb func(AppInfo, string) bool | |||
| 427 | 429 | if cb == nil { | |
| 428 | 430 | x.xSetAsDefaultForType = 0 | |
| 429 | 431 | } else { | |
| 430 | - | x.xSetAsDefaultForType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string) bool { | |
| 432 | + | x.xSetAsDefaultForType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |
| 431 | 433 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | |
| 432 | 434 | }) | |
| 433 | 435 | } | |
| @@ -441,10 +443,11 @@ func (x *AppInfoIface) GetSetAsDefaultForType() func(AppInfo, string) bool { | |||
| 441 | 443 | if x.xSetAsDefaultForType == 0 { | |
| 442 | 444 | return nil | |
| 443 | 445 | } | |
| 444 | - | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string) bool | |
| 446 | + | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool | |
| 445 | 447 | purego.RegisterFunc(&rawCallback, x.xSetAsDefaultForType) | |
| 446 | 448 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | |
| 447 | - | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar) | |
| 449 | + | var cerr *glib.Error | |
| 450 | + | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar, &cerr) | |
| 448 | 451 | } | |
| 449 | 452 | } | |
| 450 | 453 | ||
| @@ -456,7 +459,7 @@ func (x *AppInfoIface) OverrideSetAsDefaultForExtension(cb func(AppInfo, string) | |||
| 456 | 459 | if cb == nil { | |
| 457 | 460 | x.xSetAsDefaultForExtension = 0 | |
| 458 | 461 | } else { | |
| 459 | - | x.xSetAsDefaultForExtension = purego.NewCallback(func(AppinfoVarp uintptr, ExtensionVarp string) bool { | |
| 462 | + | x.xSetAsDefaultForExtension = purego.NewCallback(func(AppinfoVarp uintptr, ExtensionVarp string, cerrp **glib.Error) bool { | |
| 460 | 463 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ExtensionVarp) | |
| 461 | 464 | }) | |
| 462 | 465 | } | |
| @@ -470,10 +473,11 @@ func (x *AppInfoIface) GetSetAsDefaultForExtension() func(AppInfo, string) bool | |||
| 470 | 473 | if x.xSetAsDefaultForExtension == 0 { | |
| 471 | 474 | return nil | |
| 472 | 475 | } | |
| 473 | - | var rawCallback func(AppinfoVarp uintptr, ExtensionVarp string) bool | |
| 476 | + | var rawCallback func(AppinfoVarp uintptr, ExtensionVarp string, cerrp **glib.Error) bool | |
| 474 | 477 | purego.RegisterFunc(&rawCallback, x.xSetAsDefaultForExtension) | |
| 475 | 478 | return func(AppinfoVar AppInfo, ExtensionVar string) bool { | |
| 476 | - | return rawCallback(AppinfoVar.GoPointer(), ExtensionVar) | |
| 479 | + | var cerr *glib.Error | |
| 480 | + | return rawCallback(AppinfoVar.GoPointer(), ExtensionVar, &cerr) | |
| 477 | 481 | } | |
| 478 | 482 | } | |
| 479 | 483 | ||
| @@ -485,7 +489,7 @@ func (x *AppInfoIface) OverrideAddSupportsType(cb func(AppInfo, string) bool) { | |||
| 485 | 489 | if cb == nil { | |
| 486 | 490 | x.xAddSupportsType = 0 | |
| 487 | 491 | } else { | |
| 488 | - | x.xAddSupportsType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string) bool { | |
| 492 | + | x.xAddSupportsType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |
| 489 | 493 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | |
| 490 | 494 | }) | |
| 491 | 495 | } | |
| @@ -499,10 +503,11 @@ func (x *AppInfoIface) GetAddSupportsType() func(AppInfo, string) bool { | |||
| 499 | 503 | if x.xAddSupportsType == 0 { | |
| 500 | 504 | return nil | |
| 501 | 505 | } | |
| 502 | - | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string) bool | |
| 506 | + | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool | |
| 503 | 507 | purego.RegisterFunc(&rawCallback, x.xAddSupportsType) | |
| 504 | 508 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | |
| 505 | - | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar) | |
| 509 | + | var cerr *glib.Error | |
| 510 | + | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar, &cerr) | |
| 506 | 511 | } | |
| 507 | 512 | } | |
| 508 | 513 | ||
| @@ -543,7 +548,7 @@ func (x *AppInfoIface) OverrideRemoveSupportsType(cb func(AppInfo, string) bool) | |||
| 543 | 548 | if cb == nil { | |
| 544 | 549 | x.xRemoveSupportsType = 0 | |
| 545 | 550 | } else { | |
| 546 | - | x.xRemoveSupportsType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string) bool { | |
| 551 | + | x.xRemoveSupportsType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |
| 547 | 552 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | |
| 548 | 553 | }) | |
| 549 | 554 | } | |
| @@ -557,10 +562,11 @@ func (x *AppInfoIface) GetRemoveSupportsType() func(AppInfo, string) bool { | |||
| 557 | 562 | if x.xRemoveSupportsType == 0 { | |
| 558 | 563 | return nil | |
| 559 | 564 | } | |
| 560 | - | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string) bool | |
| 565 | + | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool | |
| 561 | 566 | purego.RegisterFunc(&rawCallback, x.xRemoveSupportsType) | |
| 562 | 567 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | |
| 563 | - | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar) | |
| 568 | + | var cerr *glib.Error | |
| 569 | + | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar, &cerr) | |
| 564 | 570 | } | |
| 565 | 571 | } | |
| 566 | 572 | ||
| @@ -680,7 +686,7 @@ func (x *AppInfoIface) OverrideSetAsLastUsedForType(cb func(AppInfo, string) boo | |||
| 680 | 686 | if cb == nil { | |
| 681 | 687 | x.xSetAsLastUsedForType = 0 | |
| 682 | 688 | } else { | |
| 683 | - | x.xSetAsLastUsedForType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string) bool { | |
| 689 | + | x.xSetAsLastUsedForType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |
| 684 | 690 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | |
| 685 | 691 | }) | |
| 686 | 692 | } | |
| @@ -694,10 +700,11 @@ func (x *AppInfoIface) GetSetAsLastUsedForType() func(AppInfo, string) bool { | |||
| 694 | 700 | if x.xSetAsLastUsedForType == 0 { | |
| 695 | 701 | return nil | |
| 696 | 702 | } | |
| 697 | - | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string) bool | |
| 703 | + | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool | |
| 698 | 704 | purego.RegisterFunc(&rawCallback, x.xSetAsLastUsedForType) | |
| 699 | 705 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | |
| 700 | - | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar) | |
| 706 | + | var cerr *glib.Error | |
| 707 | + | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar, &cerr) | |
| 701 | 708 | } | |
| 702 | 709 | } | |
| 703 | 710 | ||
| @@ -767,7 +774,7 @@ func (x *AppInfoIface) OverrideLaunchUrisFinish(cb func(AppInfo, AsyncResult) bo | |||
| 767 | 774 | if cb == nil { | |
| 768 | 775 | x.xLaunchUrisFinish = 0 | |
| 769 | 776 | } else { | |
| 770 | - | x.xLaunchUrisFinish = purego.NewCallback(func(AppinfoVarp uintptr, ResultVarp uintptr) bool { | |
| 777 | + | x.xLaunchUrisFinish = purego.NewCallback(func(AppinfoVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool { | |
| 771 | 778 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, &AsyncResultBase{Ptr: ResultVarp}) | |
| 772 | 779 | }) | |
| 773 | 780 | } | |
| @@ -781,10 +788,11 @@ func (x *AppInfoIface) GetLaunchUrisFinish() func(AppInfo, AsyncResult) bool { | |||
| 781 | 788 | if x.xLaunchUrisFinish == 0 { | |
| 782 | 789 | return nil | |
| 783 | 790 | } | |
| 784 | - | var rawCallback func(AppinfoVarp uintptr, ResultVarp uintptr) bool | |
| 791 | + | var rawCallback func(AppinfoVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool | |
| 785 | 792 | purego.RegisterFunc(&rawCallback, x.xLaunchUrisFinish) | |
| 786 | 793 | return func(AppinfoVar AppInfo, ResultVar AsyncResult) bool { | |
| 787 | - | return rawCallback(AppinfoVar.GoPointer(), ResultVar.GoPointer()) | |
| 794 | + | var cerr *glib.Error | |
| 795 | + | return rawCallback(AppinfoVar.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| 788 | 796 | } | |
| 789 | 797 | } | |
| 790 | 798 | ||
| @@ -1112,6 +1120,7 @@ type AppInfo interface { | |||
| 1112 | 1120 | var xAppInfoGLibType func() types.GType | |
| 1113 | 1121 | ||
| 1114 | 1122 | func AppInfoGLibType() types.GType { | |
| 1123 | + | core.LazyRegister(&xAppInfoGLibType, "GIO", "g_app_info_get_type", false) | |
| 1115 | 1124 | return xAppInfoGLibType() | |
| 1116 | 1125 | } | |
| 1117 | 1126 | ||
| @@ -1409,33 +1418,180 @@ func (x *AppInfoBase) SupportsUris() bool { | |||
| 1409 | 1418 | return cret | |
| 1410 | 1419 | } | |
| 1411 | 1420 | ||
| 1421 | + | var XGAppInfoAddSupportsType func(uintptr, string, **glib.Error) bool = func(instance uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |
| 1422 | + | core.LazyRegister(&xXGAppInfoAddSupportsType, "GIO", "g_app_info_add_supports_type", false) | |
| 1423 | + | return xXGAppInfoAddSupportsType(instance, ContentTypeVarp, cerrp) | |
| 1424 | + | } | |
| 1425 | + | ||
| 1426 | + | var ( | |
| 1427 | + | xXGAppInfoAddSupportsType func(uintptr, string, **glib.Error) bool | |
| 1428 | + | XGAppInfoCanDelete func(uintptr) bool = func(instance uintptr) bool { | |
| 1429 | + | core.LazyRegister(&xXGAppInfoCanDelete, "GIO", "g_app_info_can_delete", false) | |
| 1430 | + | return xXGAppInfoCanDelete(instance) | |
| 1431 | + | } | |
| 1432 | + | ) | |
| 1433 | + | var ( | |
| 1434 | + | xXGAppInfoCanDelete func(uintptr) bool | |
| 1435 | + | XGAppInfoCanRemoveSupportsType func(uintptr) bool = func(instance uintptr) bool { | |
| 1436 | + | core.LazyRegister(&xXGAppInfoCanRemoveSupportsType, "GIO", "g_app_info_can_remove_supports_type", false) | |
| 1437 | + | return xXGAppInfoCanRemoveSupportsType(instance) | |
| 1438 | + | } | |
| 1439 | + | ) | |
| 1440 | + | var ( | |
| 1441 | + | xXGAppInfoCanRemoveSupportsType func(uintptr) bool | |
| 1442 | + | XGAppInfoDelete func(uintptr) bool = func(instance uintptr) bool { | |
| 1443 | + | core.LazyRegister(&xXGAppInfoDelete, "GIO", "g_app_info_delete", false) | |
| 1444 | + | return xXGAppInfoDelete(instance) | |
| 1445 | + | } | |
| 1446 | + | ) | |
| 1447 | + | var ( | |
| 1448 | + | xXGAppInfoDelete func(uintptr) bool | |
| 1449 | + | XGAppInfoDup func(uintptr) uintptr = func(instance uintptr) uintptr { | |
| 1450 | + | core.LazyRegister(&xXGAppInfoDup, "GIO", "g_app_info_dup", false) | |
| 1451 | + | return xXGAppInfoDup(instance) | |
| 1452 | + | } | |
| 1453 | + | ) | |
| 1454 | + | var ( | |
| 1455 | + | xXGAppInfoDup func(uintptr) uintptr | |
| 1456 | + | XGAppInfoEqual func(uintptr, uintptr) bool = func(instance uintptr, Appinfo2Varp uintptr) bool { | |
| 1457 | + | core.LazyRegister(&xXGAppInfoEqual, "GIO", "g_app_info_equal", false) | |
| 1458 | + | return xXGAppInfoEqual(instance, Appinfo2Varp) | |
| 1459 | + | } | |
| 1460 | + | ) | |
| 1461 | + | var ( | |
| 1462 | + | xXGAppInfoEqual func(uintptr, uintptr) bool | |
| 1463 | + | XGAppInfoGetCommandline func(uintptr) string = func(instance uintptr) string { | |
| 1464 | + | core.LazyRegister(&xXGAppInfoGetCommandline, "GIO", "g_app_info_get_commandline", false) | |
| 1465 | + | return xXGAppInfoGetCommandline(instance) | |
| 1466 | + | } | |
| 1467 | + | ) | |
| 1468 | + | var ( | |
| 1469 | + | xXGAppInfoGetCommandline func(uintptr) string | |
| 1470 | + | XGAppInfoGetDescription func(uintptr) string = func(instance uintptr) string { | |
| 1471 | + | core.LazyRegister(&xXGAppInfoGetDescription, "GIO", "g_app_info_get_description", false) | |
| 1472 | + | return xXGAppInfoGetDescription(instance) | |
| 1473 | + | } | |
| 1474 | + | ) | |
| 1475 | + | var ( | |
| 1476 | + | xXGAppInfoGetDescription func(uintptr) string | |
| 1477 | + | XGAppInfoGetDisplayName func(uintptr) string = func(instance uintptr) string { | |
| 1478 | + | core.LazyRegister(&xXGAppInfoGetDisplayName, "GIO", "g_app_info_get_display_name", false) | |
| 1479 | + | return xXGAppInfoGetDisplayName(instance) | |
| 1480 | + | } | |
| 1481 | + | ) | |
| 1482 | + | var ( | |
| 1483 | + | xXGAppInfoGetDisplayName func(uintptr) string | |
| 1484 | + | XGAppInfoGetExecutable func(uintptr) string = func(instance uintptr) string { | |
| 1485 | + | core.LazyRegister(&xXGAppInfoGetExecutable, "GIO", "g_app_info_get_executable", false) | |
| 1486 | + | return xXGAppInfoGetExecutable(instance) | |
| 1487 | + | } | |
| 1488 | + | ) | |
| 1489 | + | var ( | |
| 1490 | + | xXGAppInfoGetExecutable func(uintptr) string | |
| 1491 | + | XGAppInfoGetIcon func(uintptr) uintptr = func(instance uintptr) uintptr { | |
| 1492 | + | core.LazyRegister(&xXGAppInfoGetIcon, "GIO", "g_app_info_get_icon", false) | |
| 1493 | + | return xXGAppInfoGetIcon(instance) | |
| 1494 | + | } | |
| 1495 | + | ) | |
| 1496 | + | var ( | |
| 1497 | + | xXGAppInfoGetIcon func(uintptr) uintptr | |
| 1498 | + | XGAppInfoGetId func(uintptr) string = func(instance uintptr) string { | |
| 1499 | + | core.LazyRegister(&xXGAppInfoGetId, "GIO", "g_app_info_get_id", false) | |
| 1500 | + | return xXGAppInfoGetId(instance) | |
| 1501 | + | } | |
| 1502 | + | ) | |
| 1503 | + | var ( | |
| 1504 | + | xXGAppInfoGetId func(uintptr) string | |
| 1505 | + | XGAppInfoGetName func(uintptr) string = func(instance uintptr) string { | |
| 1506 | + | core.LazyRegister(&xXGAppInfoGetName, "GIO", "g_app_info_get_name", false) | |
| 1507 | + | return xXGAppInfoGetName(instance) | |
| 1508 | + | } | |
| 1509 | + | ) | |
| 1412 | 1510 | var ( | |
| 1413 | - | XGAppInfoAddSupportsType func(uintptr, string, **glib.Error) bool | |
| 1414 | - | XGAppInfoCanDelete func(uintptr) bool | |
| 1415 | - | XGAppInfoCanRemoveSupportsType func(uintptr) bool | |
| 1416 | - | XGAppInfoDelete func(uintptr) bool | |
| 1417 | - | XGAppInfoDup func(uintptr) uintptr | |
| 1418 | - | XGAppInfoEqual func(uintptr, uintptr) bool | |
| 1419 | - | XGAppInfoGetCommandline func(uintptr) string | |
| 1420 | - | XGAppInfoGetDescription func(uintptr) string | |
| 1421 | - | XGAppInfoGetDisplayName func(uintptr) string | |
| 1422 | - | XGAppInfoGetExecutable func(uintptr) string | |
| 1423 | - | XGAppInfoGetIcon func(uintptr) uintptr | |
| 1424 | - | XGAppInfoGetId func(uintptr) string | |
| 1425 | - | XGAppInfoGetName func(uintptr) string | |
| 1426 | - | XGAppInfoGetSupportedTypes func(uintptr) []string | |
| 1427 | - | XGAppInfoLaunch func(uintptr, *glib.List, uintptr, **glib.Error) bool | |
| 1428 | - | XGAppInfoLaunchUris func(uintptr, *glib.List, uintptr, **glib.Error) bool | |
| 1429 | - | XGAppInfoLaunchUrisAsync func(uintptr, *glib.List, uintptr, uintptr, uintptr, uintptr) | |
| 1430 | - | XGAppInfoLaunchUrisFinish func(uintptr, uintptr, **glib.Error) bool | |
| 1431 | - | XGAppInfoRemoveSupportsType func(uintptr, string, **glib.Error) bool | |
| 1432 | - | XGAppInfoSetAsDefaultForExtension func(uintptr, string, **glib.Error) bool | |
| 1433 | - | XGAppInfoSetAsDefaultForType func(uintptr, string, **glib.Error) bool | |
| 1434 | - | XGAppInfoSetAsLastUsedForType func(uintptr, string, **glib.Error) bool | |
| 1435 | - | XGAppInfoShouldShow func(uintptr) bool | |
| 1436 | - | XGAppInfoSupportsFiles func(uintptr) bool | |
| 1437 | - | XGAppInfoSupportsUris func(uintptr) bool | |
| 1511 | + | xXGAppInfoGetName func(uintptr) string | |
| 1512 | + | XGAppInfoGetSupportedTypes func(uintptr) []string = func(instance uintptr) []string { | |
| 1513 | + | core.LazyRegister(&xXGAppInfoGetSupportedTypes, "GIO", "g_app_info_get_supported_types", false) | |
| 1514 | + | return xXGAppInfoGetSupportedTypes(instance) | |
| 1515 | + | } | |
| 1438 | 1516 | ) | |
| 1517 | + | var ( | |
| 1518 | + | xXGAppInfoGetSupportedTypes func(uintptr) []string | |
| 1519 | + | XGAppInfoLaunch func(uintptr, *glib.List, uintptr, **glib.Error) bool = func(instance uintptr, FilesVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool { | |
| 1520 | + | core.LazyRegister(&xXGAppInfoLaunch, "GIO", "g_app_info_launch", false) | |
| 1521 | + | return xXGAppInfoLaunch(instance, FilesVarp, ContextVarp, cerrp) | |
| 1522 | + | } | |
| 1523 | + | ) | |
| 1524 | + | var ( | |
| 1525 | + | xXGAppInfoLaunch func(uintptr, *glib.List, uintptr, **glib.Error) bool | |
| 1526 | + | XGAppInfoLaunchUris func(uintptr, *glib.List, uintptr, **glib.Error) bool = func(instance uintptr, UrisVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool { | |
| 1527 | + | core.LazyRegister(&xXGAppInfoLaunchUris, "GIO", "g_app_info_launch_uris", false) | |
| 1528 | + | return xXGAppInfoLaunchUris(instance, UrisVarp, ContextVarp, cerrp) | |
| 1529 | + | } | |
| 1530 | + | ) | |
| 1531 | + | var ( | |
| 1532 | + | xXGAppInfoLaunchUris func(uintptr, *glib.List, uintptr, **glib.Error) bool | |
| 1533 | + | XGAppInfoLaunchUrisAsync func(uintptr, *glib.List, uintptr, uintptr, uintptr, uintptr) = func(instance uintptr, UrisVarp *glib.List, ContextVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) { | |
| 1534 | + | core.LazyRegister(&xXGAppInfoLaunchUrisAsync, "GIO", "g_app_info_launch_uris_async", false) | |
| 1535 | + | xXGAppInfoLaunchUrisAsync(instance, UrisVarp, ContextVarp, CancellableVarp, CallbackVarp, UserDataVarp) | |
| 1536 | + | } | |
| 1537 | + | ) | |
| 1538 | + | var ( | |
| 1539 | + | xXGAppInfoLaunchUrisAsync func(uintptr, *glib.List, uintptr, uintptr, uintptr, uintptr) | |
| 1540 | + | XGAppInfoLaunchUrisFinish func(uintptr, uintptr, **glib.Error) bool = func(instance uintptr, ResultVarp uintptr, cerrp **glib.Error) bool { | |
| 1541 | + | core.LazyRegister(&xXGAppInfoLaunchUrisFinish, "GIO", "g_app_info_launch_uris_finish", false) | |
| 1542 | + | return xXGAppInfoLaunchUrisFinish(instance, ResultVarp, cerrp) | |
| 1543 | + | } | |
| 1544 | + | ) | |
| 1545 | + | var ( | |
| 1546 | + | xXGAppInfoLaunchUrisFinish func(uintptr, uintptr, **glib.Error) bool | |
| 1547 | + | XGAppInfoRemoveSupportsType func(uintptr, string, **glib.Error) bool = func(instance uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |
| 1548 | + | core.LazyRegister(&xXGAppInfoRemoveSupportsType, "GIO", "g_app_info_remove_supports_type", false) | |
| 1549 | + | return xXGAppInfoRemoveSupportsType(instance, ContentTypeVarp, cerrp) | |
| 1550 | + | } | |
| 1551 | + | ) | |
| 1552 | + | var ( | |
| 1553 | + | xXGAppInfoRemoveSupportsType func(uintptr, string, **glib.Error) bool | |
| 1554 | + | XGAppInfoSetAsDefaultForExtension func(uintptr, string, **glib.Error) bool = func(instance uintptr, ExtensionVarp string, cerrp **glib.Error) bool { | |
| 1555 | + | core.LazyRegister(&xXGAppInfoSetAsDefaultForExtension, "GIO", "g_app_info_set_as_default_for_extension", false) | |
| 1556 | + | return xXGAppInfoSetAsDefaultForExtension(instance, ExtensionVarp, cerrp) | |
| 1557 | + | } | |
| 1558 | + | ) | |
| 1559 | + | var ( | |
| 1560 | + | xXGAppInfoSetAsDefaultForExtension func(uintptr, string, **glib.Error) bool | |
| 1561 | + | XGAppInfoSetAsDefaultForType func(uintptr, string, **glib.Error) bool = func(instance uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |
| 1562 | + | core.LazyRegister(&xXGAppInfoSetAsDefaultForType, "GIO", "g_app_info_set_as_default_for_type", false) | |
| 1563 | + | return xXGAppInfoSetAsDefaultForType(instance, ContentTypeVarp, cerrp) | |
| 1564 | + | } | |
| 1565 | + | ) | |
| 1566 | + | var ( | |
| 1567 | + | xXGAppInfoSetAsDefaultForType func(uintptr, string, **glib.Error) bool | |
| 1568 | + | XGAppInfoSetAsLastUsedForType func(uintptr, string, **glib.Error) bool = func(instance uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |
| 1569 | + | core.LazyRegister(&xXGAppInfoSetAsLastUsedForType, "GIO", "g_app_info_set_as_last_used_for_type", false) | |
| 1570 | + | return xXGAppInfoSetAsLastUsedForType(instance, ContentTypeVarp, cerrp) | |
| 1571 | + | } | |
| 1572 | + | ) | |
| 1573 | + | var ( | |
| 1574 | + | xXGAppInfoSetAsLastUsedForType func(uintptr, string, **glib.Error) bool | |
| 1575 | + | XGAppInfoShouldShow func(uintptr) bool = func(instance uintptr) bool { | |
| 1576 | + | core.LazyRegister(&xXGAppInfoShouldShow, "GIO", "g_app_info_should_show", false) | |
| 1577 | + | return xXGAppInfoShouldShow(instance) | |
| 1578 | + | } | |
| 1579 | + | ) | |
| 1580 | + | var ( | |
| 1581 | + | xXGAppInfoShouldShow func(uintptr) bool | |
| 1582 | + | XGAppInfoSupportsFiles func(uintptr) bool = func(instance uintptr) bool { | |
| 1583 | + | core.LazyRegister(&xXGAppInfoSupportsFiles, "GIO", "g_app_info_supports_files", false) | |
| 1584 | + | return xXGAppInfoSupportsFiles(instance) | |
| 1585 | + | } | |
| 1586 | + | ) | |
| 1587 | + | var ( | |
| 1588 | + | xXGAppInfoSupportsFiles func(uintptr) bool | |
| 1589 | + | XGAppInfoSupportsUris func(uintptr) bool = func(instance uintptr) bool { | |
| 1590 | + | core.LazyRegister(&xXGAppInfoSupportsUris, "GIO", "g_app_info_supports_uris", false) | |
| 1591 | + | return xXGAppInfoSupportsUris(instance) | |
| 1592 | + | } | |
| 1593 | + | ) | |
| 1594 | + | var xXGAppInfoSupportsUris func(uintptr) bool | |
| 1439 | 1595 | ||
| 1440 | 1596 | var xAppInfoCreateFromCommandline func(string, uintptr, AppInfoCreateFlags, **glib.Error) uintptr | |
| 1441 | 1597 | ||
| @@ -1449,6 +1605,7 @@ var xAppInfoCreateFromCommandline func(string, uintptr, AppInfoCreateFlags, **gl | |||
| 1449 | 1605 | // [the specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html) | |
| 1450 | 1606 | // for exact quoting rules. | |
| 1451 | 1607 | func AppInfoCreateFromCommandline(CommandlineVar string, ApplicationNameVar *string, FlagsVar AppInfoCreateFlags) (*AppInfoBase, error) { | |
| 1608 | + | core.LazyRegister(&xAppInfoCreateFromCommandline, "GIO", "g_app_info_create_from_commandline", false) | |
| 1452 | 1609 | var cls *AppInfoBase | |
| 1453 | 1610 | var cerr *glib.Error | |
| 1454 | 1611 | ||
| @@ -1484,6 +1641,8 @@ var xAppInfoGetAll func() uintptr | |||
| 1484 | 1641 | // [`Hidden` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-hidden) | |
| 1485 | 1642 | // set. | |
| 1486 | 1643 | func AppInfoGetAll() *glib.List { | |
| 1644 | + | core.LazyRegister(&xAppInfoGetAll, "GIO", "g_app_info_get_all", false) | |
| 1645 | + | ||
| 1487 | 1646 | cret := xAppInfoGetAll() | |
| 1488 | 1647 | if cret == 0 { | |
| 1489 | 1648 | return nil | |
| @@ -1498,6 +1657,8 @@ var xAppInfoGetAllForType func(string) uintptr | |||
| 1498 | 1657 | // [func@Gio.AppInfo.get_recommended_for_type] and | |
| 1499 | 1658 | // [func@Gio.AppInfo.get_fallback_for_type]. | |
| 1500 | 1659 | func AppInfoGetAllForType(ContentTypeVar string) *glib.List { | |
| 1660 | + | core.LazyRegister(&xAppInfoGetAllForType, "GIO", "g_app_info_get_all_for_type", false) | |
| 1661 | + | ||
| 1501 | 1662 | cret := xAppInfoGetAllForType(ContentTypeVar) | |
| 1502 | 1663 | if cret == 0 { | |
| 1503 | 1664 | return nil | |
| @@ -1509,6 +1670,7 @@ var xAppInfoGetDefaultForType func(string, bool) uintptr | |||
| 1509 | 1670 | ||
| 1510 | 1671 | // Gets the default [iface@Gio.AppInfo] for a given content type. | |
| 1511 | 1672 | func AppInfoGetDefaultForType(ContentTypeVar string, MustSupportUrisVar bool) *AppInfoBase { | |
| 1673 | + | core.LazyRegister(&xAppInfoGetDefaultForType, "GIO", "g_app_info_get_default_for_type", false) | |
| 1512 | 1674 | var cls *AppInfoBase | |
| 1513 | 1675 | ||
| 1514 | 1676 | cret := xAppInfoGetDefaultForType(ContentTypeVar, MustSupportUrisVar) | |
| @@ -1526,6 +1688,8 @@ var xAppInfoGetDefaultForTypeAsync func(string, bool, uintptr, uintptr, uintptr) | |||
| 1526 | 1688 | // Asynchronously gets the default [iface@Gio.AppInfo] for a given content | |
| 1527 | 1689 | // type. | |
| 1528 | 1690 | func AppInfoGetDefaultForTypeAsync(ContentTypeVar string, MustSupportUrisVar bool, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 1691 | + | core.LazyRegister(&xAppInfoGetDefaultForTypeAsync, "GIO", "g_app_info_get_default_for_type_async", false) | |
| 1692 | + | ||
| 1529 | 1693 | xAppInfoGetDefaultForTypeAsync(ContentTypeVar, MustSupportUrisVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 1530 | 1694 | } | |
| 1531 | 1695 | ||
| @@ -1537,6 +1701,7 @@ var xAppInfoGetDefaultForTypeFinish func(uintptr, **glib.Error) uintptr | |||
| 1537 | 1701 | // If no #[iface@Gio.AppInfo] is found, then @error will be set to | |
| 1538 | 1702 | // [error@Gio.IOErrorEnum.NOT_FOUND]. | |
| 1539 | 1703 | func AppInfoGetDefaultForTypeFinish(ResultVar AsyncResult) (*AppInfoBase, error) { | |
| 1704 | + | core.LazyRegister(&xAppInfoGetDefaultForTypeFinish, "GIO", "g_app_info_get_default_for_type_finish", false) | |
| 1540 | 1705 | var cls *AppInfoBase | |
| 1541 | 1706 | var cerr *glib.Error | |
| 1542 | 1707 | ||
| @@ -1560,6 +1725,7 @@ var xAppInfoGetDefaultForUriScheme func(string) uintptr | |||
| 1560 | 1725 | // A URI scheme is the initial part of the URI, up to but not including the `:`. | |
| 1561 | 1726 | // For example, `http`, `ftp` or `sip`. | |
| 1562 | 1727 | func AppInfoGetDefaultForUriScheme(UriSchemeVar string) *AppInfoBase { | |
| 1728 | + | core.LazyRegister(&xAppInfoGetDefaultForUriScheme, "GIO", "g_app_info_get_default_for_uri_scheme", false) | |
| 1563 | 1729 | var cls *AppInfoBase | |
| 1564 | 1730 | ||
| 1565 | 1731 | cret := xAppInfoGetDefaultForUriScheme(UriSchemeVar) | |
| @@ -1579,6 +1745,8 @@ var xAppInfoGetDefaultForUriSchemeAsync func(string, uintptr, uintptr, uintptr) | |||
| 1579 | 1745 | // of the URI, up to but not including the `:`, e.g. `http`, | |
| 1580 | 1746 | // `ftp` or `sip`. | |
| 1581 | 1747 | func AppInfoGetDefaultForUriSchemeAsync(UriSchemeVar string, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 1748 | + | core.LazyRegister(&xAppInfoGetDefaultForUriSchemeAsync, "GIO", "g_app_info_get_default_for_uri_scheme_async", false) | |
| 1749 | + | ||
| 1582 | 1750 | xAppInfoGetDefaultForUriSchemeAsync(UriSchemeVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 1583 | 1751 | } | |
| 1584 | 1752 | ||
| @@ -1590,6 +1758,7 @@ var xAppInfoGetDefaultForUriSchemeFinish func(uintptr, **glib.Error) uintptr | |||
| 1590 | 1758 | // If no [iface@Gio.AppInfo] is found, then @error will be set to | |
| 1591 | 1759 | // [error@Gio.IOErrorEnum.NOT_FOUND]. | |
| 1592 | 1760 | func AppInfoGetDefaultForUriSchemeFinish(ResultVar AsyncResult) (*AppInfoBase, error) { | |
| 1761 | + | core.LazyRegister(&xAppInfoGetDefaultForUriSchemeFinish, "GIO", "g_app_info_get_default_for_uri_scheme_finish", false) | |
| 1593 | 1762 | var cls *AppInfoBase | |
| 1594 | 1763 | var cerr *glib.Error | |
| 1595 | 1764 | ||
| @@ -1612,6 +1781,8 @@ var xAppInfoGetFallbackForType func(string) uintptr | |||
| 1612 | 1781 | // those applications which claim to support the given content type by MIME | |
| 1613 | 1782 | // type subclassing and not directly. | |
| 1614 | 1783 | func AppInfoGetFallbackForType(ContentTypeVar string) *glib.List { | |
| 1784 | + | core.LazyRegister(&xAppInfoGetFallbackForType, "GIO", "g_app_info_get_fallback_for_type", false) | |
| 1785 | + | ||
| 1615 | 1786 | cret := xAppInfoGetFallbackForType(ContentTypeVar) | |
| 1616 | 1787 | if cret == 0 { | |
| 1617 | 1788 | return nil | |
| @@ -1629,6 +1800,8 @@ var xAppInfoGetRecommendedForType func(string) uintptr | |||
| 1629 | 1800 | // the last one for which [method@Gio.AppInfo.set_as_last_used_for_type] has | |
| 1630 | 1801 | // been called. | |
| 1631 | 1802 | func AppInfoGetRecommendedForType(ContentTypeVar string) *glib.List { | |
| 1803 | + | core.LazyRegister(&xAppInfoGetRecommendedForType, "GIO", "g_app_info_get_recommended_for_type", false) | |
| 1804 | + | ||
| 1632 | 1805 | cret := xAppInfoGetRecommendedForType(ContentTypeVar) | |
| 1633 | 1806 | if cret == 0 { | |
| 1634 | 1807 | return nil | |
| @@ -1646,6 +1819,7 @@ var xAppInfoLaunchDefaultForUri func(string, uintptr, **glib.Error) bool | |||
| 1646 | 1819 | // terminates too soon after this function. To prevent this, use | |
| 1647 | 1820 | // [func@Gio.AppInfo.launch_default_for_uri_async] instead. | |
| 1648 | 1821 | func AppInfoLaunchDefaultForUri(UriVar string, ContextVar *AppLaunchContext) (bool, error) { | |
| 1822 | + | core.LazyRegister(&xAppInfoLaunchDefaultForUri, "GIO", "g_app_info_launch_default_for_uri", false) | |
| 1649 | 1823 | var cerr *glib.Error | |
| 1650 | 1824 | ||
| 1651 | 1825 | cret := xAppInfoLaunchDefaultForUri(UriVar, ContextVar.GoPointer(), &cerr) | |
| @@ -1667,6 +1841,8 @@ var xAppInfoLaunchDefaultForUriAsync func(string, uintptr, uintptr, uintptr, uin | |||
| 1667 | 1841 | // applications are really started before termination and if you are interested | |
| 1668 | 1842 | // in receiving error information from their activation. | |
| 1669 | 1843 | func AppInfoLaunchDefaultForUriAsync(UriVar string, ContextVar *AppLaunchContext, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 1844 | + | core.LazyRegister(&xAppInfoLaunchDefaultForUriAsync, "GIO", "g_app_info_launch_default_for_uri_async", false) | |
| 1845 | + | ||
| 1670 | 1846 | xAppInfoLaunchDefaultForUriAsync(UriVar, ContextVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 1671 | 1847 | } | |
| 1672 | 1848 | ||
| @@ -1674,6 +1850,7 @@ var xAppInfoLaunchDefaultForUriFinish func(uintptr, **glib.Error) bool | |||
| 1674 | 1850 | ||
| 1675 | 1851 | // Finishes an asynchronous launch-default-for-uri operation. | |
| 1676 | 1852 | func AppInfoLaunchDefaultForUriFinish(ResultVar AsyncResult) (bool, error) { | |
| 1853 | + | core.LazyRegister(&xAppInfoLaunchDefaultForUriFinish, "GIO", "g_app_info_launch_default_for_uri_finish", false) | |
| 1677 | 1854 | var cerr *glib.Error | |
| 1678 | 1855 | ||
| 1679 | 1856 | cret := xAppInfoLaunchDefaultForUriFinish(ResultVar.GoPointer(), &cerr) | |
| @@ -1691,6 +1868,8 @@ var xAppInfoResetTypeAssociations func(string) | |||
| 1691 | 1868 | // [method@Gio.AppInfo.add_supports_type] or | |
| 1692 | 1869 | // [method@Gio.AppInfo.remove_supports_type]. | |
| 1693 | 1870 | func AppInfoResetTypeAssociations(ContentTypeVar string) { | |
| 1871 | + | core.LazyRegister(&xAppInfoResetTypeAssociations, "GIO", "g_app_info_reset_type_associations", false) | |
| 1872 | + | ||
| 1694 | 1873 | xAppInfoResetTypeAssociations(ContentTypeVar) | |
| 1695 | 1874 | } | |
| 1696 | 1875 | ||
| @@ -1740,6 +1919,7 @@ type AppInfoMonitor struct { | |||
| 1740 | 1919 | var xAppInfoMonitorGLibType func() types.GType | |
| 1741 | 1920 | ||
| 1742 | 1921 | func AppInfoMonitorGLibType() types.GType { | |
| 1922 | + | core.LazyRegister(&xAppInfoMonitorGLibType, "GIO", "g_app_info_monitor_get_type", false) | |
| 1743 | 1923 | return xAppInfoMonitorGLibType() | |
| 1744 | 1924 | } | |
| 1745 | 1925 | ||
| @@ -1800,6 +1980,7 @@ var xAppInfoMonitorGet func() uintptr | |||
| 1800 | 1980 | // You must only call g_object_unref() on the return value from under | |
| 1801 | 1981 | // the same main context as you created it. | |
| 1802 | 1982 | func AppInfoMonitorGet() *AppInfoMonitor { | |
| 1983 | + | core.LazyRegister(&xAppInfoMonitorGet, "GIO", "g_app_info_monitor_get", false) | |
| 1803 | 1984 | var cls *AppInfoMonitor | |
| 1804 | 1985 | ||
| 1805 | 1986 | cret := xAppInfoMonitorGet() | |
| @@ -1822,6 +2003,7 @@ type AppLaunchContext struct { | |||
| 1822 | 2003 | var xAppLaunchContextGLibType func() types.GType | |
| 1823 | 2004 | ||
| 1824 | 2005 | func AppLaunchContextGLibType() types.GType { | |
| 2006 | + | core.LazyRegister(&xAppLaunchContextGLibType, "GIO", "g_app_launch_context_get_type", false) | |
| 1825 | 2007 | return xAppLaunchContextGLibType() | |
| 1826 | 2008 | } | |
| 1827 | 2009 | ||
| @@ -1837,6 +2019,7 @@ var xNewAppLaunchContext func() uintptr | |||
| 1837 | 2019 | // instead you instantiate a subclass of this, such as | |
| 1838 | 2020 | // [`GdkAppLaunchContext`](https://docs.gtk.org/gdk4/class.AppLaunchContext.html). | |
| 1839 | 2021 | func NewAppLaunchContext() *AppLaunchContext { | |
| 2022 | + | core.LazyRegister(&xNewAppLaunchContext, "GIO", "g_app_launch_context_new", false) | |
| 1840 | 2023 | var cls *AppLaunchContext | |
| 1841 | 2024 | ||
| 1842 | 2025 | cret := xNewAppLaunchContext() | |
| @@ -1855,6 +2038,8 @@ var xAppLaunchContextGetDisplay func(uintptr, uintptr, *glib.List) string | |||
| 1855 | 2038 | // applications are started on the same display as the launching | |
| 1856 | 2039 | // application, by setting the `DISPLAY` environment variable. | |
| 1857 | 2040 | func (x *AppLaunchContext) GetDisplay(InfoVar AppInfo, FilesVar *glib.List) string { | |
| 2041 | + | core.LazyRegister(&xAppLaunchContextGetDisplay, "GIO", "g_app_launch_context_get_display", false) | |
| 2042 | + | ||
| 1858 | 2043 | cret := xAppLaunchContextGetDisplay(x.GoPointer(), InfoVar.GoPointer(), FilesVar) | |
| 1859 | 2044 | return cret | |
| 1860 | 2045 | } | |
| @@ -1866,6 +2051,8 @@ var xAppLaunchContextGetEnvironment func(uintptr) []string | |||
| 1866 | 2051 | // This is a `NULL`-terminated array of strings, where each string has | |
| 1867 | 2052 | // the form `KEY=VALUE`. | |
| 1868 | 2053 | func (x *AppLaunchContext) GetEnvironment() []string { | |
| 2054 | + | core.LazyRegister(&xAppLaunchContextGetEnvironment, "GIO", "g_app_launch_context_get_environment", false) | |
| 2055 | + | ||
| 1869 | 2056 | cret := xAppLaunchContextGetEnvironment(x.GoPointer()) | |
| 1870 | 2057 | return cret | |
| 1871 | 2058 | } | |
| @@ -1888,6 +2075,8 @@ var xAppLaunchContextGetStartupNotifyId func(uintptr, uintptr, *glib.List) strin | |||
| 1888 | 2075 | // Since GLib 2.82 @info and @files can be `NULL`. If that’s not supported by the backend, | |
| 1889 | 2076 | // the returned token will be `NULL`. | |
| 1890 | 2077 | func (x *AppLaunchContext) GetStartupNotifyId(InfoVar AppInfo, FilesVar *glib.List) string { | |
| 2078 | + | core.LazyRegister(&xAppLaunchContextGetStartupNotifyId, "GIO", "g_app_launch_context_get_startup_notify_id", false) | |
| 2079 | + | ||
| 1891 | 2080 | cret := xAppLaunchContextGetStartupNotifyId(x.GoPointer(), InfoVar.GoPointer(), FilesVar) | |
| 1892 | 2081 | return cret | |
| 1893 | 2082 | } | |
| @@ -1898,6 +2087,8 @@ var xAppLaunchContextLaunchFailed func(uintptr, string) | |||
| 1898 | 2087 | // the application startup notification started in | |
| 1899 | 2088 | // [method@Gio.AppLaunchContext.get_startup_notify_id]. | |
| 1900 | 2089 | func (x *AppLaunchContext) LaunchFailed(StartupNotifyIdVar string) { | |
| 2090 | + | core.LazyRegister(&xAppLaunchContextLaunchFailed, "GIO", "g_app_launch_context_launch_failed", false) | |
| 2091 | + | ||
| 1901 | 2092 | xAppLaunchContextLaunchFailed(x.GoPointer(), StartupNotifyIdVar) | |
| 1902 | 2093 | } | |
| 1903 | 2094 | ||
| @@ -1906,6 +2097,8 @@ var xAppLaunchContextSetenv func(uintptr, string, string) | |||
| 1906 | 2097 | // Arranges for @variable to be set to @value in the child’s environment when | |
| 1907 | 2098 | // @context is used to launch an application. | |
| 1908 | 2099 | func (x *AppLaunchContext) Setenv(VariableVar string, ValueVar string) { | |
| 2100 | + | core.LazyRegister(&xAppLaunchContextSetenv, "GIO", "g_app_launch_context_setenv", false) | |
| 2101 | + | ||
| 1909 | 2102 | xAppLaunchContextSetenv(x.GoPointer(), VariableVar, ValueVar) | |
| 1910 | 2103 | } | |
| 1911 | 2104 | ||
| @@ -1914,6 +2107,8 @@ var xAppLaunchContextUnsetenv func(uintptr, string) | |||
| 1914 | 2107 | // Arranges for @variable to be unset in the child’s environment when @context | |
| 1915 | 2108 | // is used to launch an application. | |
| 1916 | 2109 | func (x *AppLaunchContext) Unsetenv(VariableVar string) { | |
| 2110 | + | core.LazyRegister(&xAppLaunchContextUnsetenv, "GIO", "g_app_launch_context_unsetenv", false) | |
| 2111 | + | ||
| 1917 | 2112 | xAppLaunchContextUnsetenv(x.GoPointer(), VariableVar) | |
| 1918 | 2113 | } | |
| 1919 | 2114 | ||
| @@ -2044,71 +2239,4 @@ func (x *AppLaunchContext) ConnectLaunched(cb *func(AppLaunchContext, uintptr, u | |||
| 2044 | 2239 | func init() { | |
| 2045 | 2240 | core.SetPackageName("GIO", "gio-2.0") | |
| 2046 | 2241 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | |
| 2047 | - | var libs []uintptr | |
| 2048 | - | for _, libPath := range core.GetPaths("GIO") { | |
| 2049 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 2050 | - | if err != nil { | |
| 2051 | - | panic(err) | |
| 2052 | - | } | |
| 2053 | - | libs = append(libs, lib) | |
| 2054 | - | } | |
| 2055 | - | ||
| 2056 | - | core.PuregoSafeRegister(&xAppInfoCreateFromCommandline, libs, "g_app_info_create_from_commandline") | |
| 2057 | - | core.PuregoSafeRegister(&xAppInfoGetAll, libs, "g_app_info_get_all") | |
| 2058 | - | core.PuregoSafeRegister(&xAppInfoGetAllForType, libs, "g_app_info_get_all_for_type") | |
| 2059 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForType, libs, "g_app_info_get_default_for_type") | |
| 2060 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForTypeAsync, libs, "g_app_info_get_default_for_type_async") | |
| 2061 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForTypeFinish, libs, "g_app_info_get_default_for_type_finish") | |
| 2062 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForUriScheme, libs, "g_app_info_get_default_for_uri_scheme") | |
| 2063 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForUriSchemeAsync, libs, "g_app_info_get_default_for_uri_scheme_async") | |
| 2064 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForUriSchemeFinish, libs, "g_app_info_get_default_for_uri_scheme_finish") | |
| 2065 | - | core.PuregoSafeRegister(&xAppInfoGetFallbackForType, libs, "g_app_info_get_fallback_for_type") | |
| 2066 | - | core.PuregoSafeRegister(&xAppInfoGetRecommendedForType, libs, "g_app_info_get_recommended_for_type") | |
| 2067 | - | core.PuregoSafeRegister(&xAppInfoLaunchDefaultForUri, libs, "g_app_info_launch_default_for_uri") | |
| 2068 | - | core.PuregoSafeRegister(&xAppInfoLaunchDefaultForUriAsync, libs, "g_app_info_launch_default_for_uri_async") | |
| 2069 | - | core.PuregoSafeRegister(&xAppInfoLaunchDefaultForUriFinish, libs, "g_app_info_launch_default_for_uri_finish") | |
| 2070 | - | core.PuregoSafeRegister(&xAppInfoResetTypeAssociations, libs, "g_app_info_reset_type_associations") | |
| 2071 | - | ||
| 2072 | - | core.PuregoSafeRegister(&xAppInfoMonitorGLibType, libs, "g_app_info_monitor_get_type") | |
| 2073 | - | ||
| 2074 | - | core.PuregoSafeRegister(&xAppInfoMonitorGet, libs, "g_app_info_monitor_get") | |
| 2075 | - | ||
| 2076 | - | core.PuregoSafeRegister(&xAppLaunchContextGLibType, libs, "g_app_launch_context_get_type") | |
| 2077 | - | ||
| 2078 | - | core.PuregoSafeRegister(&xNewAppLaunchContext, libs, "g_app_launch_context_new") | |
| 2079 | - | ||
| 2080 | - | core.PuregoSafeRegister(&xAppLaunchContextGetDisplay, libs, "g_app_launch_context_get_display") | |
| 2081 | - | core.PuregoSafeRegister(&xAppLaunchContextGetEnvironment, libs, "g_app_launch_context_get_environment") | |
| 2082 | - | core.PuregoSafeRegister(&xAppLaunchContextGetStartupNotifyId, libs, "g_app_launch_context_get_startup_notify_id") | |
| 2083 | - | core.PuregoSafeRegister(&xAppLaunchContextLaunchFailed, libs, "g_app_launch_context_launch_failed") | |
| 2084 | - | core.PuregoSafeRegister(&xAppLaunchContextSetenv, libs, "g_app_launch_context_setenv") | |
| 2085 | - | core.PuregoSafeRegister(&xAppLaunchContextUnsetenv, libs, "g_app_launch_context_unsetenv") | |
| 2086 | - | ||
| 2087 | - | core.PuregoSafeRegister(&xAppInfoGLibType, libs, "g_app_info_get_type") | |
| 2088 | - | ||
| 2089 | - | core.PuregoSafeRegister(&XGAppInfoAddSupportsType, libs, "g_app_info_add_supports_type") | |
| 2090 | - | core.PuregoSafeRegister(&XGAppInfoCanDelete, libs, "g_app_info_can_delete") | |
| 2091 | - | core.PuregoSafeRegister(&XGAppInfoCanRemoveSupportsType, libs, "g_app_info_can_remove_supports_type") | |
| 2092 | - | core.PuregoSafeRegister(&XGAppInfoDelete, libs, "g_app_info_delete") | |
| 2093 | - | core.PuregoSafeRegister(&XGAppInfoDup, libs, "g_app_info_dup") | |
| 2094 | - | core.PuregoSafeRegister(&XGAppInfoEqual, libs, "g_app_info_equal") | |
| 2095 | - | core.PuregoSafeRegister(&XGAppInfoGetCommandline, libs, "g_app_info_get_commandline") | |
| 2096 | - | core.PuregoSafeRegister(&XGAppInfoGetDescription, libs, "g_app_info_get_description") | |
| 2097 | - | core.PuregoSafeRegister(&XGAppInfoGetDisplayName, libs, "g_app_info_get_display_name") | |
| 2098 | - | core.PuregoSafeRegister(&XGAppInfoGetExecutable, libs, "g_app_info_get_executable") | |
| 2099 | - | core.PuregoSafeRegister(&XGAppInfoGetIcon, libs, "g_app_info_get_icon") | |
| 2100 | - | core.PuregoSafeRegister(&XGAppInfoGetId, libs, "g_app_info_get_id") | |
| 2101 | - | core.PuregoSafeRegister(&XGAppInfoGetName, libs, "g_app_info_get_name") | |
| 2102 | - | core.PuregoSafeRegister(&XGAppInfoGetSupportedTypes, libs, "g_app_info_get_supported_types") | |
| 2103 | - | core.PuregoSafeRegister(&XGAppInfoLaunch, libs, "g_app_info_launch") | |
| 2104 | - | core.PuregoSafeRegister(&XGAppInfoLaunchUris, libs, "g_app_info_launch_uris") | |
| 2105 | - | core.PuregoSafeRegister(&XGAppInfoLaunchUrisAsync, libs, "g_app_info_launch_uris_async") | |
| 2106 | - | core.PuregoSafeRegister(&XGAppInfoLaunchUrisFinish, libs, "g_app_info_launch_uris_finish") | |
| 2107 | - | core.PuregoSafeRegister(&XGAppInfoRemoveSupportsType, libs, "g_app_info_remove_supports_type") | |
| 2108 | - | core.PuregoSafeRegister(&XGAppInfoSetAsDefaultForExtension, libs, "g_app_info_set_as_default_for_extension") | |
| 2109 | - | core.PuregoSafeRegister(&XGAppInfoSetAsDefaultForType, libs, "g_app_info_set_as_default_for_type") | |
| 2110 | - | core.PuregoSafeRegister(&XGAppInfoSetAsLastUsedForType, libs, "g_app_info_set_as_last_used_for_type") | |
| 2111 | - | core.PuregoSafeRegister(&XGAppInfoShouldShow, libs, "g_app_info_should_show") | |
| 2112 | - | core.PuregoSafeRegister(&XGAppInfoSupportsFiles, libs, "g_app_info_supports_files") | |
| 2113 | - | core.PuregoSafeRegister(&XGAppInfoSupportsUris, libs, "g_app_info_supports_uris") | |
| 2114 | 2242 | } | |
| @@ -286,7 +286,7 @@ func (x *AppInfoIface) OverrideLaunch(cb func(AppInfo, *glib.List, *AppLaunchCon | |||||
| 286 | if cb == nil { | 286 | if cb == nil { | ||
| 287 | x.xLaunch = 0 | 287 | x.xLaunch = 0 | ||
| 288 | } else { | 288 | } else { | ||
| 289 | - | x.xLaunch = purego.NewCallback(func(AppinfoVarp uintptr, FilesVarp *glib.List, ContextVarp uintptr) bool { | 289 | + | x.xLaunch = purego.NewCallback(func(AppinfoVarp uintptr, FilesVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool { |
| 290 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, FilesVarp, AppLaunchContextNewFromInternalPtr(ContextVarp)) | 290 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, FilesVarp, AppLaunchContextNewFromInternalPtr(ContextVarp)) | ||
| 291 | }) | 291 | }) | ||
| 292 | } | 292 | } | ||
| @@ -298,10 +298,11 @@ func (x *AppInfoIface) GetLaunch() func(AppInfo, *glib.List, *AppLaunchContext) | |||||
| 298 | if x.xLaunch == 0 { | 298 | if x.xLaunch == 0 { | ||
| 299 | return nil | 299 | return nil | ||
| 300 | } | 300 | } | ||
| 301 | - | var rawCallback func(AppinfoVarp uintptr, FilesVarp *glib.List, ContextVarp uintptr) bool | 301 | + | var rawCallback func(AppinfoVarp uintptr, FilesVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool |
| 302 | purego.RegisterFunc(&rawCallback, x.xLaunch) | 302 | purego.RegisterFunc(&rawCallback, x.xLaunch) | ||
| 303 | return func(AppinfoVar AppInfo, FilesVar *glib.List, ContextVar *AppLaunchContext) bool { | 303 | return func(AppinfoVar AppInfo, FilesVar *glib.List, ContextVar *AppLaunchContext) bool { | ||
| 304 | - | return rawCallback(AppinfoVar.GoPointer(), FilesVar, ContextVar.GoPointer()) | 304 | + | var cerr *glib.Error |
| 305 | + | return rawCallback(AppinfoVar.GoPointer(), FilesVar, ContextVar.GoPointer(), &cerr) | |||
| 305 | } | 306 | } | ||
| 306 | } | 307 | } | ||
| 307 | 308 | ||||
| @@ -369,7 +370,7 @@ func (x *AppInfoIface) OverrideLaunchUris(cb func(AppInfo, *glib.List, *AppLaunc | |||||
| 369 | if cb == nil { | 370 | if cb == nil { | ||
| 370 | x.xLaunchUris = 0 | 371 | x.xLaunchUris = 0 | ||
| 371 | } else { | 372 | } else { | ||
| 372 | - | x.xLaunchUris = purego.NewCallback(func(AppinfoVarp uintptr, UrisVarp *glib.List, ContextVarp uintptr) bool { | 373 | + | x.xLaunchUris = purego.NewCallback(func(AppinfoVarp uintptr, UrisVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool { |
| 373 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, UrisVarp, AppLaunchContextNewFromInternalPtr(ContextVarp)) | 374 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, UrisVarp, AppLaunchContextNewFromInternalPtr(ContextVarp)) | ||
| 374 | }) | 375 | }) | ||
| 375 | } | 376 | } | ||
| @@ -381,10 +382,11 @@ func (x *AppInfoIface) GetLaunchUris() func(AppInfo, *glib.List, *AppLaunchConte | |||||
| 381 | if x.xLaunchUris == 0 { | 382 | if x.xLaunchUris == 0 { | ||
| 382 | return nil | 383 | return nil | ||
| 383 | } | 384 | } | ||
| 384 | - | var rawCallback func(AppinfoVarp uintptr, UrisVarp *glib.List, ContextVarp uintptr) bool | 385 | + | var rawCallback func(AppinfoVarp uintptr, UrisVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool |
| 385 | purego.RegisterFunc(&rawCallback, x.xLaunchUris) | 386 | purego.RegisterFunc(&rawCallback, x.xLaunchUris) | ||
| 386 | return func(AppinfoVar AppInfo, UrisVar *glib.List, ContextVar *AppLaunchContext) bool { | 387 | return func(AppinfoVar AppInfo, UrisVar *glib.List, ContextVar *AppLaunchContext) bool { | ||
| 387 | - | return rawCallback(AppinfoVar.GoPointer(), UrisVar, ContextVar.GoPointer()) | 388 | + | var cerr *glib.Error |
| 389 | + | return rawCallback(AppinfoVar.GoPointer(), UrisVar, ContextVar.GoPointer(), &cerr) | |||
| 388 | } | 390 | } | ||
| 389 | } | 391 | } | ||
| 390 | 392 | ||||
| @@ -427,7 +429,7 @@ func (x *AppInfoIface) OverrideSetAsDefaultForType(cb func(AppInfo, string) bool | |||||
| 427 | if cb == nil { | 429 | if cb == nil { | ||
| 428 | x.xSetAsDefaultForType = 0 | 430 | x.xSetAsDefaultForType = 0 | ||
| 429 | } else { | 431 | } else { | ||
| 430 | - | x.xSetAsDefaultForType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string) bool { | 432 | + | x.xSetAsDefaultForType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { |
| 431 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | 433 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | ||
| 432 | }) | 434 | }) | ||
| 433 | } | 435 | } | ||
| @@ -441,10 +443,11 @@ func (x *AppInfoIface) GetSetAsDefaultForType() func(AppInfo, string) bool { | |||||
| 441 | if x.xSetAsDefaultForType == 0 { | 443 | if x.xSetAsDefaultForType == 0 { | ||
| 442 | return nil | 444 | return nil | ||
| 443 | } | 445 | } | ||
| 444 | - | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string) bool | 446 | + | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool |
| 445 | purego.RegisterFunc(&rawCallback, x.xSetAsDefaultForType) | 447 | purego.RegisterFunc(&rawCallback, x.xSetAsDefaultForType) | ||
| 446 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | 448 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | ||
| 447 | - | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar) | 449 | + | var cerr *glib.Error |
| 450 | + | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar, &cerr) | |||
| 448 | } | 451 | } | ||
| 449 | } | 452 | } | ||
| 450 | 453 | ||||
| @@ -456,7 +459,7 @@ func (x *AppInfoIface) OverrideSetAsDefaultForExtension(cb func(AppInfo, string) | |||||
| 456 | if cb == nil { | 459 | if cb == nil { | ||
| 457 | x.xSetAsDefaultForExtension = 0 | 460 | x.xSetAsDefaultForExtension = 0 | ||
| 458 | } else { | 461 | } else { | ||
| 459 | - | x.xSetAsDefaultForExtension = purego.NewCallback(func(AppinfoVarp uintptr, ExtensionVarp string) bool { | 462 | + | x.xSetAsDefaultForExtension = purego.NewCallback(func(AppinfoVarp uintptr, ExtensionVarp string, cerrp **glib.Error) bool { |
| 460 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ExtensionVarp) | 463 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ExtensionVarp) | ||
| 461 | }) | 464 | }) | ||
| 462 | } | 465 | } | ||
| @@ -470,10 +473,11 @@ func (x *AppInfoIface) GetSetAsDefaultForExtension() func(AppInfo, string) bool | |||||
| 470 | if x.xSetAsDefaultForExtension == 0 { | 473 | if x.xSetAsDefaultForExtension == 0 { | ||
| 471 | return nil | 474 | return nil | ||
| 472 | } | 475 | } | ||
| 473 | - | var rawCallback func(AppinfoVarp uintptr, ExtensionVarp string) bool | 476 | + | var rawCallback func(AppinfoVarp uintptr, ExtensionVarp string, cerrp **glib.Error) bool |
| 474 | purego.RegisterFunc(&rawCallback, x.xSetAsDefaultForExtension) | 477 | purego.RegisterFunc(&rawCallback, x.xSetAsDefaultForExtension) | ||
| 475 | return func(AppinfoVar AppInfo, ExtensionVar string) bool { | 478 | return func(AppinfoVar AppInfo, ExtensionVar string) bool { | ||
| 476 | - | return rawCallback(AppinfoVar.GoPointer(), ExtensionVar) | 479 | + | var cerr *glib.Error |
| 480 | + | return rawCallback(AppinfoVar.GoPointer(), ExtensionVar, &cerr) | |||
| 477 | } | 481 | } | ||
| 478 | } | 482 | } | ||
| 479 | 483 | ||||
| @@ -485,7 +489,7 @@ func (x *AppInfoIface) OverrideAddSupportsType(cb func(AppInfo, string) bool) { | |||||
| 485 | if cb == nil { | 489 | if cb == nil { | ||
| 486 | x.xAddSupportsType = 0 | 490 | x.xAddSupportsType = 0 | ||
| 487 | } else { | 491 | } else { | ||
| 488 | - | x.xAddSupportsType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string) bool { | 492 | + | x.xAddSupportsType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { |
| 489 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | 493 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | ||
| 490 | }) | 494 | }) | ||
| 491 | } | 495 | } | ||
| @@ -499,10 +503,11 @@ func (x *AppInfoIface) GetAddSupportsType() func(AppInfo, string) bool { | |||||
| 499 | if x.xAddSupportsType == 0 { | 503 | if x.xAddSupportsType == 0 { | ||
| 500 | return nil | 504 | return nil | ||
| 501 | } | 505 | } | ||
| 502 | - | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string) bool | 506 | + | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool |
| 503 | purego.RegisterFunc(&rawCallback, x.xAddSupportsType) | 507 | purego.RegisterFunc(&rawCallback, x.xAddSupportsType) | ||
| 504 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | 508 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | ||
| 505 | - | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar) | 509 | + | var cerr *glib.Error |
| 510 | + | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar, &cerr) | |||
| 506 | } | 511 | } | ||
| 507 | } | 512 | } | ||
| 508 | 513 | ||||
| @@ -543,7 +548,7 @@ func (x *AppInfoIface) OverrideRemoveSupportsType(cb func(AppInfo, string) bool) | |||||
| 543 | if cb == nil { | 548 | if cb == nil { | ||
| 544 | x.xRemoveSupportsType = 0 | 549 | x.xRemoveSupportsType = 0 | ||
| 545 | } else { | 550 | } else { | ||
| 546 | - | x.xRemoveSupportsType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string) bool { | 551 | + | x.xRemoveSupportsType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { |
| 547 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | 552 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | ||
| 548 | }) | 553 | }) | ||
| 549 | } | 554 | } | ||
| @@ -557,10 +562,11 @@ func (x *AppInfoIface) GetRemoveSupportsType() func(AppInfo, string) bool { | |||||
| 557 | if x.xRemoveSupportsType == 0 { | 562 | if x.xRemoveSupportsType == 0 { | ||
| 558 | return nil | 563 | return nil | ||
| 559 | } | 564 | } | ||
| 560 | - | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string) bool | 565 | + | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool |
| 561 | purego.RegisterFunc(&rawCallback, x.xRemoveSupportsType) | 566 | purego.RegisterFunc(&rawCallback, x.xRemoveSupportsType) | ||
| 562 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | 567 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | ||
| 563 | - | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar) | 568 | + | var cerr *glib.Error |
| 569 | + | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar, &cerr) | |||
| 564 | } | 570 | } | ||
| 565 | } | 571 | } | ||
| 566 | 572 | ||||
| @@ -680,7 +686,7 @@ func (x *AppInfoIface) OverrideSetAsLastUsedForType(cb func(AppInfo, string) boo | |||||
| 680 | if cb == nil { | 686 | if cb == nil { | ||
| 681 | x.xSetAsLastUsedForType = 0 | 687 | x.xSetAsLastUsedForType = 0 | ||
| 682 | } else { | 688 | } else { | ||
| 683 | - | x.xSetAsLastUsedForType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string) bool { | 689 | + | x.xSetAsLastUsedForType = purego.NewCallback(func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { |
| 684 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | 690 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, ContentTypeVarp) | ||
| 685 | }) | 691 | }) | ||
| 686 | } | 692 | } | ||
| @@ -694,10 +700,11 @@ func (x *AppInfoIface) GetSetAsLastUsedForType() func(AppInfo, string) bool { | |||||
| 694 | if x.xSetAsLastUsedForType == 0 { | 700 | if x.xSetAsLastUsedForType == 0 { | ||
| 695 | return nil | 701 | return nil | ||
| 696 | } | 702 | } | ||
| 697 | - | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string) bool | 703 | + | var rawCallback func(AppinfoVarp uintptr, ContentTypeVarp string, cerrp **glib.Error) bool |
| 698 | purego.RegisterFunc(&rawCallback, x.xSetAsLastUsedForType) | 704 | purego.RegisterFunc(&rawCallback, x.xSetAsLastUsedForType) | ||
| 699 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | 705 | return func(AppinfoVar AppInfo, ContentTypeVar string) bool { | ||
| 700 | - | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar) | 706 | + | var cerr *glib.Error |
| 707 | + | return rawCallback(AppinfoVar.GoPointer(), ContentTypeVar, &cerr) | |||
| 701 | } | 708 | } | ||
| 702 | } | 709 | } | ||
| 703 | 710 | ||||
| @@ -767,7 +774,7 @@ func (x *AppInfoIface) OverrideLaunchUrisFinish(cb func(AppInfo, AsyncResult) bo | |||||
| 767 | if cb == nil { | 774 | if cb == nil { | ||
| 768 | x.xLaunchUrisFinish = 0 | 775 | x.xLaunchUrisFinish = 0 | ||
| 769 | } else { | 776 | } else { | ||
| 770 | - | x.xLaunchUrisFinish = purego.NewCallback(func(AppinfoVarp uintptr, ResultVarp uintptr) bool { | 777 | + | x.xLaunchUrisFinish = purego.NewCallback(func(AppinfoVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool { |
| 771 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, &AsyncResultBase{Ptr: ResultVarp}) | 778 | return cb(&AppInfoBase{Ptr: AppinfoVarp}, &AsyncResultBase{Ptr: ResultVarp}) | ||
| 772 | }) | 779 | }) | ||
| 773 | } | 780 | } | ||
| @@ -781,10 +788,11 @@ func (x *AppInfoIface) GetLaunchUrisFinish() func(AppInfo, AsyncResult) bool { | |||||
| 781 | if x.xLaunchUrisFinish == 0 { | 788 | if x.xLaunchUrisFinish == 0 { | ||
| 782 | return nil | 789 | return nil | ||
| 783 | } | 790 | } | ||
| 784 | - | var rawCallback func(AppinfoVarp uintptr, ResultVarp uintptr) bool | 791 | + | var rawCallback func(AppinfoVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool |
| 785 | purego.RegisterFunc(&rawCallback, x.xLaunchUrisFinish) | 792 | purego.RegisterFunc(&rawCallback, x.xLaunchUrisFinish) | ||
| 786 | return func(AppinfoVar AppInfo, ResultVar AsyncResult) bool { | 793 | return func(AppinfoVar AppInfo, ResultVar AsyncResult) bool { | ||
| 787 | - | return rawCallback(AppinfoVar.GoPointer(), ResultVar.GoPointer()) | 794 | + | var cerr *glib.Error |
| 795 | + | return rawCallback(AppinfoVar.GoPointer(), ResultVar.GoPointer(), &cerr) | |||
| 788 | } | 796 | } | ||
| 789 | } | 797 | } | ||
| 790 | 798 | ||||
| @@ -1112,6 +1120,7 @@ type AppInfo interface { | |||||
| 1112 | var xAppInfoGLibType func() types.GType | 1120 | var xAppInfoGLibType func() types.GType | ||
| 1113 | 1121 | ||||
| 1114 | func AppInfoGLibType() types.GType { | 1122 | func AppInfoGLibType() types.GType { | ||
| 1123 | + | core.LazyRegister(&xAppInfoGLibType, "GIO", "g_app_info_get_type", false) | |||
| 1115 | return xAppInfoGLibType() | 1124 | return xAppInfoGLibType() | ||
| 1116 | } | 1125 | } | ||
| 1117 | 1126 | ||||
| @@ -1409,33 +1418,180 @@ func (x *AppInfoBase) SupportsUris() bool { | |||||
| 1409 | return cret | 1418 | return cret | ||
| 1410 | } | 1419 | } | ||
| 1411 | 1420 | ||||
| 1421 | + | var XGAppInfoAddSupportsType func(uintptr, string, **glib.Error) bool = func(instance uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |||
| 1422 | + | core.LazyRegister(&xXGAppInfoAddSupportsType, "GIO", "g_app_info_add_supports_type", false) | |||
| 1423 | + | return xXGAppInfoAddSupportsType(instance, ContentTypeVarp, cerrp) | |||
| 1424 | + | } | |||
| 1425 | + | ||||
| 1426 | + | var ( | |||
| 1427 | + | xXGAppInfoAddSupportsType func(uintptr, string, **glib.Error) bool | |||
| 1428 | + | XGAppInfoCanDelete func(uintptr) bool = func(instance uintptr) bool { | |||
| 1429 | + | core.LazyRegister(&xXGAppInfoCanDelete, "GIO", "g_app_info_can_delete", false) | |||
| 1430 | + | return xXGAppInfoCanDelete(instance) | |||
| 1431 | + | } | |||
| 1432 | + | ) | |||
| 1433 | + | var ( | |||
| 1434 | + | xXGAppInfoCanDelete func(uintptr) bool | |||
| 1435 | + | XGAppInfoCanRemoveSupportsType func(uintptr) bool = func(instance uintptr) bool { | |||
| 1436 | + | core.LazyRegister(&xXGAppInfoCanRemoveSupportsType, "GIO", "g_app_info_can_remove_supports_type", false) | |||
| 1437 | + | return xXGAppInfoCanRemoveSupportsType(instance) | |||
| 1438 | + | } | |||
| 1439 | + | ) | |||
| 1440 | + | var ( | |||
| 1441 | + | xXGAppInfoCanRemoveSupportsType func(uintptr) bool | |||
| 1442 | + | XGAppInfoDelete func(uintptr) bool = func(instance uintptr) bool { | |||
| 1443 | + | core.LazyRegister(&xXGAppInfoDelete, "GIO", "g_app_info_delete", false) | |||
| 1444 | + | return xXGAppInfoDelete(instance) | |||
| 1445 | + | } | |||
| 1446 | + | ) | |||
| 1447 | + | var ( | |||
| 1448 | + | xXGAppInfoDelete func(uintptr) bool | |||
| 1449 | + | XGAppInfoDup func(uintptr) uintptr = func(instance uintptr) uintptr { | |||
| 1450 | + | core.LazyRegister(&xXGAppInfoDup, "GIO", "g_app_info_dup", false) | |||
| 1451 | + | return xXGAppInfoDup(instance) | |||
| 1452 | + | } | |||
| 1453 | + | ) | |||
| 1454 | + | var ( | |||
| 1455 | + | xXGAppInfoDup func(uintptr) uintptr | |||
| 1456 | + | XGAppInfoEqual func(uintptr, uintptr) bool = func(instance uintptr, Appinfo2Varp uintptr) bool { | |||
| 1457 | + | core.LazyRegister(&xXGAppInfoEqual, "GIO", "g_app_info_equal", false) | |||
| 1458 | + | return xXGAppInfoEqual(instance, Appinfo2Varp) | |||
| 1459 | + | } | |||
| 1460 | + | ) | |||
| 1461 | + | var ( | |||
| 1462 | + | xXGAppInfoEqual func(uintptr, uintptr) bool | |||
| 1463 | + | XGAppInfoGetCommandline func(uintptr) string = func(instance uintptr) string { | |||
| 1464 | + | core.LazyRegister(&xXGAppInfoGetCommandline, "GIO", "g_app_info_get_commandline", false) | |||
| 1465 | + | return xXGAppInfoGetCommandline(instance) | |||
| 1466 | + | } | |||
| 1467 | + | ) | |||
| 1468 | + | var ( | |||
| 1469 | + | xXGAppInfoGetCommandline func(uintptr) string | |||
| 1470 | + | XGAppInfoGetDescription func(uintptr) string = func(instance uintptr) string { | |||
| 1471 | + | core.LazyRegister(&xXGAppInfoGetDescription, "GIO", "g_app_info_get_description", false) | |||
| 1472 | + | return xXGAppInfoGetDescription(instance) | |||
| 1473 | + | } | |||
| 1474 | + | ) | |||
| 1475 | + | var ( | |||
| 1476 | + | xXGAppInfoGetDescription func(uintptr) string | |||
| 1477 | + | XGAppInfoGetDisplayName func(uintptr) string = func(instance uintptr) string { | |||
| 1478 | + | core.LazyRegister(&xXGAppInfoGetDisplayName, "GIO", "g_app_info_get_display_name", false) | |||
| 1479 | + | return xXGAppInfoGetDisplayName(instance) | |||
| 1480 | + | } | |||
| 1481 | + | ) | |||
| 1482 | + | var ( | |||
| 1483 | + | xXGAppInfoGetDisplayName func(uintptr) string | |||
| 1484 | + | XGAppInfoGetExecutable func(uintptr) string = func(instance uintptr) string { | |||
| 1485 | + | core.LazyRegister(&xXGAppInfoGetExecutable, "GIO", "g_app_info_get_executable", false) | |||
| 1486 | + | return xXGAppInfoGetExecutable(instance) | |||
| 1487 | + | } | |||
| 1488 | + | ) | |||
| 1489 | + | var ( | |||
| 1490 | + | xXGAppInfoGetExecutable func(uintptr) string | |||
| 1491 | + | XGAppInfoGetIcon func(uintptr) uintptr = func(instance uintptr) uintptr { | |||
| 1492 | + | core.LazyRegister(&xXGAppInfoGetIcon, "GIO", "g_app_info_get_icon", false) | |||
| 1493 | + | return xXGAppInfoGetIcon(instance) | |||
| 1494 | + | } | |||
| 1495 | + | ) | |||
| 1496 | + | var ( | |||
| 1497 | + | xXGAppInfoGetIcon func(uintptr) uintptr | |||
| 1498 | + | XGAppInfoGetId func(uintptr) string = func(instance uintptr) string { | |||
| 1499 | + | core.LazyRegister(&xXGAppInfoGetId, "GIO", "g_app_info_get_id", false) | |||
| 1500 | + | return xXGAppInfoGetId(instance) | |||
| 1501 | + | } | |||
| 1502 | + | ) | |||
| 1503 | + | var ( | |||
| 1504 | + | xXGAppInfoGetId func(uintptr) string | |||
| 1505 | + | XGAppInfoGetName func(uintptr) string = func(instance uintptr) string { | |||
| 1506 | + | core.LazyRegister(&xXGAppInfoGetName, "GIO", "g_app_info_get_name", false) | |||
| 1507 | + | return xXGAppInfoGetName(instance) | |||
| 1508 | + | } | |||
| 1509 | + | ) | |||
| 1412 | var ( | 1510 | var ( | ||
| 1413 | - | XGAppInfoAddSupportsType func(uintptr, string, **glib.Error) bool | 1511 | + | xXGAppInfoGetName func(uintptr) string |
| 1414 | - | XGAppInfoCanDelete func(uintptr) bool | 1512 | + | XGAppInfoGetSupportedTypes func(uintptr) []string = func(instance uintptr) []string { |
| 1415 | - | XGAppInfoCanRemoveSupportsType func(uintptr) bool | 1513 | + | core.LazyRegister(&xXGAppInfoGetSupportedTypes, "GIO", "g_app_info_get_supported_types", false) |
| 1416 | - | XGAppInfoDelete func(uintptr) bool | 1514 | + | return xXGAppInfoGetSupportedTypes(instance) |
| 1417 | - | XGAppInfoDup func(uintptr) uintptr | 1515 | + | } |
| 1418 | - | XGAppInfoEqual func(uintptr, uintptr) bool | |||
| 1419 | - | XGAppInfoGetCommandline func(uintptr) string | |||
| 1420 | - | XGAppInfoGetDescription func(uintptr) string | |||
| 1421 | - | XGAppInfoGetDisplayName func(uintptr) string | |||
| 1422 | - | XGAppInfoGetExecutable func(uintptr) string | |||
| 1423 | - | XGAppInfoGetIcon func(uintptr) uintptr | |||
| 1424 | - | XGAppInfoGetId func(uintptr) string | |||
| 1425 | - | XGAppInfoGetName func(uintptr) string | |||
| 1426 | - | XGAppInfoGetSupportedTypes func(uintptr) []string | |||
| 1427 | - | XGAppInfoLaunch func(uintptr, *glib.List, uintptr, **glib.Error) bool | |||
| 1428 | - | XGAppInfoLaunchUris func(uintptr, *glib.List, uintptr, **glib.Error) bool | |||
| 1429 | - | XGAppInfoLaunchUrisAsync func(uintptr, *glib.List, uintptr, uintptr, uintptr, uintptr) | |||
| 1430 | - | XGAppInfoLaunchUrisFinish func(uintptr, uintptr, **glib.Error) bool | |||
| 1431 | - | XGAppInfoRemoveSupportsType func(uintptr, string, **glib.Error) bool | |||
| 1432 | - | XGAppInfoSetAsDefaultForExtension func(uintptr, string, **glib.Error) bool | |||
| 1433 | - | XGAppInfoSetAsDefaultForType func(uintptr, string, **glib.Error) bool | |||
| 1434 | - | XGAppInfoSetAsLastUsedForType func(uintptr, string, **glib.Error) bool | |||
| 1435 | - | XGAppInfoShouldShow func(uintptr) bool | |||
| 1436 | - | XGAppInfoSupportsFiles func(uintptr) bool | |||
| 1437 | - | XGAppInfoSupportsUris func(uintptr) bool | |||
| 1438 | ) | 1516 | ) | ||
| 1517 | + | var ( | |||
| 1518 | + | xXGAppInfoGetSupportedTypes func(uintptr) []string | |||
| 1519 | + | XGAppInfoLaunch func(uintptr, *glib.List, uintptr, **glib.Error) bool = func(instance uintptr, FilesVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool { | |||
| 1520 | + | core.LazyRegister(&xXGAppInfoLaunch, "GIO", "g_app_info_launch", false) | |||
| 1521 | + | return xXGAppInfoLaunch(instance, FilesVarp, ContextVarp, cerrp) | |||
| 1522 | + | } | |||
| 1523 | + | ) | |||
| 1524 | + | var ( | |||
| 1525 | + | xXGAppInfoLaunch func(uintptr, *glib.List, uintptr, **glib.Error) bool | |||
| 1526 | + | XGAppInfoLaunchUris func(uintptr, *glib.List, uintptr, **glib.Error) bool = func(instance uintptr, UrisVarp *glib.List, ContextVarp uintptr, cerrp **glib.Error) bool { | |||
| 1527 | + | core.LazyRegister(&xXGAppInfoLaunchUris, "GIO", "g_app_info_launch_uris", false) | |||
| 1528 | + | return xXGAppInfoLaunchUris(instance, UrisVarp, ContextVarp, cerrp) | |||
| 1529 | + | } | |||
| 1530 | + | ) | |||
| 1531 | + | var ( | |||
| 1532 | + | xXGAppInfoLaunchUris func(uintptr, *glib.List, uintptr, **glib.Error) bool | |||
| 1533 | + | XGAppInfoLaunchUrisAsync func(uintptr, *glib.List, uintptr, uintptr, uintptr, uintptr) = func(instance uintptr, UrisVarp *glib.List, ContextVarp uintptr, CancellableVarp uintptr, CallbackVarp uintptr, UserDataVarp uintptr) { | |||
| 1534 | + | core.LazyRegister(&xXGAppInfoLaunchUrisAsync, "GIO", "g_app_info_launch_uris_async", false) | |||
| 1535 | + | xXGAppInfoLaunchUrisAsync(instance, UrisVarp, ContextVarp, CancellableVarp, CallbackVarp, UserDataVarp) | |||
| 1536 | + | } | |||
| 1537 | + | ) | |||
| 1538 | + | var ( | |||
| 1539 | + | xXGAppInfoLaunchUrisAsync func(uintptr, *glib.List, uintptr, uintptr, uintptr, uintptr) | |||
| 1540 | + | XGAppInfoLaunchUrisFinish func(uintptr, uintptr, **glib.Error) bool = func(instance uintptr, ResultVarp uintptr, cerrp **glib.Error) bool { | |||
| 1541 | + | core.LazyRegister(&xXGAppInfoLaunchUrisFinish, "GIO", "g_app_info_launch_uris_finish", false) | |||
| 1542 | + | return xXGAppInfoLaunchUrisFinish(instance, ResultVarp, cerrp) | |||
| 1543 | + | } | |||
| 1544 | + | ) | |||
| 1545 | + | var ( | |||
| 1546 | + | xXGAppInfoLaunchUrisFinish func(uintptr, uintptr, **glib.Error) bool | |||
| 1547 | + | XGAppInfoRemoveSupportsType func(uintptr, string, **glib.Error) bool = func(instance uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |||
| 1548 | + | core.LazyRegister(&xXGAppInfoRemoveSupportsType, "GIO", "g_app_info_remove_supports_type", false) | |||
| 1549 | + | return xXGAppInfoRemoveSupportsType(instance, ContentTypeVarp, cerrp) | |||
| 1550 | + | } | |||
| 1551 | + | ) | |||
| 1552 | + | var ( | |||
| 1553 | + | xXGAppInfoRemoveSupportsType func(uintptr, string, **glib.Error) bool | |||
| 1554 | + | XGAppInfoSetAsDefaultForExtension func(uintptr, string, **glib.Error) bool = func(instance uintptr, ExtensionVarp string, cerrp **glib.Error) bool { | |||
| 1555 | + | core.LazyRegister(&xXGAppInfoSetAsDefaultForExtension, "GIO", "g_app_info_set_as_default_for_extension", false) | |||
| 1556 | + | return xXGAppInfoSetAsDefaultForExtension(instance, ExtensionVarp, cerrp) | |||
| 1557 | + | } | |||
| 1558 | + | ) | |||
| 1559 | + | var ( | |||
| 1560 | + | xXGAppInfoSetAsDefaultForExtension func(uintptr, string, **glib.Error) bool | |||
| 1561 | + | XGAppInfoSetAsDefaultForType func(uintptr, string, **glib.Error) bool = func(instance uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |||
| 1562 | + | core.LazyRegister(&xXGAppInfoSetAsDefaultForType, "GIO", "g_app_info_set_as_default_for_type", false) | |||
| 1563 | + | return xXGAppInfoSetAsDefaultForType(instance, ContentTypeVarp, cerrp) | |||
| 1564 | + | } | |||
| 1565 | + | ) | |||
| 1566 | + | var ( | |||
| 1567 | + | xXGAppInfoSetAsDefaultForType func(uintptr, string, **glib.Error) bool | |||
| 1568 | + | XGAppInfoSetAsLastUsedForType func(uintptr, string, **glib.Error) bool = func(instance uintptr, ContentTypeVarp string, cerrp **glib.Error) bool { | |||
| 1569 | + | core.LazyRegister(&xXGAppInfoSetAsLastUsedForType, "GIO", "g_app_info_set_as_last_used_for_type", false) | |||
| 1570 | + | return xXGAppInfoSetAsLastUsedForType(instance, ContentTypeVarp, cerrp) | |||
| 1571 | + | } | |||
| 1572 | + | ) | |||
| 1573 | + | var ( | |||
| 1574 | + | xXGAppInfoSetAsLastUsedForType func(uintptr, string, **glib.Error) bool | |||
| 1575 | + | XGAppInfoShouldShow func(uintptr) bool = func(instance uintptr) bool { | |||
| 1576 | + | core.LazyRegister(&xXGAppInfoShouldShow, "GIO", "g_app_info_should_show", false) | |||
| 1577 | + | return xXGAppInfoShouldShow(instance) | |||
| 1578 | + | } | |||
| 1579 | + | ) | |||
| 1580 | + | var ( | |||
| 1581 | + | xXGAppInfoShouldShow func(uintptr) bool | |||
| 1582 | + | XGAppInfoSupportsFiles func(uintptr) bool = func(instance uintptr) bool { | |||
| 1583 | + | core.LazyRegister(&xXGAppInfoSupportsFiles, "GIO", "g_app_info_supports_files", false) | |||
| 1584 | + | return xXGAppInfoSupportsFiles(instance) | |||
| 1585 | + | } | |||
| 1586 | + | ) | |||
| 1587 | + | var ( | |||
| 1588 | + | xXGAppInfoSupportsFiles func(uintptr) bool | |||
| 1589 | + | XGAppInfoSupportsUris func(uintptr) bool = func(instance uintptr) bool { | |||
| 1590 | + | core.LazyRegister(&xXGAppInfoSupportsUris, "GIO", "g_app_info_supports_uris", false) | |||
| 1591 | + | return xXGAppInfoSupportsUris(instance) | |||
| 1592 | + | } | |||
| 1593 | + | ) | |||
| 1594 | + | var xXGAppInfoSupportsUris func(uintptr) bool | |||
| 1439 | 1595 | ||||
| 1440 | var xAppInfoCreateFromCommandline func(string, uintptr, AppInfoCreateFlags, **glib.Error) uintptr | 1596 | var xAppInfoCreateFromCommandline func(string, uintptr, AppInfoCreateFlags, **glib.Error) uintptr | ||
| 1441 | 1597 | ||||
| @@ -1449,6 +1605,7 @@ var xAppInfoCreateFromCommandline func(string, uintptr, AppInfoCreateFlags, **gl | |||||
| 1449 | // [the specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html) | 1605 | // [the specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html) | ||
| 1450 | // for exact quoting rules. | 1606 | // for exact quoting rules. | ||
| 1451 | func AppInfoCreateFromCommandline(CommandlineVar string, ApplicationNameVar *string, FlagsVar AppInfoCreateFlags) (*AppInfoBase, error) { | 1607 | func AppInfoCreateFromCommandline(CommandlineVar string, ApplicationNameVar *string, FlagsVar AppInfoCreateFlags) (*AppInfoBase, error) { | ||
| 1608 | + | core.LazyRegister(&xAppInfoCreateFromCommandline, "GIO", "g_app_info_create_from_commandline", false) | |||
| 1452 | var cls *AppInfoBase | 1609 | var cls *AppInfoBase | ||
| 1453 | var cerr *glib.Error | 1610 | var cerr *glib.Error | ||
| 1454 | 1611 | ||||
| @@ -1484,6 +1641,8 @@ var xAppInfoGetAll func() uintptr | |||||
| 1484 | // [`Hidden` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-hidden) | 1641 | // [`Hidden` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-hidden) | ||
| 1485 | // set. | 1642 | // set. | ||
| 1486 | func AppInfoGetAll() *glib.List { | 1643 | func AppInfoGetAll() *glib.List { | ||
| 1644 | + | core.LazyRegister(&xAppInfoGetAll, "GIO", "g_app_info_get_all", false) | |||
| 1645 | + | ||||
| 1487 | cret := xAppInfoGetAll() | 1646 | cret := xAppInfoGetAll() | ||
| 1488 | if cret == 0 { | 1647 | if cret == 0 { | ||
| 1489 | return nil | 1648 | return nil | ||
| @@ -1498,6 +1657,8 @@ var xAppInfoGetAllForType func(string) uintptr | |||||
| 1498 | // [func@Gio.AppInfo.get_recommended_for_type] and | 1657 | // [func@Gio.AppInfo.get_recommended_for_type] and | ||
| 1499 | // [func@Gio.AppInfo.get_fallback_for_type]. | 1658 | // [func@Gio.AppInfo.get_fallback_for_type]. | ||
| 1500 | func AppInfoGetAllForType(ContentTypeVar string) *glib.List { | 1659 | func AppInfoGetAllForType(ContentTypeVar string) *glib.List { | ||
| 1660 | + | core.LazyRegister(&xAppInfoGetAllForType, "GIO", "g_app_info_get_all_for_type", false) | |||
| 1661 | + | ||||
| 1501 | cret := xAppInfoGetAllForType(ContentTypeVar) | 1662 | cret := xAppInfoGetAllForType(ContentTypeVar) | ||
| 1502 | if cret == 0 { | 1663 | if cret == 0 { | ||
| 1503 | return nil | 1664 | return nil | ||
| @@ -1509,6 +1670,7 @@ var xAppInfoGetDefaultForType func(string, bool) uintptr | |||||
| 1509 | 1670 | ||||
| 1510 | // Gets the default [iface@Gio.AppInfo] for a given content type. | 1671 | // Gets the default [iface@Gio.AppInfo] for a given content type. | ||
| 1511 | func AppInfoGetDefaultForType(ContentTypeVar string, MustSupportUrisVar bool) *AppInfoBase { | 1672 | func AppInfoGetDefaultForType(ContentTypeVar string, MustSupportUrisVar bool) *AppInfoBase { | ||
| 1673 | + | core.LazyRegister(&xAppInfoGetDefaultForType, "GIO", "g_app_info_get_default_for_type", false) | |||
| 1512 | var cls *AppInfoBase | 1674 | var cls *AppInfoBase | ||
| 1513 | 1675 | ||||
| 1514 | cret := xAppInfoGetDefaultForType(ContentTypeVar, MustSupportUrisVar) | 1676 | cret := xAppInfoGetDefaultForType(ContentTypeVar, MustSupportUrisVar) | ||
| @@ -1526,6 +1688,8 @@ var xAppInfoGetDefaultForTypeAsync func(string, bool, uintptr, uintptr, uintptr) | |||||
| 1526 | // Asynchronously gets the default [iface@Gio.AppInfo] for a given content | 1688 | // Asynchronously gets the default [iface@Gio.AppInfo] for a given content | ||
| 1527 | // type. | 1689 | // type. | ||
| 1528 | func AppInfoGetDefaultForTypeAsync(ContentTypeVar string, MustSupportUrisVar bool, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 1690 | func AppInfoGetDefaultForTypeAsync(ContentTypeVar string, MustSupportUrisVar bool, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 1691 | + | core.LazyRegister(&xAppInfoGetDefaultForTypeAsync, "GIO", "g_app_info_get_default_for_type_async", false) | |||
| 1692 | + | ||||
| 1529 | xAppInfoGetDefaultForTypeAsync(ContentTypeVar, MustSupportUrisVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 1693 | xAppInfoGetDefaultForTypeAsync(ContentTypeVar, MustSupportUrisVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 1530 | } | 1694 | } | ||
| 1531 | 1695 | ||||
| @@ -1537,6 +1701,7 @@ var xAppInfoGetDefaultForTypeFinish func(uintptr, **glib.Error) uintptr | |||||
| 1537 | // If no #[iface@Gio.AppInfo] is found, then @error will be set to | 1701 | // If no #[iface@Gio.AppInfo] is found, then @error will be set to | ||
| 1538 | // [error@Gio.IOErrorEnum.NOT_FOUND]. | 1702 | // [error@Gio.IOErrorEnum.NOT_FOUND]. | ||
| 1539 | func AppInfoGetDefaultForTypeFinish(ResultVar AsyncResult) (*AppInfoBase, error) { | 1703 | func AppInfoGetDefaultForTypeFinish(ResultVar AsyncResult) (*AppInfoBase, error) { | ||
| 1704 | + | core.LazyRegister(&xAppInfoGetDefaultForTypeFinish, "GIO", "g_app_info_get_default_for_type_finish", false) | |||
| 1540 | var cls *AppInfoBase | 1705 | var cls *AppInfoBase | ||
| 1541 | var cerr *glib.Error | 1706 | var cerr *glib.Error | ||
| 1542 | 1707 | ||||
| @@ -1560,6 +1725,7 @@ var xAppInfoGetDefaultForUriScheme func(string) uintptr | |||||
| 1560 | // A URI scheme is the initial part of the URI, up to but not including the `:`. | 1725 | // A URI scheme is the initial part of the URI, up to but not including the `:`. | ||
| 1561 | // For example, `http`, `ftp` or `sip`. | 1726 | // For example, `http`, `ftp` or `sip`. | ||
| 1562 | func AppInfoGetDefaultForUriScheme(UriSchemeVar string) *AppInfoBase { | 1727 | func AppInfoGetDefaultForUriScheme(UriSchemeVar string) *AppInfoBase { | ||
| 1728 | + | core.LazyRegister(&xAppInfoGetDefaultForUriScheme, "GIO", "g_app_info_get_default_for_uri_scheme", false) | |||
| 1563 | var cls *AppInfoBase | 1729 | var cls *AppInfoBase | ||
| 1564 | 1730 | ||||
| 1565 | cret := xAppInfoGetDefaultForUriScheme(UriSchemeVar) | 1731 | cret := xAppInfoGetDefaultForUriScheme(UriSchemeVar) | ||
| @@ -1579,6 +1745,8 @@ var xAppInfoGetDefaultForUriSchemeAsync func(string, uintptr, uintptr, uintptr) | |||||
| 1579 | // of the URI, up to but not including the `:`, e.g. `http`, | 1745 | // of the URI, up to but not including the `:`, e.g. `http`, | ||
| 1580 | // `ftp` or `sip`. | 1746 | // `ftp` or `sip`. | ||
| 1581 | func AppInfoGetDefaultForUriSchemeAsync(UriSchemeVar string, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 1747 | func AppInfoGetDefaultForUriSchemeAsync(UriSchemeVar string, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 1748 | + | core.LazyRegister(&xAppInfoGetDefaultForUriSchemeAsync, "GIO", "g_app_info_get_default_for_uri_scheme_async", false) | |||
| 1749 | + | ||||
| 1582 | xAppInfoGetDefaultForUriSchemeAsync(UriSchemeVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 1750 | xAppInfoGetDefaultForUriSchemeAsync(UriSchemeVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 1583 | } | 1751 | } | ||
| 1584 | 1752 | ||||
| @@ -1590,6 +1758,7 @@ var xAppInfoGetDefaultForUriSchemeFinish func(uintptr, **glib.Error) uintptr | |||||
| 1590 | // If no [iface@Gio.AppInfo] is found, then @error will be set to | 1758 | // If no [iface@Gio.AppInfo] is found, then @error will be set to | ||
| 1591 | // [error@Gio.IOErrorEnum.NOT_FOUND]. | 1759 | // [error@Gio.IOErrorEnum.NOT_FOUND]. | ||
| 1592 | func AppInfoGetDefaultForUriSchemeFinish(ResultVar AsyncResult) (*AppInfoBase, error) { | 1760 | func AppInfoGetDefaultForUriSchemeFinish(ResultVar AsyncResult) (*AppInfoBase, error) { | ||
| 1761 | + | core.LazyRegister(&xAppInfoGetDefaultForUriSchemeFinish, "GIO", "g_app_info_get_default_for_uri_scheme_finish", false) | |||
| 1593 | var cls *AppInfoBase | 1762 | var cls *AppInfoBase | ||
| 1594 | var cerr *glib.Error | 1763 | var cerr *glib.Error | ||
| 1595 | 1764 | ||||
| @@ -1612,6 +1781,8 @@ var xAppInfoGetFallbackForType func(string) uintptr | |||||
| 1612 | // those applications which claim to support the given content type by MIME | 1781 | // those applications which claim to support the given content type by MIME | ||
| 1613 | // type subclassing and not directly. | 1782 | // type subclassing and not directly. | ||
| 1614 | func AppInfoGetFallbackForType(ContentTypeVar string) *glib.List { | 1783 | func AppInfoGetFallbackForType(ContentTypeVar string) *glib.List { | ||
| 1784 | + | core.LazyRegister(&xAppInfoGetFallbackForType, "GIO", "g_app_info_get_fallback_for_type", false) | |||
| 1785 | + | ||||
| 1615 | cret := xAppInfoGetFallbackForType(ContentTypeVar) | 1786 | cret := xAppInfoGetFallbackForType(ContentTypeVar) | ||
| 1616 | if cret == 0 { | 1787 | if cret == 0 { | ||
| 1617 | return nil | 1788 | return nil | ||
| @@ -1629,6 +1800,8 @@ var xAppInfoGetRecommendedForType func(string) uintptr | |||||
| 1629 | // the last one for which [method@Gio.AppInfo.set_as_last_used_for_type] has | 1800 | // the last one for which [method@Gio.AppInfo.set_as_last_used_for_type] has | ||
| 1630 | // been called. | 1801 | // been called. | ||
| 1631 | func AppInfoGetRecommendedForType(ContentTypeVar string) *glib.List { | 1802 | func AppInfoGetRecommendedForType(ContentTypeVar string) *glib.List { | ||
| 1803 | + | core.LazyRegister(&xAppInfoGetRecommendedForType, "GIO", "g_app_info_get_recommended_for_type", false) | |||
| 1804 | + | ||||
| 1632 | cret := xAppInfoGetRecommendedForType(ContentTypeVar) | 1805 | cret := xAppInfoGetRecommendedForType(ContentTypeVar) | ||
| 1633 | if cret == 0 { | 1806 | if cret == 0 { | ||
| 1634 | return nil | 1807 | return nil | ||
| @@ -1646,6 +1819,7 @@ var xAppInfoLaunchDefaultForUri func(string, uintptr, **glib.Error) bool | |||||
| 1646 | // terminates too soon after this function. To prevent this, use | 1819 | // terminates too soon after this function. To prevent this, use | ||
| 1647 | // [func@Gio.AppInfo.launch_default_for_uri_async] instead. | 1820 | // [func@Gio.AppInfo.launch_default_for_uri_async] instead. | ||
| 1648 | func AppInfoLaunchDefaultForUri(UriVar string, ContextVar *AppLaunchContext) (bool, error) { | 1821 | func AppInfoLaunchDefaultForUri(UriVar string, ContextVar *AppLaunchContext) (bool, error) { | ||
| 1822 | + | core.LazyRegister(&xAppInfoLaunchDefaultForUri, "GIO", "g_app_info_launch_default_for_uri", false) | |||
| 1649 | var cerr *glib.Error | 1823 | var cerr *glib.Error | ||
| 1650 | 1824 | ||||
| 1651 | cret := xAppInfoLaunchDefaultForUri(UriVar, ContextVar.GoPointer(), &cerr) | 1825 | cret := xAppInfoLaunchDefaultForUri(UriVar, ContextVar.GoPointer(), &cerr) | ||
| @@ -1667,6 +1841,8 @@ var xAppInfoLaunchDefaultForUriAsync func(string, uintptr, uintptr, uintptr, uin | |||||
| 1667 | // applications are really started before termination and if you are interested | 1841 | // applications are really started before termination and if you are interested | ||
| 1668 | // in receiving error information from their activation. | 1842 | // in receiving error information from their activation. | ||
| 1669 | func AppInfoLaunchDefaultForUriAsync(UriVar string, ContextVar *AppLaunchContext, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 1843 | func AppInfoLaunchDefaultForUriAsync(UriVar string, ContextVar *AppLaunchContext, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 1844 | + | core.LazyRegister(&xAppInfoLaunchDefaultForUriAsync, "GIO", "g_app_info_launch_default_for_uri_async", false) | |||
| 1845 | + | ||||
| 1670 | xAppInfoLaunchDefaultForUriAsync(UriVar, ContextVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 1846 | xAppInfoLaunchDefaultForUriAsync(UriVar, ContextVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 1671 | } | 1847 | } | ||
| 1672 | 1848 | ||||
| @@ -1674,6 +1850,7 @@ var xAppInfoLaunchDefaultForUriFinish func(uintptr, **glib.Error) bool | |||||
| 1674 | 1850 | ||||
| 1675 | // Finishes an asynchronous launch-default-for-uri operation. | 1851 | // Finishes an asynchronous launch-default-for-uri operation. | ||
| 1676 | func AppInfoLaunchDefaultForUriFinish(ResultVar AsyncResult) (bool, error) { | 1852 | func AppInfoLaunchDefaultForUriFinish(ResultVar AsyncResult) (bool, error) { | ||
| 1853 | + | core.LazyRegister(&xAppInfoLaunchDefaultForUriFinish, "GIO", "g_app_info_launch_default_for_uri_finish", false) | |||
| 1677 | var cerr *glib.Error | 1854 | var cerr *glib.Error | ||
| 1678 | 1855 | ||||
| 1679 | cret := xAppInfoLaunchDefaultForUriFinish(ResultVar.GoPointer(), &cerr) | 1856 | cret := xAppInfoLaunchDefaultForUriFinish(ResultVar.GoPointer(), &cerr) | ||
| @@ -1691,6 +1868,8 @@ var xAppInfoResetTypeAssociations func(string) | |||||
| 1691 | // [method@Gio.AppInfo.add_supports_type] or | 1868 | // [method@Gio.AppInfo.add_supports_type] or | ||
| 1692 | // [method@Gio.AppInfo.remove_supports_type]. | 1869 | // [method@Gio.AppInfo.remove_supports_type]. | ||
| 1693 | func AppInfoResetTypeAssociations(ContentTypeVar string) { | 1870 | func AppInfoResetTypeAssociations(ContentTypeVar string) { | ||
| 1871 | + | core.LazyRegister(&xAppInfoResetTypeAssociations, "GIO", "g_app_info_reset_type_associations", false) | |||
| 1872 | + | ||||
| 1694 | xAppInfoResetTypeAssociations(ContentTypeVar) | 1873 | xAppInfoResetTypeAssociations(ContentTypeVar) | ||
| 1695 | } | 1874 | } | ||
| 1696 | 1875 | ||||
| @@ -1740,6 +1919,7 @@ type AppInfoMonitor struct { | |||||
| 1740 | var xAppInfoMonitorGLibType func() types.GType | 1919 | var xAppInfoMonitorGLibType func() types.GType | ||
| 1741 | 1920 | ||||
| 1742 | func AppInfoMonitorGLibType() types.GType { | 1921 | func AppInfoMonitorGLibType() types.GType { | ||
| 1922 | + | core.LazyRegister(&xAppInfoMonitorGLibType, "GIO", "g_app_info_monitor_get_type", false) | |||
| 1743 | return xAppInfoMonitorGLibType() | 1923 | return xAppInfoMonitorGLibType() | ||
| 1744 | } | 1924 | } | ||
| 1745 | 1925 | ||||
| @@ -1800,6 +1980,7 @@ var xAppInfoMonitorGet func() uintptr | |||||
| 1800 | // You must only call g_object_unref() on the return value from under | 1980 | // You must only call g_object_unref() on the return value from under | ||
| 1801 | // the same main context as you created it. | 1981 | // the same main context as you created it. | ||
| 1802 | func AppInfoMonitorGet() *AppInfoMonitor { | 1982 | func AppInfoMonitorGet() *AppInfoMonitor { | ||
| 1983 | + | core.LazyRegister(&xAppInfoMonitorGet, "GIO", "g_app_info_monitor_get", false) | |||
| 1803 | var cls *AppInfoMonitor | 1984 | var cls *AppInfoMonitor | ||
| 1804 | 1985 | ||||
| 1805 | cret := xAppInfoMonitorGet() | 1986 | cret := xAppInfoMonitorGet() | ||
| @@ -1822,6 +2003,7 @@ type AppLaunchContext struct { | |||||
| 1822 | var xAppLaunchContextGLibType func() types.GType | 2003 | var xAppLaunchContextGLibType func() types.GType | ||
| 1823 | 2004 | ||||
| 1824 | func AppLaunchContextGLibType() types.GType { | 2005 | func AppLaunchContextGLibType() types.GType { | ||
| 2006 | + | core.LazyRegister(&xAppLaunchContextGLibType, "GIO", "g_app_launch_context_get_type", false) | |||
| 1825 | return xAppLaunchContextGLibType() | 2007 | return xAppLaunchContextGLibType() | ||
| 1826 | } | 2008 | } | ||
| 1827 | 2009 | ||||
| @@ -1837,6 +2019,7 @@ var xNewAppLaunchContext func() uintptr | |||||
| 1837 | // instead you instantiate a subclass of this, such as | 2019 | // instead you instantiate a subclass of this, such as | ||
| 1838 | // [`GdkAppLaunchContext`](https://docs.gtk.org/gdk4/class.AppLaunchContext.html). | 2020 | // [`GdkAppLaunchContext`](https://docs.gtk.org/gdk4/class.AppLaunchContext.html). | ||
| 1839 | func NewAppLaunchContext() *AppLaunchContext { | 2021 | func NewAppLaunchContext() *AppLaunchContext { | ||
| 2022 | + | core.LazyRegister(&xNewAppLaunchContext, "GIO", "g_app_launch_context_new", false) | |||
| 1840 | var cls *AppLaunchContext | 2023 | var cls *AppLaunchContext | ||
| 1841 | 2024 | ||||
| 1842 | cret := xNewAppLaunchContext() | 2025 | cret := xNewAppLaunchContext() | ||
| @@ -1855,6 +2038,8 @@ var xAppLaunchContextGetDisplay func(uintptr, uintptr, *glib.List) string | |||||
| 1855 | // applications are started on the same display as the launching | 2038 | // applications are started on the same display as the launching | ||
| 1856 | // application, by setting the `DISPLAY` environment variable. | 2039 | // application, by setting the `DISPLAY` environment variable. | ||
| 1857 | func (x *AppLaunchContext) GetDisplay(InfoVar AppInfo, FilesVar *glib.List) string { | 2040 | func (x *AppLaunchContext) GetDisplay(InfoVar AppInfo, FilesVar *glib.List) string { | ||
| 2041 | + | core.LazyRegister(&xAppLaunchContextGetDisplay, "GIO", "g_app_launch_context_get_display", false) | |||
| 2042 | + | ||||
| 1858 | cret := xAppLaunchContextGetDisplay(x.GoPointer(), InfoVar.GoPointer(), FilesVar) | 2043 | cret := xAppLaunchContextGetDisplay(x.GoPointer(), InfoVar.GoPointer(), FilesVar) | ||
| 1859 | return cret | 2044 | return cret | ||
| 1860 | } | 2045 | } | ||
| @@ -1866,6 +2051,8 @@ var xAppLaunchContextGetEnvironment func(uintptr) []string | |||||
| 1866 | // This is a `NULL`-terminated array of strings, where each string has | 2051 | // This is a `NULL`-terminated array of strings, where each string has | ||
| 1867 | // the form `KEY=VALUE`. | 2052 | // the form `KEY=VALUE`. | ||
| 1868 | func (x *AppLaunchContext) GetEnvironment() []string { | 2053 | func (x *AppLaunchContext) GetEnvironment() []string { | ||
| 2054 | + | core.LazyRegister(&xAppLaunchContextGetEnvironment, "GIO", "g_app_launch_context_get_environment", false) | |||
| 2055 | + | ||||
| 1869 | cret := xAppLaunchContextGetEnvironment(x.GoPointer()) | 2056 | cret := xAppLaunchContextGetEnvironment(x.GoPointer()) | ||
| 1870 | return cret | 2057 | return cret | ||
| 1871 | } | 2058 | } | ||
| @@ -1888,6 +2075,8 @@ var xAppLaunchContextGetStartupNotifyId func(uintptr, uintptr, *glib.List) strin | |||||
| 1888 | // Since GLib 2.82 @info and @files can be `NULL`. If that’s not supported by the backend, | 2075 | // Since GLib 2.82 @info and @files can be `NULL`. If that’s not supported by the backend, | ||
| 1889 | // the returned token will be `NULL`. | 2076 | // the returned token will be `NULL`. | ||
| 1890 | func (x *AppLaunchContext) GetStartupNotifyId(InfoVar AppInfo, FilesVar *glib.List) string { | 2077 | func (x *AppLaunchContext) GetStartupNotifyId(InfoVar AppInfo, FilesVar *glib.List) string { | ||
| 2078 | + | core.LazyRegister(&xAppLaunchContextGetStartupNotifyId, "GIO", "g_app_launch_context_get_startup_notify_id", false) | |||
| 2079 | + | ||||
| 1891 | cret := xAppLaunchContextGetStartupNotifyId(x.GoPointer(), InfoVar.GoPointer(), FilesVar) | 2080 | cret := xAppLaunchContextGetStartupNotifyId(x.GoPointer(), InfoVar.GoPointer(), FilesVar) | ||
| 1892 | return cret | 2081 | return cret | ||
| 1893 | } | 2082 | } | ||
| @@ -1898,6 +2087,8 @@ var xAppLaunchContextLaunchFailed func(uintptr, string) | |||||
| 1898 | // the application startup notification started in | 2087 | // the application startup notification started in | ||
| 1899 | // [method@Gio.AppLaunchContext.get_startup_notify_id]. | 2088 | // [method@Gio.AppLaunchContext.get_startup_notify_id]. | ||
| 1900 | func (x *AppLaunchContext) LaunchFailed(StartupNotifyIdVar string) { | 2089 | func (x *AppLaunchContext) LaunchFailed(StartupNotifyIdVar string) { | ||
| 2090 | + | core.LazyRegister(&xAppLaunchContextLaunchFailed, "GIO", "g_app_launch_context_launch_failed", false) | |||
| 2091 | + | ||||
| 1901 | xAppLaunchContextLaunchFailed(x.GoPointer(), StartupNotifyIdVar) | 2092 | xAppLaunchContextLaunchFailed(x.GoPointer(), StartupNotifyIdVar) | ||
| 1902 | } | 2093 | } | ||
| 1903 | 2094 | ||||
| @@ -1906,6 +2097,8 @@ var xAppLaunchContextSetenv func(uintptr, string, string) | |||||
| 1906 | // Arranges for @variable to be set to @value in the child’s environment when | 2097 | // Arranges for @variable to be set to @value in the child’s environment when | ||
| 1907 | // @context is used to launch an application. | 2098 | // @context is used to launch an application. | ||
| 1908 | func (x *AppLaunchContext) Setenv(VariableVar string, ValueVar string) { | 2099 | func (x *AppLaunchContext) Setenv(VariableVar string, ValueVar string) { | ||
| 2100 | + | core.LazyRegister(&xAppLaunchContextSetenv, "GIO", "g_app_launch_context_setenv", false) | |||
| 2101 | + | ||||
| 1909 | xAppLaunchContextSetenv(x.GoPointer(), VariableVar, ValueVar) | 2102 | xAppLaunchContextSetenv(x.GoPointer(), VariableVar, ValueVar) | ||
| 1910 | } | 2103 | } | ||
| 1911 | 2104 | ||||
| @@ -1914,6 +2107,8 @@ var xAppLaunchContextUnsetenv func(uintptr, string) | |||||
| 1914 | // Arranges for @variable to be unset in the child’s environment when @context | 2107 | // Arranges for @variable to be unset in the child’s environment when @context | ||
| 1915 | // is used to launch an application. | 2108 | // is used to launch an application. | ||
| 1916 | func (x *AppLaunchContext) Unsetenv(VariableVar string) { | 2109 | func (x *AppLaunchContext) Unsetenv(VariableVar string) { | ||
| 2110 | + | core.LazyRegister(&xAppLaunchContextUnsetenv, "GIO", "g_app_launch_context_unsetenv", false) | |||
| 2111 | + | ||||
| 1917 | xAppLaunchContextUnsetenv(x.GoPointer(), VariableVar) | 2112 | xAppLaunchContextUnsetenv(x.GoPointer(), VariableVar) | ||
| 1918 | } | 2113 | } | ||
| 1919 | 2114 | ||||
| @@ -2044,71 +2239,4 @@ func (x *AppLaunchContext) ConnectLaunched(cb *func(AppLaunchContext, uintptr, u | |||||
| 2044 | func init() { | 2239 | func init() { | ||
| 2045 | core.SetPackageName("GIO", "gio-2.0") | 2240 | core.SetPackageName("GIO", "gio-2.0") | ||
| 2046 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | 2241 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | ||
| 2047 | - | var libs []uintptr | |||
| 2048 | - | for _, libPath := range core.GetPaths("GIO") { | |||
| 2049 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 2050 | - | if err != nil { | |||
| 2051 | - | panic(err) | |||
| 2052 | - | } | |||
| 2053 | - | libs = append(libs, lib) | |||
| 2054 | - | } | |||
| 2055 | - | ||||
| 2056 | - | core.PuregoSafeRegister(&xAppInfoCreateFromCommandline, libs, "g_app_info_create_from_commandline") | |||
| 2057 | - | core.PuregoSafeRegister(&xAppInfoGetAll, libs, "g_app_info_get_all") | |||
| 2058 | - | core.PuregoSafeRegister(&xAppInfoGetAllForType, libs, "g_app_info_get_all_for_type") | |||
| 2059 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForType, libs, "g_app_info_get_default_for_type") | |||
| 2060 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForTypeAsync, libs, "g_app_info_get_default_for_type_async") | |||
| 2061 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForTypeFinish, libs, "g_app_info_get_default_for_type_finish") | |||
| 2062 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForUriScheme, libs, "g_app_info_get_default_for_uri_scheme") | |||
| 2063 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForUriSchemeAsync, libs, "g_app_info_get_default_for_uri_scheme_async") | |||
| 2064 | - | core.PuregoSafeRegister(&xAppInfoGetDefaultForUriSchemeFinish, libs, "g_app_info_get_default_for_uri_scheme_finish") | |||
| 2065 | - | core.PuregoSafeRegister(&xAppInfoGetFallbackForType, libs, "g_app_info_get_fallback_for_type") | |||
| 2066 | - | core.PuregoSafeRegister(&xAppInfoGetRecommendedForType, libs, "g_app_info_get_recommended_for_type") | |||
| 2067 | - | core.PuregoSafeRegister(&xAppInfoLaunchDefaultForUri, libs, "g_app_info_launch_default_for_uri") | |||
| 2068 | - | core.PuregoSafeRegister(&xAppInfoLaunchDefaultForUriAsync, libs, "g_app_info_launch_default_for_uri_async") | |||
| 2069 | - | core.PuregoSafeRegister(&xAppInfoLaunchDefaultForUriFinish, libs, "g_app_info_launch_default_for_uri_finish") | |||
| 2070 | - | core.PuregoSafeRegister(&xAppInfoResetTypeAssociations, libs, "g_app_info_reset_type_associations") | |||
| 2071 | - | ||||
| 2072 | - | core.PuregoSafeRegister(&xAppInfoMonitorGLibType, libs, "g_app_info_monitor_get_type") | |||
| 2073 | - | ||||
| 2074 | - | core.PuregoSafeRegister(&xAppInfoMonitorGet, libs, "g_app_info_monitor_get") | |||
| 2075 | - | ||||
| 2076 | - | core.PuregoSafeRegister(&xAppLaunchContextGLibType, libs, "g_app_launch_context_get_type") | |||
| 2077 | - | ||||
| 2078 | - | core.PuregoSafeRegister(&xNewAppLaunchContext, libs, "g_app_launch_context_new") | |||
| 2079 | - | ||||
| 2080 | - | core.PuregoSafeRegister(&xAppLaunchContextGetDisplay, libs, "g_app_launch_context_get_display") | |||
| 2081 | - | core.PuregoSafeRegister(&xAppLaunchContextGetEnvironment, libs, "g_app_launch_context_get_environment") | |||
| 2082 | - | core.PuregoSafeRegister(&xAppLaunchContextGetStartupNotifyId, libs, "g_app_launch_context_get_startup_notify_id") | |||
| 2083 | - | core.PuregoSafeRegister(&xAppLaunchContextLaunchFailed, libs, "g_app_launch_context_launch_failed") | |||
| 2084 | - | core.PuregoSafeRegister(&xAppLaunchContextSetenv, libs, "g_app_launch_context_setenv") | |||
| 2085 | - | core.PuregoSafeRegister(&xAppLaunchContextUnsetenv, libs, "g_app_launch_context_unsetenv") | |||
| 2086 | - | ||||
| 2087 | - | core.PuregoSafeRegister(&xAppInfoGLibType, libs, "g_app_info_get_type") | |||
| 2088 | - | ||||
| 2089 | - | core.PuregoSafeRegister(&XGAppInfoAddSupportsType, libs, "g_app_info_add_supports_type") | |||
| 2090 | - | core.PuregoSafeRegister(&XGAppInfoCanDelete, libs, "g_app_info_can_delete") | |||
| 2091 | - | core.PuregoSafeRegister(&XGAppInfoCanRemoveSupportsType, libs, "g_app_info_can_remove_supports_type") | |||
| 2092 | - | core.PuregoSafeRegister(&XGAppInfoDelete, libs, "g_app_info_delete") | |||
| 2093 | - | core.PuregoSafeRegister(&XGAppInfoDup, libs, "g_app_info_dup") | |||
| 2094 | - | core.PuregoSafeRegister(&XGAppInfoEqual, libs, "g_app_info_equal") | |||
| 2095 | - | core.PuregoSafeRegister(&XGAppInfoGetCommandline, libs, "g_app_info_get_commandline") | |||
| 2096 | - | core.PuregoSafeRegister(&XGAppInfoGetDescription, libs, "g_app_info_get_description") | |||
| 2097 | - | core.PuregoSafeRegister(&XGAppInfoGetDisplayName, libs, "g_app_info_get_display_name") | |||
| 2098 | - | core.PuregoSafeRegister(&XGAppInfoGetExecutable, libs, "g_app_info_get_executable") | |||
| 2099 | - | core.PuregoSafeRegister(&XGAppInfoGetIcon, libs, "g_app_info_get_icon") | |||
| 2100 | - | core.PuregoSafeRegister(&XGAppInfoGetId, libs, "g_app_info_get_id") | |||
| 2101 | - | core.PuregoSafeRegister(&XGAppInfoGetName, libs, "g_app_info_get_name") | |||
| 2102 | - | core.PuregoSafeRegister(&XGAppInfoGetSupportedTypes, libs, "g_app_info_get_supported_types") | |||
| 2103 | - | core.PuregoSafeRegister(&XGAppInfoLaunch, libs, "g_app_info_launch") | |||
| 2104 | - | core.PuregoSafeRegister(&XGAppInfoLaunchUris, libs, "g_app_info_launch_uris") | |||
| 2105 | - | core.PuregoSafeRegister(&XGAppInfoLaunchUrisAsync, libs, "g_app_info_launch_uris_async") | |||
| 2106 | - | core.PuregoSafeRegister(&XGAppInfoLaunchUrisFinish, libs, "g_app_info_launch_uris_finish") | |||
| 2107 | - | core.PuregoSafeRegister(&XGAppInfoRemoveSupportsType, libs, "g_app_info_remove_supports_type") | |||
| 2108 | - | core.PuregoSafeRegister(&XGAppInfoSetAsDefaultForExtension, libs, "g_app_info_set_as_default_for_extension") | |||
| 2109 | - | core.PuregoSafeRegister(&XGAppInfoSetAsDefaultForType, libs, "g_app_info_set_as_default_for_type") | |||
| 2110 | - | core.PuregoSafeRegister(&XGAppInfoSetAsLastUsedForType, libs, "g_app_info_set_as_last_used_for_type") | |||
| 2111 | - | core.PuregoSafeRegister(&XGAppInfoShouldShow, libs, "g_app_info_should_show") | |||
| 2112 | - | core.PuregoSafeRegister(&XGAppInfoSupportsFiles, libs, "g_app_info_supports_files") | |||
| 2113 | - | core.PuregoSafeRegister(&XGAppInfoSupportsUris, libs, "g_app_info_supports_uris") | |||
| 2114 | } | 2242 | } | ||