Merge pull request #344 from bnema/chore/upstream-foundations
chore(deps): integrate approved upstream foundations
921 files · +28709 -25527
M docs/first-presentation.md +5 -2
| @@ -46,5 +46,8 @@ labels. Set `DUMBER_MACHINE_GPU_PROFILE` to one of `generic-gpu`, | |||
| 46 | 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | |
| 47 | 47 | do not use a device model or other identifier. Publish only the seven reviewed | |
| 48 | 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | |
| 49 | - | must not be published. A missing or incomplete timeline, non-DMABUF backend, or | |
| 50 | - | invalid run fails collection. | |
| 49 | + | must not be published. `metadata.json` derives the selected | |
| 50 | + | `github.com/bnema/purego-cef2gtk` pseudo-version and its full immutable Git | |
| 51 | + | origin hash from Go module metadata; branch selectors or missing origin metadata | |
| 52 | + | fail collection. A missing or incomplete timeline, non-DMABUF backend, or invalid | |
| 53 | + | run also fails collection. | |
| @@ -46,5 +46,8 @@ labels. Set `DUMBER_MACHINE_GPU_PROFILE` to one of `generic-gpu`, | |||||
| 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | ||
| 47 | do not use a device model or other identifier. Publish only the seven reviewed | 47 | do not use a device model or other identifier. Publish only the seven reviewed | ||
| 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | ||
| 49 | - | must not be published. A missing or incomplete timeline, non-DMABUF backend, or | 49 | + | must not be published. `metadata.json` derives the selected |
| 50 | - | invalid run fails collection. | 50 | + | `github.com/bnema/purego-cef2gtk` pseudo-version and its full immutable Git |
| 51 | + | origin hash from Go module metadata; branch selectors or missing origin metadata | |||
| 52 | + | fail collection. A missing or incomplete timeline, non-DMABUF backend, or invalid | |||
| 53 | + | run also fails collection. | |||
M go.mod +5 -5
| @@ -6,11 +6,11 @@ require ( | |||
| 6 | 6 | github.com/a-h/templ v0.3.1020 | |
| 7 | 7 | github.com/andybalholm/brotli v1.2.2 | |
| 8 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | |
| 9 | - | github.com/bnema/purego-cef v0.13.3 | |
| 10 | - | github.com/bnema/purego-cef2gtk v0.8.4 | |
| 11 | - | github.com/bnema/purego-pipewire v0.1.4 | |
| 12 | - | github.com/bnema/purego-sqlite v0.1.3 | |
| 13 | - | github.com/bnema/puregotk v0.7.0 | |
| 9 | + | github.com/bnema/purego-cef v0.13.4-0.20260714140305-f0b7414af67e | |
| 10 | + | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe | |
| 11 | + | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | + | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | + | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | 14 | github.com/charmbracelet/bubbles v1.0.0 | |
| 15 | 15 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 16 | 16 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -6,11 +6,11 @@ require ( | |||||
| 6 | github.com/a-h/templ v0.3.1020 | 6 | github.com/a-h/templ v0.3.1020 | ||
| 7 | github.com/andybalholm/brotli v1.2.2 | 7 | github.com/andybalholm/brotli v1.2.2 | ||
| 8 | github.com/bnema/purego v0.11.0-bnema.4 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | ||
| 9 | - | github.com/bnema/purego-cef v0.13.3 | 9 | + | github.com/bnema/purego-cef v0.13.4-0.20260714140305-f0b7414af67e |
| 10 | - | github.com/bnema/purego-cef2gtk v0.8.4 | 10 | + | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe |
| 11 | - | github.com/bnema/purego-pipewire v0.1.4 | 11 | + | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a |
| 12 | - | github.com/bnema/purego-sqlite v0.1.3 | 12 | + | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c |
| 13 | - | github.com/bnema/puregotk v0.7.0 | 13 | + | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 |
| 14 | github.com/charmbracelet/bubbles v1.0.0 | 14 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 15 | github.com/charmbracelet/bubbletea v1.3.10 | 15 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 16 | github.com/charmbracelet/lipgloss v1.1.0 | 16 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +12 -0 generated file: collapsed
A internal/infrastructure/persistence/sqlite/history_repo_benchmark_test.go +71 -0
| @@ -0,0 +1,71 @@ | |||
| 1 | + | package sqlite_test | |
| 2 | + | ||
| 3 | + | import ( | |
| 4 | + | "fmt" | |
| 5 | + | "path/filepath" | |
| 6 | + | "testing" | |
| 7 | + | ||
| 8 | + | "github.com/bnema/dumber/internal/domain/entity" | |
| 9 | + | "github.com/bnema/dumber/internal/domain/repository" | |
| 10 | + | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | |
| 11 | + | ) | |
| 12 | + | ||
| 13 | + | // newHistoryBenchmarkRepository creates a representative local history corpus | |
| 14 | + | // outside the measured operation. Sidebar reads use GetRecent and omnibox | |
| 15 | + | // history suggestions use Search. | |
| 16 | + | func newHistoryBenchmarkRepository(b *testing.B) (repository.HistoryRepository, func()) { | |
| 17 | + | b.Helper() | |
| 18 | + | ||
| 19 | + | ctx := historyTestCtx() | |
| 20 | + | db, err := sqlite.NewConnection(ctx, filepath.Join(b.TempDir(), "dumber.db")) | |
| 21 | + | if err != nil { | |
| 22 | + | b.Fatal(err) | |
| 23 | + | } | |
| 24 | + | ||
| 25 | + | b.Cleanup(func() { | |
| 26 | + | if err := db.Close(); err != nil { | |
| 27 | + | b.Errorf("close benchmark database: %v", err) | |
| 28 | + | } | |
| 29 | + | }) | |
| 30 | + | ||
| 31 | + | repo := sqlite.NewHistoryRepository(db) | |
| 32 | + | for i := range 200 { | |
| 33 | + | entry := &entity.HistoryEntry{ | |
| 34 | + | URL: fmt.Sprintf("https://example%d.test/dumber/history/%d", i%20, i), | |
| 35 | + | Title: fmt.Sprintf("Dumber history entry %d", i), | |
| 36 | + | } | |
| 37 | + | if err := repo.Save(ctx, entry); err != nil { | |
| 38 | + | b.Fatal(err) | |
| 39 | + | } | |
| 40 | + | } | |
| 41 | + | ||
| 42 | + | return repo, func() {} | |
| 43 | + | } | |
| 44 | + | ||
| 45 | + | func BenchmarkHistorySQLiteSidebarRecent(b *testing.B) { | |
| 46 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |
| 47 | + | defer closeDB() | |
| 48 | + | ctx := historyTestCtx() | |
| 49 | + | ||
| 50 | + | b.ReportAllocs() | |
| 51 | + | b.ResetTimer() | |
| 52 | + | for range b.N { | |
| 53 | + | if _, err := repo.GetRecent(ctx, 50, 0); err != nil { | |
| 54 | + | b.Fatal(err) | |
| 55 | + | } | |
| 56 | + | } | |
| 57 | + | } | |
| 58 | + | ||
| 59 | + | func BenchmarkHistorySQLiteOmniboxSearch(b *testing.B) { | |
| 60 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |
| 61 | + | defer closeDB() | |
| 62 | + | ctx := historyTestCtx() | |
| 63 | + | ||
| 64 | + | b.ReportAllocs() | |
| 65 | + | b.ResetTimer() | |
| 66 | + | for range b.N { | |
| 67 | + | if _, err := repo.Search(ctx, "dumber history", 10); err != nil { | |
| 68 | + | b.Fatal(err) | |
| 69 | + | } | |
| 70 | + | } | |
| 71 | + | } | |
| @@ -0,0 +1,71 @@ | |||||
| 1 | + | package sqlite_test | |||
| 2 | + | ||||
| 3 | + | import ( | |||
| 4 | + | "fmt" | |||
| 5 | + | "path/filepath" | |||
| 6 | + | "testing" | |||
| 7 | + | ||||
| 8 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 9 | + | "github.com/bnema/dumber/internal/domain/repository" | |||
| 10 | + | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // newHistoryBenchmarkRepository creates a representative local history corpus | |||
| 14 | + | // outside the measured operation. Sidebar reads use GetRecent and omnibox | |||
| 15 | + | // history suggestions use Search. | |||
| 16 | + | func newHistoryBenchmarkRepository(b *testing.B) (repository.HistoryRepository, func()) { | |||
| 17 | + | b.Helper() | |||
| 18 | + | ||||
| 19 | + | ctx := historyTestCtx() | |||
| 20 | + | db, err := sqlite.NewConnection(ctx, filepath.Join(b.TempDir(), "dumber.db")) | |||
| 21 | + | if err != nil { | |||
| 22 | + | b.Fatal(err) | |||
| 23 | + | } | |||
| 24 | + | ||||
| 25 | + | b.Cleanup(func() { | |||
| 26 | + | if err := db.Close(); err != nil { | |||
| 27 | + | b.Errorf("close benchmark database: %v", err) | |||
| 28 | + | } | |||
| 29 | + | }) | |||
| 30 | + | ||||
| 31 | + | repo := sqlite.NewHistoryRepository(db) | |||
| 32 | + | for i := range 200 { | |||
| 33 | + | entry := &entity.HistoryEntry{ | |||
| 34 | + | URL: fmt.Sprintf("https://example%d.test/dumber/history/%d", i%20, i), | |||
| 35 | + | Title: fmt.Sprintf("Dumber history entry %d", i), | |||
| 36 | + | } | |||
| 37 | + | if err := repo.Save(ctx, entry); err != nil { | |||
| 38 | + | b.Fatal(err) | |||
| 39 | + | } | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | return repo, func() {} | |||
| 43 | + | } | |||
| 44 | + | ||||
| 45 | + | func BenchmarkHistorySQLiteSidebarRecent(b *testing.B) { | |||
| 46 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |||
| 47 | + | defer closeDB() | |||
| 48 | + | ctx := historyTestCtx() | |||
| 49 | + | ||||
| 50 | + | b.ReportAllocs() | |||
| 51 | + | b.ResetTimer() | |||
| 52 | + | for range b.N { | |||
| 53 | + | if _, err := repo.GetRecent(ctx, 50, 0); err != nil { | |||
| 54 | + | b.Fatal(err) | |||
| 55 | + | } | |||
| 56 | + | } | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | func BenchmarkHistorySQLiteOmniboxSearch(b *testing.B) { | |||
| 60 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |||
| 61 | + | defer closeDB() | |||
| 62 | + | ctx := historyTestCtx() | |||
| 63 | + | ||||
| 64 | + | b.ReportAllocs() | |||
| 65 | + | b.ResetTimer() | |||
| 66 | + | for range b.N { | |||
| 67 | + | if _, err := repo.Search(ctx, "dumber history", 10); err != nil { | |||
| 68 | + | b.Fatal(err) | |||
| 69 | + | } | |||
| 70 | + | } | |||
| 71 | + | } | |||
M internal/logging/first_presentation_collector_test.go +132 -1
| @@ -2,6 +2,7 @@ package logging | |||
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | 4 | "encoding/json" | |
| 5 | + | "fmt" | |
| 5 | 6 | "os" | |
| 6 | 7 | "os/exec" | |
| 7 | 8 | "path/filepath" | |
| @@ -143,8 +144,9 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||
| 143 | 144 | } | |
| 144 | 145 | for _, required := range []string{ | |
| 145 | 146 | `"measured_source_revision"`, | |
| 147 | + | `"version": "v0.8.4-0.20260714160309-bbd397409ebe"`, | |
| 146 | 148 | `"tag": "v0.8.4"`, | |
| 147 | - | `"revision": "f217ece342dea3ef2a3f98671fcd16a39ad0037d"`, | |
| 149 | + | `"revision": "bbd397409ebed75a5979c1e4566a2ef319f6a484"`, | |
| 148 | 150 | } { | |
| 149 | 151 | require.Contains(t, artifacts.String(), required) | |
| 150 | 152 | } | |
| @@ -166,6 +168,135 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||
| 166 | 168 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | |
| 167 | 169 | } | |
| 168 | 170 | ||
| 171 | + | func TestFirstPresentationCollectorDerivesSelectedImmutableModuleProvenance(t *testing.T) { | |
| 172 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 173 | + | require.NoError(t, err) | |
| 174 | + | temp := t.TempDir() | |
| 175 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |
| 176 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |
| 177 | + | binary := filepath.Join(temp, "dumber") | |
| 178 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |
| 179 | + | ||
| 180 | + | // This exact pseudo-version is deliberately newer than the former v0.8.4 | |
| 181 | + | // hardcode; the collector must report what the selected module says. | |
| 182 | + | const version = "v0.8.5-0.20300102030405-bbd397409ebe" | |
| 183 | + | const revision = "bbd397409ebed75a5979c1e4566a2ef319f6a484" | |
| 184 | + | goBin := collectorProvenanceGo(t, temp, version, revision, "") | |
| 185 | + | output := filepath.Join(temp, "artifacts") | |
| 186 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 187 | + | cmd.Dir = repoRoot | |
| 188 | + | cmd.Env = append(os.Environ(), | |
| 189 | + | "DISPLAY=:test", | |
| 190 | + | "DUMBER_CEF_DIR="+runtime, | |
| 191 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |
| 192 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |
| 193 | + | "DUMBER_FIRST_PRESENTATION_TIMEOUT_SECONDS=1", | |
| 194 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |
| 195 | + | ) | |
| 196 | + | result, err := cmd.CombinedOutput() | |
| 197 | + | require.NoErrorf(t, err, "collector failed: %s", result) | |
| 198 | + | ||
| 199 | + | var metadata struct { | |
| 200 | + | Upstream struct { | |
| 201 | + | Module string `json:"module"` | |
| 202 | + | Version string `json:"version"` | |
| 203 | + | Tag string `json:"tag"` | |
| 204 | + | Revision string `json:"revision"` | |
| 205 | + | } `json:"upstream"` | |
| 206 | + | } | |
| 207 | + | contents, err := os.ReadFile(filepath.Join(output, "metadata.json")) | |
| 208 | + | require.NoError(t, err) | |
| 209 | + | require.NoError(t, json.Unmarshal(contents, &metadata)) | |
| 210 | + | require.Equal(t, "github.com/bnema/purego-cef2gtk", metadata.Upstream.Module) | |
| 211 | + | require.Equal(t, version, metadata.Upstream.Version) | |
| 212 | + | require.Equal(t, "v0.8.5", metadata.Upstream.Tag) | |
| 213 | + | require.Equal(t, revision, metadata.Upstream.Revision) | |
| 214 | + | ||
| 215 | + | script, err := os.ReadFile(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 216 | + | require.NoError(t, err) | |
| 217 | + | require.NotContains(t, string(script), "f217ece342dea3ef2a3f98671fcd16a39ad0037d") | |
| 218 | + | } | |
| 219 | + | ||
| 220 | + | func TestFirstPresentationCollectorRejectsNonImmutableModuleProvenanceWithoutLeaks(t *testing.T) { | |
| 221 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 222 | + | require.NoError(t, err) | |
| 223 | + | ||
| 224 | + | for _, test := range []struct { | |
| 225 | + | name, version, revision, ref string | |
| 226 | + | }{ | |
| 227 | + | {name: "branch selector", version: "main", ref: "main"}, | |
| 228 | + | {name: "missing origin", version: "v0.8.5-0.20300102030405-bbd397409ebe"}, | |
| 229 | + | {name: "named origin ref", version: "v0.8.5-0.20300102030405-bbd397409ebe", revision: "bbd397409ebed75a5979c1e4566a2ef319f6a484", ref: "main"}, | |
| 230 | + | } { | |
| 231 | + | t.Run(test.name, func(t *testing.T) { | |
| 232 | + | temp := t.TempDir() | |
| 233 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |
| 234 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |
| 235 | + | binary := filepath.Join(temp, "dumber") | |
| 236 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |
| 237 | + | ||
| 238 | + | goBin := collectorProvenanceGo(t, temp, test.version, test.revision, test.ref) | |
| 239 | + | output := filepath.Join(temp, "artifacts") | |
| 240 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 241 | + | cmd.Dir = repoRoot | |
| 242 | + | cmd.Env = append(os.Environ(), | |
| 243 | + | "DISPLAY=:test", | |
| 244 | + | "DUMBER_CEF_DIR="+runtime, | |
| 245 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |
| 246 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |
| 247 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |
| 248 | + | ) | |
| 249 | + | result, runErr := cmd.CombinedOutput() | |
| 250 | + | require.Errorf(t, runErr, "collector accepted nonimmutable module provenance: %s", result) | |
| 251 | + | require.Contains(t, string(result), "immutable module provenance is unavailable") | |
| 252 | + | require.NotContains(t, string(result), temp) | |
| 253 | + | require.NoFileExists(t, filepath.Join(output, "metadata.json")) | |
| 254 | + | for _, name := range runArtifactNames() { | |
| 255 | + | require.NoFileExists(t, filepath.Join(output, name)) | |
| 256 | + | } | |
| 257 | + | }) | |
| 258 | + | } | |
| 259 | + | } | |
| 260 | + | ||
| 261 | + | func collectorProvenanceGo(t *testing.T, temp, version, revision, ref string) string { | |
| 262 | + | t.Helper() | |
| 263 | + | infoPath := filepath.Join(temp, "module.info") | |
| 264 | + | info := map[string]any{"Version": version} | |
| 265 | + | if revision != "" { | |
| 266 | + | info["Origin"] = map[string]string{ | |
| 267 | + | "VCS": "git", "URL": "https://github.com/bnema/purego-cef2gtk", "Hash": revision, "Ref": ref, | |
| 268 | + | } | |
| 269 | + | } | |
| 270 | + | infoJSON, err := json.Marshal(info) | |
| 271 | + | require.NoError(t, err) | |
| 272 | + | require.NoError(t, os.WriteFile(infoPath, infoJSON, 0o600)) | |
| 273 | + | ||
| 274 | + | selectedJSON, err := json.Marshal(map[string]string{ | |
| 275 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, | |
| 276 | + | }) | |
| 277 | + | require.NoError(t, err) | |
| 278 | + | downloadedJSON, err := json.Marshal(map[string]string{ | |
| 279 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, "Info": infoPath, | |
| 280 | + | }) | |
| 281 | + | require.NoError(t, err) | |
| 282 | + | binDir := filepath.Join(temp, "bin") | |
| 283 | + | require.NoError(t, os.Mkdir(binDir, 0o755)) | |
| 284 | + | goBin := filepath.Join(binDir, "go") | |
| 285 | + | script := fmt.Sprintf(`#!/bin/sh | |
| 286 | + | if [ "$1" = "list" ] && [ "$2" = "-m" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk" ]; then | |
| 287 | + | printf '%%s\n' '%s' | |
| 288 | + | exit 0 | |
| 289 | + | fi | |
| 290 | + | if [ "$1" = "mod" ] && [ "$2" = "download" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk@%s" ]; then | |
| 291 | + | printf '%%s\n' '%s' | |
| 292 | + | exit 0 | |
| 293 | + | fi | |
| 294 | + | exit 1 | |
| 295 | + | `, selectedJSON, version, downloadedJSON) | |
| 296 | + | require.NoError(t, os.WriteFile(goBin, []byte(script), 0o755)) | |
| 297 | + | return goBin | |
| 298 | + | } | |
| 299 | + | ||
| 169 | 300 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | |
| 170 | 301 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 171 | 302 | require.NoError(t, err) | |
| @@ -2,6 +2,7 @@ package logging | |||||
| 2 | 2 | ||||
| 3 | import ( | 3 | import ( | ||
| 4 | "encoding/json" | 4 | "encoding/json" | ||
| 5 | + | "fmt" | |||
| 5 | "os" | 6 | "os" | ||
| 6 | "os/exec" | 7 | "os/exec" | ||
| 7 | "path/filepath" | 8 | "path/filepath" | ||
| @@ -143,8 +144,9 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||||
| 143 | } | 144 | } | ||
| 144 | for _, required := range []string{ | 145 | for _, required := range []string{ | ||
| 145 | `"measured_source_revision"`, | 146 | `"measured_source_revision"`, | ||
| 147 | + | `"version": "v0.8.4-0.20260714160309-bbd397409ebe"`, | |||
| 146 | `"tag": "v0.8.4"`, | 148 | `"tag": "v0.8.4"`, | ||
| 147 | - | `"revision": "f217ece342dea3ef2a3f98671fcd16a39ad0037d"`, | 149 | + | `"revision": "bbd397409ebed75a5979c1e4566a2ef319f6a484"`, |
| 148 | } { | 150 | } { | ||
| 149 | require.Contains(t, artifacts.String(), required) | 151 | require.Contains(t, artifacts.String(), required) | ||
| 150 | } | 152 | } | ||
| @@ -166,6 +168,135 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||||
| 166 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | 168 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | ||
| 167 | } | 169 | } | ||
| 168 | 170 | ||||
| 171 | + | func TestFirstPresentationCollectorDerivesSelectedImmutableModuleProvenance(t *testing.T) { | |||
| 172 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |||
| 173 | + | require.NoError(t, err) | |||
| 174 | + | temp := t.TempDir() | |||
| 175 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |||
| 176 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |||
| 177 | + | binary := filepath.Join(temp, "dumber") | |||
| 178 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |||
| 179 | + | ||||
| 180 | + | // This exact pseudo-version is deliberately newer than the former v0.8.4 | |||
| 181 | + | // hardcode; the collector must report what the selected module says. | |||
| 182 | + | const version = "v0.8.5-0.20300102030405-bbd397409ebe" | |||
| 183 | + | const revision = "bbd397409ebed75a5979c1e4566a2ef319f6a484" | |||
| 184 | + | goBin := collectorProvenanceGo(t, temp, version, revision, "") | |||
| 185 | + | output := filepath.Join(temp, "artifacts") | |||
| 186 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 187 | + | cmd.Dir = repoRoot | |||
| 188 | + | cmd.Env = append(os.Environ(), | |||
| 189 | + | "DISPLAY=:test", | |||
| 190 | + | "DUMBER_CEF_DIR="+runtime, | |||
| 191 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |||
| 192 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |||
| 193 | + | "DUMBER_FIRST_PRESENTATION_TIMEOUT_SECONDS=1", | |||
| 194 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |||
| 195 | + | ) | |||
| 196 | + | result, err := cmd.CombinedOutput() | |||
| 197 | + | require.NoErrorf(t, err, "collector failed: %s", result) | |||
| 198 | + | ||||
| 199 | + | var metadata struct { | |||
| 200 | + | Upstream struct { | |||
| 201 | + | Module string `json:"module"` | |||
| 202 | + | Version string `json:"version"` | |||
| 203 | + | Tag string `json:"tag"` | |||
| 204 | + | Revision string `json:"revision"` | |||
| 205 | + | } `json:"upstream"` | |||
| 206 | + | } | |||
| 207 | + | contents, err := os.ReadFile(filepath.Join(output, "metadata.json")) | |||
| 208 | + | require.NoError(t, err) | |||
| 209 | + | require.NoError(t, json.Unmarshal(contents, &metadata)) | |||
| 210 | + | require.Equal(t, "github.com/bnema/purego-cef2gtk", metadata.Upstream.Module) | |||
| 211 | + | require.Equal(t, version, metadata.Upstream.Version) | |||
| 212 | + | require.Equal(t, "v0.8.5", metadata.Upstream.Tag) | |||
| 213 | + | require.Equal(t, revision, metadata.Upstream.Revision) | |||
| 214 | + | ||||
| 215 | + | script, err := os.ReadFile(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 216 | + | require.NoError(t, err) | |||
| 217 | + | require.NotContains(t, string(script), "f217ece342dea3ef2a3f98671fcd16a39ad0037d") | |||
| 218 | + | } | |||
| 219 | + | ||||
| 220 | + | func TestFirstPresentationCollectorRejectsNonImmutableModuleProvenanceWithoutLeaks(t *testing.T) { | |||
| 221 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |||
| 222 | + | require.NoError(t, err) | |||
| 223 | + | ||||
| 224 | + | for _, test := range []struct { | |||
| 225 | + | name, version, revision, ref string | |||
| 226 | + | }{ | |||
| 227 | + | {name: "branch selector", version: "main", ref: "main"}, | |||
| 228 | + | {name: "missing origin", version: "v0.8.5-0.20300102030405-bbd397409ebe"}, | |||
| 229 | + | {name: "named origin ref", version: "v0.8.5-0.20300102030405-bbd397409ebe", revision: "bbd397409ebed75a5979c1e4566a2ef319f6a484", ref: "main"}, | |||
| 230 | + | } { | |||
| 231 | + | t.Run(test.name, func(t *testing.T) { | |||
| 232 | + | temp := t.TempDir() | |||
| 233 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |||
| 234 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |||
| 235 | + | binary := filepath.Join(temp, "dumber") | |||
| 236 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |||
| 237 | + | ||||
| 238 | + | goBin := collectorProvenanceGo(t, temp, test.version, test.revision, test.ref) | |||
| 239 | + | output := filepath.Join(temp, "artifacts") | |||
| 240 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 241 | + | cmd.Dir = repoRoot | |||
| 242 | + | cmd.Env = append(os.Environ(), | |||
| 243 | + | "DISPLAY=:test", | |||
| 244 | + | "DUMBER_CEF_DIR="+runtime, | |||
| 245 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |||
| 246 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |||
| 247 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |||
| 248 | + | ) | |||
| 249 | + | result, runErr := cmd.CombinedOutput() | |||
| 250 | + | require.Errorf(t, runErr, "collector accepted nonimmutable module provenance: %s", result) | |||
| 251 | + | require.Contains(t, string(result), "immutable module provenance is unavailable") | |||
| 252 | + | require.NotContains(t, string(result), temp) | |||
| 253 | + | require.NoFileExists(t, filepath.Join(output, "metadata.json")) | |||
| 254 | + | for _, name := range runArtifactNames() { | |||
| 255 | + | require.NoFileExists(t, filepath.Join(output, name)) | |||
| 256 | + | } | |||
| 257 | + | }) | |||
| 258 | + | } | |||
| 259 | + | } | |||
| 260 | + | ||||
| 261 | + | func collectorProvenanceGo(t *testing.T, temp, version, revision, ref string) string { | |||
| 262 | + | t.Helper() | |||
| 263 | + | infoPath := filepath.Join(temp, "module.info") | |||
| 264 | + | info := map[string]any{"Version": version} | |||
| 265 | + | if revision != "" { | |||
| 266 | + | info["Origin"] = map[string]string{ | |||
| 267 | + | "VCS": "git", "URL": "https://github.com/bnema/purego-cef2gtk", "Hash": revision, "Ref": ref, | |||
| 268 | + | } | |||
| 269 | + | } | |||
| 270 | + | infoJSON, err := json.Marshal(info) | |||
| 271 | + | require.NoError(t, err) | |||
| 272 | + | require.NoError(t, os.WriteFile(infoPath, infoJSON, 0o600)) | |||
| 273 | + | ||||
| 274 | + | selectedJSON, err := json.Marshal(map[string]string{ | |||
| 275 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, | |||
| 276 | + | }) | |||
| 277 | + | require.NoError(t, err) | |||
| 278 | + | downloadedJSON, err := json.Marshal(map[string]string{ | |||
| 279 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, "Info": infoPath, | |||
| 280 | + | }) | |||
| 281 | + | require.NoError(t, err) | |||
| 282 | + | binDir := filepath.Join(temp, "bin") | |||
| 283 | + | require.NoError(t, os.Mkdir(binDir, 0o755)) | |||
| 284 | + | goBin := filepath.Join(binDir, "go") | |||
| 285 | + | script := fmt.Sprintf(`#!/bin/sh | |||
| 286 | + | if [ "$1" = "list" ] && [ "$2" = "-m" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk" ]; then | |||
| 287 | + | printf '%%s\n' '%s' | |||
| 288 | + | exit 0 | |||
| 289 | + | fi | |||
| 290 | + | if [ "$1" = "mod" ] && [ "$2" = "download" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk@%s" ]; then | |||
| 291 | + | printf '%%s\n' '%s' | |||
| 292 | + | exit 0 | |||
| 293 | + | fi | |||
| 294 | + | exit 1 | |||
| 295 | + | `, selectedJSON, version, downloadedJSON) | |||
| 296 | + | require.NoError(t, os.WriteFile(goBin, []byte(script), 0o755)) | |||
| 297 | + | return goBin | |||
| 298 | + | } | |||
| 299 | + | ||||
| 169 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | 300 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | ||
| 170 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | 301 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | ||
| 171 | require.NoError(t, err) | 302 | require.NoError(t, err) | ||
M scripts/collect_first_presentation.sh +78 -9
| @@ -31,8 +31,78 @@ else | |||
| 31 | 31 | fi | |
| 32 | 32 | readonly output | |
| 33 | 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | |
| 34 | - | readonly upstream_tag="v0.8.4" | |
| 35 | - | readonly upstream_revision="f217ece342dea3ef2a3f98671fcd16a39ad0037d" | |
| 34 | + | ||
| 35 | + | # Resolve the version selected by this checkout, then obtain its immutable VCS | |
| 36 | + | # origin from Go's cached module metadata. Do not infer a revision from a tag, | |
| 37 | + | # a branch, or a truncated pseudo-version suffix. | |
| 38 | + | resolve_upstream_provenance() { | |
| 39 | + | local selected_metadata selected_version downloaded_metadata | |
| 40 | + | ||
| 41 | + | selected_metadata="$(go list -m -json "$upstream_module" 2>/dev/null)" || { | |
| 42 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |
| 43 | + | exit 2 | |
| 44 | + | } | |
| 45 | + | selected_version="$(python3 - "$upstream_module" "$selected_metadata" <<'PY' | |
| 46 | + | import json, sys | |
| 47 | + | try: | |
| 48 | + | metadata = json.loads(sys.argv[2]) | |
| 49 | + | if metadata.get("Path") != sys.argv[1] or not isinstance(metadata.get("Version"), str): | |
| 50 | + | raise ValueError | |
| 51 | + | print(metadata["Version"]) | |
| 52 | + | except (AttributeError, TypeError, ValueError, json.JSONDecodeError): | |
| 53 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |
| 54 | + | PY | |
| 55 | + | )" || exit $? | |
| 56 | + | downloaded_metadata="$(go mod download -json "$upstream_module@$selected_version" 2>/dev/null)" || { | |
| 57 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |
| 58 | + | exit 2 | |
| 59 | + | } | |
| 60 | + | ||
| 61 | + | python3 - "$upstream_module" "$selected_metadata" "$downloaded_metadata" <<'PY' | |
| 62 | + | import json, re, sys | |
| 63 | + | ||
| 64 | + | module, selected_raw, downloaded_raw = sys.argv[1:] | |
| 65 | + | ||
| 66 | + | def fail(): | |
| 67 | + | # Do not expose Go cache locations or other machine-local values. | |
| 68 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |
| 69 | + | ||
| 70 | + | try: | |
| 71 | + | selected = json.loads(selected_raw) | |
| 72 | + | downloaded = json.loads(downloaded_raw) | |
| 73 | + | version = selected["Version"] | |
| 74 | + | if selected.get("Path") != module or downloaded.get("Path") != module: | |
| 75 | + | fail() | |
| 76 | + | if downloaded.get("Version") != version: | |
| 77 | + | fail() | |
| 78 | + | # A selected pseudo-version is an exact immutable selector, never a branch. | |
| 79 | + | match = re.fullmatch(r"(v\d+\.\d+\.\d+)-0\.\d{14}-([0-9a-f]{12})", version) | |
| 80 | + | if not match: | |
| 81 | + | fail() | |
| 82 | + | info_path = downloaded.get("Info") | |
| 83 | + | if not isinstance(info_path, str) or not info_path: | |
| 84 | + | fail() | |
| 85 | + | with open(info_path, encoding="utf-8") as info_file: | |
| 86 | + | info = json.load(info_file) | |
| 87 | + | origin = info.get("Origin") or downloaded.get("Origin") | |
| 88 | + | if info.get("Version") != version or not isinstance(origin, dict): | |
| 89 | + | fail() | |
| 90 | + | revision = origin.get("Hash") | |
| 91 | + | if origin.get("VCS") != "git" or origin.get("URL") != "https://github.com/bnema/purego-cef2gtk": | |
| 92 | + | fail() | |
| 93 | + | if not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision): | |
| 94 | + | fail() | |
| 95 | + | if not revision.startswith(match.group(2)): | |
| 96 | + | fail() | |
| 97 | + | # A named ref can move. Only the immutable hash itself is acceptable. | |
| 98 | + | if origin.get("Ref") not in (None, "", revision): | |
| 99 | + | fail() | |
| 100 | + | except (AttributeError, KeyError, OSError, TypeError, ValueError, json.JSONDecodeError): | |
| 101 | + | fail() | |
| 102 | + | ||
| 103 | + | print("\t".join((version, match.group(1), revision))) | |
| 104 | + | PY | |
| 105 | + | } | |
| 36 | 106 | ||
| 37 | 107 | # The artifact destination is caller-controlled. Never empty or recursively | |
| 38 | 108 | # clear it: collection only writes to a newly-created directory whose parent is | |
| @@ -66,10 +136,9 @@ prepare_output | |||
| 66 | 136 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | |
| 67 | 137 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | |
| 68 | 138 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | |
| 69 | - | [[ "$(go list -m -f '{{.Version}}' "$upstream_module")" == "$upstream_tag" ]] || { | |
| 70 | - | echo "first-presentation: expected $upstream_module@$upstream_tag" >&2 | |
| 71 | - | exit 2 | |
| 72 | - | } | |
| 139 | + | upstream_provenance="$(resolve_upstream_provenance)" || exit $? | |
| 140 | + | IFS=$'\t' read -r upstream_version upstream_tag upstream_revision <<<"$upstream_provenance" | |
| 141 | + | readonly upstream_version upstream_tag upstream_revision | |
| 73 | 142 | ||
| 74 | 143 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | |
| 75 | 144 | # outside the committed artifact directory and always remove them. | |
| @@ -80,9 +149,9 @@ cleanup_work_root() { | |||
| 80 | 149 | rm -rf -- "$work_root" | |
| 81 | 150 | } | |
| 82 | 151 | trap cleanup_work_root EXIT | |
| 83 | - | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_tag" "$upstream_revision" <<'PY' | |
| 152 | + | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_version" "$upstream_tag" "$upstream_revision" <<'PY' | |
| 84 | 153 | import hashlib, json, os, platform, subprocess, sys | |
| 85 | - | path, binary, timeout, upstream_module, upstream_tag, upstream_revision = sys.argv[1:] | |
| 154 | + | path, binary, timeout, upstream_module, upstream_version, upstream_tag, upstream_revision = sys.argv[1:] | |
| 86 | 155 | with open(binary, "rb") as candidate: | |
| 87 | 156 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | |
| 88 | 157 | ||
| @@ -102,7 +171,7 @@ json.dump({ | |||
| 102 | 171 | "binary": {"label": "dumber", "sha256": binary_sha256}, | |
| 103 | 172 | "timeout_seconds": int(timeout), | |
| 104 | 173 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | |
| 105 | - | "upstream": {"module": upstream_module, "tag": upstream_tag, "revision": upstream_revision}, | |
| 174 | + | "upstream": {"module": upstream_module, "version": upstream_version, "tag": upstream_tag, "revision": upstream_revision}, | |
| 106 | 175 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | |
| 107 | 176 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | |
| 108 | 177 | }, open(path, "w"), indent=2, sort_keys=True) | |
| @@ -31,8 +31,78 @@ else | |||||
| 31 | fi | 31 | fi | ||
| 32 | readonly output | 32 | readonly output | ||
| 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | ||
| 34 | - | readonly upstream_tag="v0.8.4" | 34 | + | |
| 35 | - | readonly upstream_revision="f217ece342dea3ef2a3f98671fcd16a39ad0037d" | 35 | + | # Resolve the version selected by this checkout, then obtain its immutable VCS |
| 36 | + | # origin from Go's cached module metadata. Do not infer a revision from a tag, | |||
| 37 | + | # a branch, or a truncated pseudo-version suffix. | |||
| 38 | + | resolve_upstream_provenance() { | |||
| 39 | + | local selected_metadata selected_version downloaded_metadata | |||
| 40 | + | ||||
| 41 | + | selected_metadata="$(go list -m -json "$upstream_module" 2>/dev/null)" || { | |||
| 42 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |||
| 43 | + | exit 2 | |||
| 44 | + | } | |||
| 45 | + | selected_version="$(python3 - "$upstream_module" "$selected_metadata" <<'PY' | |||
| 46 | + | import json, sys | |||
| 47 | + | try: | |||
| 48 | + | metadata = json.loads(sys.argv[2]) | |||
| 49 | + | if metadata.get("Path") != sys.argv[1] or not isinstance(metadata.get("Version"), str): | |||
| 50 | + | raise ValueError | |||
| 51 | + | print(metadata["Version"]) | |||
| 52 | + | except (AttributeError, TypeError, ValueError, json.JSONDecodeError): | |||
| 53 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |||
| 54 | + | PY | |||
| 55 | + | )" || exit $? | |||
| 56 | + | downloaded_metadata="$(go mod download -json "$upstream_module@$selected_version" 2>/dev/null)" || { | |||
| 57 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |||
| 58 | + | exit 2 | |||
| 59 | + | } | |||
| 60 | + | ||||
| 61 | + | python3 - "$upstream_module" "$selected_metadata" "$downloaded_metadata" <<'PY' | |||
| 62 | + | import json, re, sys | |||
| 63 | + | ||||
| 64 | + | module, selected_raw, downloaded_raw = sys.argv[1:] | |||
| 65 | + | ||||
| 66 | + | def fail(): | |||
| 67 | + | # Do not expose Go cache locations or other machine-local values. | |||
| 68 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |||
| 69 | + | ||||
| 70 | + | try: | |||
| 71 | + | selected = json.loads(selected_raw) | |||
| 72 | + | downloaded = json.loads(downloaded_raw) | |||
| 73 | + | version = selected["Version"] | |||
| 74 | + | if selected.get("Path") != module or downloaded.get("Path") != module: | |||
| 75 | + | fail() | |||
| 76 | + | if downloaded.get("Version") != version: | |||
| 77 | + | fail() | |||
| 78 | + | # A selected pseudo-version is an exact immutable selector, never a branch. | |||
| 79 | + | match = re.fullmatch(r"(v\d+\.\d+\.\d+)-0\.\d{14}-([0-9a-f]{12})", version) | |||
| 80 | + | if not match: | |||
| 81 | + | fail() | |||
| 82 | + | info_path = downloaded.get("Info") | |||
| 83 | + | if not isinstance(info_path, str) or not info_path: | |||
| 84 | + | fail() | |||
| 85 | + | with open(info_path, encoding="utf-8") as info_file: | |||
| 86 | + | info = json.load(info_file) | |||
| 87 | + | origin = info.get("Origin") or downloaded.get("Origin") | |||
| 88 | + | if info.get("Version") != version or not isinstance(origin, dict): | |||
| 89 | + | fail() | |||
| 90 | + | revision = origin.get("Hash") | |||
| 91 | + | if origin.get("VCS") != "git" or origin.get("URL") != "https://github.com/bnema/purego-cef2gtk": | |||
| 92 | + | fail() | |||
| 93 | + | if not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision): | |||
| 94 | + | fail() | |||
| 95 | + | if not revision.startswith(match.group(2)): | |||
| 96 | + | fail() | |||
| 97 | + | # A named ref can move. Only the immutable hash itself is acceptable. | |||
| 98 | + | if origin.get("Ref") not in (None, "", revision): | |||
| 99 | + | fail() | |||
| 100 | + | except (AttributeError, KeyError, OSError, TypeError, ValueError, json.JSONDecodeError): | |||
| 101 | + | fail() | |||
| 102 | + | ||||
| 103 | + | print("\t".join((version, match.group(1), revision))) | |||
| 104 | + | PY | |||
| 105 | + | } | |||
| 36 | 106 | ||||
| 37 | # The artifact destination is caller-controlled. Never empty or recursively | 107 | # The artifact destination is caller-controlled. Never empty or recursively | ||
| 38 | # clear it: collection only writes to a newly-created directory whose parent is | 108 | # clear it: collection only writes to a newly-created directory whose parent is | ||
| @@ -66,10 +136,9 @@ prepare_output | |||||
| 66 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | 136 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | ||
| 67 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | 137 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | ||
| 68 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | 138 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | ||
| 69 | - | [[ "$(go list -m -f '{{.Version}}' "$upstream_module")" == "$upstream_tag" ]] || { | 139 | + | upstream_provenance="$(resolve_upstream_provenance)" || exit $? |
| 70 | - | echo "first-presentation: expected $upstream_module@$upstream_tag" >&2 | 140 | + | IFS=$'\t' read -r upstream_version upstream_tag upstream_revision <<<"$upstream_provenance" |
| 71 | - | exit 2 | 141 | + | readonly upstream_version upstream_tag upstream_revision |
| 72 | - | } | |||
| 73 | 142 | ||||
| 74 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | 143 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | ||
| 75 | # outside the committed artifact directory and always remove them. | 144 | # outside the committed artifact directory and always remove them. | ||
| @@ -80,9 +149,9 @@ cleanup_work_root() { | |||||
| 80 | rm -rf -- "$work_root" | 149 | rm -rf -- "$work_root" | ||
| 81 | } | 150 | } | ||
| 82 | trap cleanup_work_root EXIT | 151 | trap cleanup_work_root EXIT | ||
| 83 | - | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_tag" "$upstream_revision" <<'PY' | 152 | + | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_version" "$upstream_tag" "$upstream_revision" <<'PY' |
| 84 | import hashlib, json, os, platform, subprocess, sys | 153 | import hashlib, json, os, platform, subprocess, sys | ||
| 85 | - | path, binary, timeout, upstream_module, upstream_tag, upstream_revision = sys.argv[1:] | 154 | + | path, binary, timeout, upstream_module, upstream_version, upstream_tag, upstream_revision = sys.argv[1:] |
| 86 | with open(binary, "rb") as candidate: | 155 | with open(binary, "rb") as candidate: | ||
| 87 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | 156 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | ||
| 88 | 157 | ||||
| @@ -102,7 +171,7 @@ json.dump({ | |||||
| 102 | "binary": {"label": "dumber", "sha256": binary_sha256}, | 171 | "binary": {"label": "dumber", "sha256": binary_sha256}, | ||
| 103 | "timeout_seconds": int(timeout), | 172 | "timeout_seconds": int(timeout), | ||
| 104 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | 173 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | ||
| 105 | - | "upstream": {"module": upstream_module, "tag": upstream_tag, "revision": upstream_revision}, | 174 | + | "upstream": {"module": upstream_module, "version": upstream_version, "tag": upstream_tag, "revision": upstream_revision}, |
| 106 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | 175 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | ||
| 107 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | 176 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | ||
| 108 | }, open(path, "w"), indent=2, sort_keys=True) | 177 | }, open(path, "w"), indent=2, sort_keys=True) | ||
M vendor/github.com/bnema/purego-cef/cef/bridge.go +8 -13 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/cefadapter/accelerated_paint.go +34 -37 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/dmabuf/frame.go +38 -19 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/gtkgdk/renderer.go +89 -69 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/player.go +5 -0 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/player_rt.go +10 -6 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/pwbuffer.go +66 -32 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/driver/driver.go +268 -63 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/core/db.go +8 -0 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/core/rows.go +13 -0 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/loader/loader.go +23 -5 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/ports/in/ports_gen.go +3 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +24 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +41 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +39 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +34 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +17 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +49 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +20 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +25 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +33 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +35 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +123 -87 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +30 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +41 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +64 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +40 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +78 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +15 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +66 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +57 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +36 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +20 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +34 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +28 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +23 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevice.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicepad.go +27 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicetool.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplay.go +51 -43 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplaymanager.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexture.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder.go +53 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrag.go +20 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurface.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurfacesize.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrawcontext.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrop.go +19 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkenums.go +21 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkevents.go +120 -118 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframeclock.go +22 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframetimings.go +17 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkglcontext.go +40 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexture.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexturebuilder.go +41 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkkeys.go +19 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexture.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexturebuilder.go +42 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmonitor.go +27 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpaintable.go +63 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpango.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpixbuf.go +2 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopup.go +47 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopuplayout.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkrgba.go +19 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkseat.go +11 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksnapshot.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksurface.go +46 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktexture.go +27 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevel.go +157 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevellayout.go +24 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevelsize.go +9 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktypes.go +95 -72 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkvulkancontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-animation.go +26 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-core.go +9 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-io.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-loader.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-simple-anim.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-transform.go +11 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf.go +102 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/main.go +5 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gaction.go +59 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gactiongroup.go +96 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gactionmap.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gappinfo.go +244 -116 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gapplication.go +79 -55 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gapplicationcommandline.go +31 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gasyncinitable.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gasyncresult.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbufferedinputstream.go +26 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbufferedoutputstream.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbytesicon.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcancellable.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcharsetconverter.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcontenttype.go +30 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverter.go +23 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverterinputstream.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverteroutputstream.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcredentials.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdatagrambased.go +45 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdatainputstream.go +31 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdataoutputstream.go +14 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusactiongroup.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusaddress.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusauthobserver.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusconnection.go +77 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbuserror.go +16 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusinterface.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusinterfaceskeleton.go +25 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusintrospection.go +54 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmenumodel.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmessage.go +88 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmethodinvocation.go +35 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusnameowning.go +10 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusnamewatching.go +10 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobject.go +19 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanager.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanagerclient.go +16 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanagerserver.go +13 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectproxy.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectskeleton.go +12 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusproxy.go +42 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusserver.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusutils.go +24 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdebugcontroller.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdebugcontrollerdbus.go +4 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdrive.go +214 -82 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsclientconnection.go +34 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsconnection.go +207 -80 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsserverconnection.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gemblem.go +6 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gemblemedicon.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfile.go +1148 -450 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileattribute.go +13 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileenumerator.go +34 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileicon.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileinfo.go +138 -84 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileinputstream.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileiostream.go +23 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilemonitor.go +9 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilenamecompleter.go +8 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileoutputstream.go +23 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilterinputstream.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilteroutputstream.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gicon.go +32 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetaddress.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetaddressmask.go +14 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetsocketaddress.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginitable.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginputstream.go +52 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioenums.go +90 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioerror.go +6 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giomodule.go +26 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioscheduler.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giostream.go +25 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giotypes.go +70 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giptosmessage.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gipv6tclassmessage.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/glistmodel.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gliststore.go +22 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gloadableicon.go +27 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemoryinputstream.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemorymonitor.go +2 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemoryoutputstream.go +13 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmenu.go +62 -50 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmenumodel.go +31 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmount.go +215 -86 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmountoperation.go +40 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnativesocketaddress.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnativevolumemonitor.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkaddress.go +11 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworking.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkmonitor.go +49 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkservice.go +12 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnotification.go +26 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/goutputstream.go +86 -72 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpermission.go +33 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableinputstream.go +30 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableoutputstream.go +41 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableutils.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpowerprofilemonitor.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpropertyaction.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxy.go +35 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyaddress.go +16 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyaddressenumerator.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyresolver.go +35 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gremoteactiongroup.go +12 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gresolver.go +75 -67 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gresource.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gseekable.go +41 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettings.go +99 -67 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettingsbackend.go +19 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettingsschema.go +48 -43 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleaction.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleactiongroup.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleasyncresult.go +46 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleiostream.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimplepermission.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleproxyresolver.go +8 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocket.go +87 -72 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketaddress.go +11 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketaddressenumerator.go +13 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketclient.go +54 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketconnectable.go +19 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketconnection.go +14 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketcontrolmessage.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketlistener.go +18 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketservice.go +8 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsrvtarget.go +2 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsubprocess.go +40 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsubprocesslauncher.go +34 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtask.go +70 -52 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtcpconnection.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtcpwrapperconnection.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtestdbus.go +16 -22 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gthemedicon.go +10 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gthreadedresolver.go +7 -0 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gthreadedsocketservice.go +2 -12 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsbackend.go +69 -33 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlscertificate.go +25 -29 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsclientconnection.go +55 -29 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsconnection.go +56 -46 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsdatabase.go +51 -48 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsfiledatabase.go +2 -13 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsinteraction.go +27 -31 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlspassword.go +20 -22 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsserverconnection.go +2 -13 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gunixconnection.go +11 -20 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gunixcredentialsmessage.go +6 -17 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gunixfdlist.go +11 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gunixsocketaddress.go +14 -22 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gvfs.go +18 -24 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gvolume.go +143 -58 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gvolumemonitor.go +11 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gzlibcompressor.go +9 -18 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gzlibdecompressor.go +3 -15 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/main.go +2 -11 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gallocator.go +32 -28 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/garray.go +82 -59 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gasyncqueue.go +56 -39 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gatomic.go +43 -34 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbacktrace.go +5 -15 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbase64.go +13 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbitlock.go +23 -24 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbookmarkfile.go +69 -61
| @@ -5,7 +5,6 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | - | "github.com/bnema/purego" | |
| 9 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/gobject/types" | |
| 11 | 10 | ) | |
| @@ -54,6 +53,7 @@ type BookmarkFile struct { | |||
| 54 | 53 | var xBookmarkFileGLibType func() types.GType | |
| 55 | 54 | ||
| 56 | 55 | func BookmarkFileGLibType() types.GType { | |
| 56 | + | core.LazyRegister(&xBookmarkFileGLibType, "GLIB", "g_bookmark_file_get_type", false) | |
| 57 | 57 | return xBookmarkFileGLibType() | |
| 58 | 58 | } | |
| 59 | 59 | ||
| @@ -77,6 +77,8 @@ var xNewBookmarkFile func() uintptr | |||
| 77 | 77 | // or g_bookmark_file_load_from_data_dirs() to read an existing bookmark | |
| 78 | 78 | // file. | |
| 79 | 79 | func NewBookmarkFile() *BookmarkFile { | |
| 80 | + | core.LazyRegister(&xNewBookmarkFile, "GLIB", "g_bookmark_file_new", false) | |
| 81 | + | ||
| 80 | 82 | cret := xNewBookmarkFile() | |
| 81 | 83 | if cret == 0 { | |
| 82 | 84 | return nil | |
| @@ -109,6 +111,8 @@ var xBookmarkFileAddApplication func(uintptr, string, uintptr, uintptr) | |||
| 109 | 111 | // | |
| 110 | 112 | // If no bookmark for @uri is found, one is created. | |
| 111 | 113 | func (x *BookmarkFile) AddApplication(UriVar string, NameVar *string, ExecVar *string) { | |
| 114 | + | core.LazyRegister(&xBookmarkFileAddApplication, "GLIB", "g_bookmark_file_add_application", false) | |
| 115 | + | ||
| 112 | 116 | NameVarPtr := core.GStrdupNullable(NameVar) | |
| 113 | 117 | defer core.GFreeNullable(NameVarPtr) | |
| 114 | 118 | ||
| @@ -125,6 +129,8 @@ var xBookmarkFileAddGroup func(uintptr, string, string) | |||
| 125 | 129 | // | |
| 126 | 130 | // If no bookmark for @uri is found then it is created. | |
| 127 | 131 | func (x *BookmarkFile) AddGroup(UriVar string, GroupVar string) { | |
| 132 | + | core.LazyRegister(&xBookmarkFileAddGroup, "GLIB", "g_bookmark_file_add_group", false) | |
| 133 | + | ||
| 128 | 134 | xBookmarkFileAddGroup(x.GoPointer(), UriVar, GroupVar) | |
| 129 | 135 | } | |
| 130 | 136 | ||
| @@ -132,6 +138,8 @@ var xBookmarkFileCopy func(uintptr) uintptr | |||
| 132 | 138 | ||
| 133 | 139 | // Deeply copies a @bookmark #GBookmarkFile object to a new one. | |
| 134 | 140 | func (x *BookmarkFile) Copy() *BookmarkFile { | |
| 141 | + | core.LazyRegister(&xBookmarkFileCopy, "GLIB", "g_bookmark_file_copy", false) | |
| 142 | + | ||
| 135 | 143 | cret := xBookmarkFileCopy(x.GoPointer()) | |
| 136 | 144 | if cret == 0 { | |
| 137 | 145 | return nil | |
| @@ -143,6 +151,8 @@ var xBookmarkFileFree func(uintptr) | |||
| 143 | 151 | ||
| 144 | 152 | // Frees a #GBookmarkFile. | |
| 145 | 153 | func (x *BookmarkFile) Free() { | |
| 154 | + | core.LazyRegister(&xBookmarkFileFree, "GLIB", "g_bookmark_file_free", false) | |
| 155 | + | ||
| 146 | 156 | xBookmarkFileFree(x.GoPointer()) | |
| 147 | 157 | } | |
| 148 | 158 | ||
| @@ -153,6 +163,7 @@ var xBookmarkFileGetAdded func(uintptr, string, **Error) int | |||
| 153 | 163 | // In the event the URI cannot be found, -1 is returned and | |
| 154 | 164 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 155 | 165 | func (x *BookmarkFile) GetAdded(UriVar string) (int, error) { | |
| 166 | + | core.LazyRegister(&xBookmarkFileGetAdded, "GLIB", "g_bookmark_file_get_added", false) | |
| 156 | 167 | var cerr *Error | |
| 157 | 168 | ||
| 158 | 169 | cret := xBookmarkFileGetAdded(x.GoPointer(), UriVar, &cerr) | |
| @@ -169,6 +180,7 @@ var xBookmarkFileGetAddedDateTime func(uintptr, string, **Error) uintptr | |||
| 169 | 180 | // In the event the URI cannot be found, %NULL is returned and | |
| 170 | 181 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 171 | 182 | func (x *BookmarkFile) GetAddedDateTime(UriVar string) (*DateTime, error) { | |
| 183 | + | core.LazyRegister(&xBookmarkFileGetAddedDateTime, "GLIB", "g_bookmark_file_get_added_date_time", false) | |
| 172 | 184 | var cerr *Error | |
| 173 | 185 | ||
| 174 | 186 | cret := xBookmarkFileGetAddedDateTime(x.GoPointer(), UriVar, &cerr) | |
| @@ -197,6 +209,7 @@ var xBookmarkFileGetAppInfo func(uintptr, string, string, *string, *uint, *int, | |||
| 197 | 209 | // the command line fails, an error of the %G_SHELL_ERROR domain is | |
| 198 | 210 | // set and %FALSE is returned. | |
| 199 | 211 | func (x *BookmarkFile) GetAppInfo(UriVar string, NameVar string, ExecVar *string, CountVar *uint, StampVar *int) (bool, error) { | |
| 212 | + | core.LazyRegister(&xBookmarkFileGetAppInfo, "GLIB", "g_bookmark_file_get_app_info", false) | |
| 200 | 213 | var cerr *Error | |
| 201 | 214 | ||
| 202 | 215 | cret := xBookmarkFileGetAppInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | |
| @@ -222,6 +235,7 @@ var xBookmarkFileGetApplicationInfo func(uintptr, string, string, *string, *uint | |||
| 222 | 235 | // the command line fails, an error of the %G_SHELL_ERROR domain is | |
| 223 | 236 | // set and %FALSE is returned. | |
| 224 | 237 | func (x *BookmarkFile) GetApplicationInfo(UriVar string, NameVar string, ExecVar *string, CountVar *uint, StampVar **DateTime) (bool, error) { | |
| 238 | + | core.LazyRegister(&xBookmarkFileGetApplicationInfo, "GLIB", "g_bookmark_file_get_application_info", false) | |
| 225 | 239 | var cerr *Error | |
| 226 | 240 | ||
| 227 | 241 | cret := xBookmarkFileGetApplicationInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | |
| @@ -239,6 +253,7 @@ var xBookmarkFileGetApplications func(uintptr, string, *uint, **Error) []string | |||
| 239 | 253 | // In the event the URI cannot be found, %NULL is returned and | |
| 240 | 254 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 241 | 255 | func (x *BookmarkFile) GetApplications(UriVar string, LengthVar *uint) ([]string, error) { | |
| 256 | + | core.LazyRegister(&xBookmarkFileGetApplications, "GLIB", "g_bookmark_file_get_applications", false) | |
| 242 | 257 | var cerr *Error | |
| 243 | 258 | ||
| 244 | 259 | cret := xBookmarkFileGetApplications(x.GoPointer(), UriVar, LengthVar, &cerr) | |
| @@ -255,6 +270,7 @@ var xBookmarkFileGetDescription func(uintptr, string, **Error) string | |||
| 255 | 270 | // In the event the URI cannot be found, %NULL is returned and | |
| 256 | 271 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 257 | 272 | func (x *BookmarkFile) GetDescription(UriVar string) (string, error) { | |
| 273 | + | core.LazyRegister(&xBookmarkFileGetDescription, "GLIB", "g_bookmark_file_get_description", false) | |
| 258 | 274 | var cerr *Error | |
| 259 | 275 | ||
| 260 | 276 | cret := xBookmarkFileGetDescription(x.GoPointer(), UriVar, &cerr) | |
| @@ -274,6 +290,7 @@ var xBookmarkFileGetGroups func(uintptr, string, *uint, **Error) []string | |||
| 274 | 290 | // The returned array is %NULL terminated, so @length may optionally | |
| 275 | 291 | // be %NULL. | |
| 276 | 292 | func (x *BookmarkFile) GetGroups(UriVar string, LengthVar *uint) ([]string, error) { | |
| 293 | + | core.LazyRegister(&xBookmarkFileGetGroups, "GLIB", "g_bookmark_file_get_groups", false) | |
| 277 | 294 | var cerr *Error | |
| 278 | 295 | ||
| 279 | 296 | cret := xBookmarkFileGetGroups(x.GoPointer(), UriVar, LengthVar, &cerr) | |
| @@ -290,6 +307,7 @@ var xBookmarkFileGetIcon func(uintptr, string, *string, *string, **Error) bool | |||
| 290 | 307 | // In the event the URI cannot be found, %FALSE is returned and | |
| 291 | 308 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 292 | 309 | func (x *BookmarkFile) GetIcon(UriVar string, HrefVar *string, MimeTypeVar *string) (bool, error) { | |
| 310 | + | core.LazyRegister(&xBookmarkFileGetIcon, "GLIB", "g_bookmark_file_get_icon", false) | |
| 293 | 311 | var cerr *Error | |
| 294 | 312 | ||
| 295 | 313 | cret := xBookmarkFileGetIcon(x.GoPointer(), UriVar, HrefVar, MimeTypeVar, &cerr) | |
| @@ -308,6 +326,7 @@ var xBookmarkFileGetIsPrivate func(uintptr, string, **Error) bool | |||
| 308 | 326 | // event that the private flag cannot be found, %FALSE is returned and | |
| 309 | 327 | // @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. | |
| 310 | 328 | func (x *BookmarkFile) GetIsPrivate(UriVar string) (bool, error) { | |
| 329 | + | core.LazyRegister(&xBookmarkFileGetIsPrivate, "GLIB", "g_bookmark_file_get_is_private", false) | |
| 311 | 330 | var cerr *Error | |
| 312 | 331 | ||
| 313 | 332 | cret := xBookmarkFileGetIsPrivate(x.GoPointer(), UriVar, &cerr) | |
| @@ -326,6 +345,7 @@ var xBookmarkFileGetMimeType func(uintptr, string, **Error) string | |||
| 326 | 345 | // event that the MIME type cannot be found, %NULL is returned and | |
| 327 | 346 | // @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. | |
| 328 | 347 | func (x *BookmarkFile) GetMimeType(UriVar string) (string, error) { | |
| 348 | + | core.LazyRegister(&xBookmarkFileGetMimeType, "GLIB", "g_bookmark_file_get_mime_type", false) | |
| 329 | 349 | var cerr *Error | |
| 330 | 350 | ||
| 331 | 351 | cret := xBookmarkFileGetMimeType(x.GoPointer(), UriVar, &cerr) | |
| @@ -342,6 +362,7 @@ var xBookmarkFileGetModified func(uintptr, string, **Error) int | |||
| 342 | 362 | // In the event the URI cannot be found, -1 is returned and | |
| 343 | 363 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 344 | 364 | func (x *BookmarkFile) GetModified(UriVar string) (int, error) { | |
| 365 | + | core.LazyRegister(&xBookmarkFileGetModified, "GLIB", "g_bookmark_file_get_modified", false) | |
| 345 | 366 | var cerr *Error | |
| 346 | 367 | ||
| 347 | 368 | cret := xBookmarkFileGetModified(x.GoPointer(), UriVar, &cerr) | |
| @@ -358,6 +379,7 @@ var xBookmarkFileGetModifiedDateTime func(uintptr, string, **Error) uintptr | |||
| 358 | 379 | // In the event the URI cannot be found, %NULL is returned and | |
| 359 | 380 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 360 | 381 | func (x *BookmarkFile) GetModifiedDateTime(UriVar string) (*DateTime, error) { | |
| 382 | + | core.LazyRegister(&xBookmarkFileGetModifiedDateTime, "GLIB", "g_bookmark_file_get_modified_date_time", false) | |
| 361 | 383 | var cerr *Error | |
| 362 | 384 | ||
| 363 | 385 | cret := xBookmarkFileGetModifiedDateTime(x.GoPointer(), UriVar, &cerr) | |
| @@ -374,6 +396,8 @@ var xBookmarkFileGetSize func(uintptr) int | |||
| 374 | 396 | ||
| 375 | 397 | // Gets the number of bookmarks inside @bookmark. | |
| 376 | 398 | func (x *BookmarkFile) GetSize() int { | |
| 399 | + | core.LazyRegister(&xBookmarkFileGetSize, "GLIB", "g_bookmark_file_get_size", false) | |
| 400 | + | ||
| 377 | 401 | cret := xBookmarkFileGetSize(x.GoPointer()) | |
| 378 | 402 | return cret | |
| 379 | 403 | } | |
| @@ -387,6 +411,7 @@ var xBookmarkFileGetTitle func(uintptr, uintptr, **Error) string | |||
| 387 | 411 | // In the event the URI cannot be found, %NULL is returned and | |
| 388 | 412 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 389 | 413 | func (x *BookmarkFile) GetTitle(UriVar *string) (string, error) { | |
| 414 | + | core.LazyRegister(&xBookmarkFileGetTitle, "GLIB", "g_bookmark_file_get_title", false) | |
| 390 | 415 | var cerr *Error | |
| 391 | 416 | ||
| 392 | 417 | UriVarPtr := core.GStrdupNullable(UriVar) | |
| @@ -405,6 +430,8 @@ var xBookmarkFileGetUris func(uintptr, *uint) []string | |||
| 405 | 430 | // The array of returned URIs will be %NULL-terminated, so @length may | |
| 406 | 431 | // optionally be %NULL. | |
| 407 | 432 | func (x *BookmarkFile) GetUris(LengthVar *uint) []string { | |
| 433 | + | core.LazyRegister(&xBookmarkFileGetUris, "GLIB", "g_bookmark_file_get_uris", false) | |
| 434 | + | ||
| 408 | 435 | cret := xBookmarkFileGetUris(x.GoPointer(), LengthVar) | |
| 409 | 436 | return cret | |
| 410 | 437 | } | |
| @@ -416,6 +443,7 @@ var xBookmarkFileGetVisited func(uintptr, string, **Error) int | |||
| 416 | 443 | // In the event the URI cannot be found, -1 is returned and | |
| 417 | 444 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 418 | 445 | func (x *BookmarkFile) GetVisited(UriVar string) (int, error) { | |
| 446 | + | core.LazyRegister(&xBookmarkFileGetVisited, "GLIB", "g_bookmark_file_get_visited", false) | |
| 419 | 447 | var cerr *Error | |
| 420 | 448 | ||
| 421 | 449 | cret := xBookmarkFileGetVisited(x.GoPointer(), UriVar, &cerr) | |
| @@ -432,6 +460,7 @@ var xBookmarkFileGetVisitedDateTime func(uintptr, string, **Error) uintptr | |||
| 432 | 460 | // In the event the URI cannot be found, %NULL is returned and | |
| 433 | 461 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 434 | 462 | func (x *BookmarkFile) GetVisitedDateTime(UriVar string) (*DateTime, error) { | |
| 463 | + | core.LazyRegister(&xBookmarkFileGetVisitedDateTime, "GLIB", "g_bookmark_file_get_visited_date_time", false) | |
| 435 | 464 | var cerr *Error | |
| 436 | 465 | ||
| 437 | 466 | cret := xBookmarkFileGetVisitedDateTime(x.GoPointer(), UriVar, &cerr) | |
| @@ -452,6 +481,7 @@ var xBookmarkFileHasApplication func(uintptr, string, string, **Error) bool | |||
| 452 | 481 | // In the event the URI cannot be found, %FALSE is returned and | |
| 453 | 482 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 454 | 483 | func (x *BookmarkFile) HasApplication(UriVar string, NameVar string) (bool, error) { | |
| 484 | + | core.LazyRegister(&xBookmarkFileHasApplication, "GLIB", "g_bookmark_file_has_application", false) | |
| 455 | 485 | var cerr *Error | |
| 456 | 486 | ||
| 457 | 487 | cret := xBookmarkFileHasApplication(x.GoPointer(), UriVar, NameVar, &cerr) | |
| @@ -469,6 +499,7 @@ var xBookmarkFileHasGroup func(uintptr, string, string, **Error) bool | |||
| 469 | 499 | // In the event the URI cannot be found, %FALSE is returned and | |
| 470 | 500 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 471 | 501 | func (x *BookmarkFile) HasGroup(UriVar string, GroupVar string) (bool, error) { | |
| 502 | + | core.LazyRegister(&xBookmarkFileHasGroup, "GLIB", "g_bookmark_file_has_group", false) | |
| 472 | 503 | var cerr *Error | |
| 473 | 504 | ||
| 474 | 505 | cret := xBookmarkFileHasGroup(x.GoPointer(), UriVar, GroupVar, &cerr) | |
| @@ -482,6 +513,8 @@ var xBookmarkFileHasItem func(uintptr, string) bool | |||
| 482 | 513 | ||
| 483 | 514 | // Looks whether the desktop bookmark has an item with its URI set to @uri. | |
| 484 | 515 | func (x *BookmarkFile) HasItem(UriVar string) bool { | |
| 516 | + | core.LazyRegister(&xBookmarkFileHasItem, "GLIB", "g_bookmark_file_has_item", false) | |
| 517 | + | ||
| 485 | 518 | cret := xBookmarkFileHasItem(x.GoPointer(), UriVar) | |
| 486 | 519 | return cret | |
| 487 | 520 | } | |
| @@ -492,6 +525,7 @@ var xBookmarkFileLoadFromData func(uintptr, []byte, uint, **Error) bool | |||
| 492 | 525 | // structure. If the object cannot be created then @error is set to a | |
| 493 | 526 | // #GBookmarkFileError. | |
| 494 | 527 | func (x *BookmarkFile) LoadFromData(DataVar []byte, LengthVar uint) (bool, error) { | |
| 528 | + | core.LazyRegister(&xBookmarkFileLoadFromData, "GLIB", "g_bookmark_file_load_from_data", false) | |
| 495 | 529 | var cerr *Error | |
| 496 | 530 | ||
| 497 | 531 | cret := xBookmarkFileLoadFromData(x.GoPointer(), DataVar, LengthVar, &cerr) | |
| @@ -509,6 +543,7 @@ var xBookmarkFileLoadFromDataDirs func(uintptr, string, *string, **Error) bool | |||
| 509 | 543 | // @full_path. If the file could not be loaded then @error is | |
| 510 | 544 | // set to either a #GFileError or #GBookmarkFileError. | |
| 511 | 545 | func (x *BookmarkFile) LoadFromDataDirs(FileVar string, FullPathVar *string) (bool, error) { | |
| 546 | + | core.LazyRegister(&xBookmarkFileLoadFromDataDirs, "GLIB", "g_bookmark_file_load_from_data_dirs", false) | |
| 512 | 547 | var cerr *Error | |
| 513 | 548 | ||
| 514 | 549 | cret := xBookmarkFileLoadFromDataDirs(x.GoPointer(), FileVar, FullPathVar, &cerr) | |
| @@ -524,6 +559,7 @@ var xBookmarkFileLoadFromFile func(uintptr, string, **Error) bool | |||
| 524 | 559 | // If the file could not be loaded then @error is set to either a #GFileError | |
| 525 | 560 | // or #GBookmarkFileError. | |
| 526 | 561 | func (x *BookmarkFile) LoadFromFile(FilenameVar string) (bool, error) { | |
| 562 | + | core.LazyRegister(&xBookmarkFileLoadFromFile, "GLIB", "g_bookmark_file_load_from_file", false) | |
| 527 | 563 | var cerr *Error | |
| 528 | 564 | ||
| 529 | 565 | cret := xBookmarkFileLoadFromFile(x.GoPointer(), FilenameVar, &cerr) | |
| @@ -542,6 +578,7 @@ var xBookmarkFileMoveItem func(uintptr, string, uintptr, **Error) bool | |||
| 542 | 578 | // In the event the URI cannot be found, %FALSE is returned and | |
| 543 | 579 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | |
| 544 | 580 | func (x *BookmarkFile) MoveItem(OldUriVar string, NewUriVar *string) (bool, error) { | |
| 581 | + | core.LazyRegister(&xBookmarkFileMoveItem, "GLIB", "g_bookmark_file_move_item", false) | |
| 545 | 582 | var cerr *Error | |
| 546 | 583 | ||
| 547 | 584 | NewUriVarPtr := core.GStrdupNullable(NewUriVar) | |
| @@ -565,6 +602,7 @@ var xBookmarkFileRemoveApplication func(uintptr, string, string, **Error) bool | |||
| 565 | 602 | // a bookmark for @uri, %FALSE is returned and error is set to | |
| 566 | 603 | // %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. | |
| 567 | 604 | func (x *BookmarkFile) RemoveApplication(UriVar string, NameVar string) (bool, error) { | |
| 605 | + | core.LazyRegister(&xBookmarkFileRemoveApplication, "GLIB", "g_bookmark_file_remove_application", false) | |
| 568 | 606 | var cerr *Error | |
| 569 | 607 | ||
| 570 | 608 | cret := xBookmarkFileRemoveApplication(x.GoPointer(), UriVar, NameVar, &cerr) | |
| @@ -584,6 +622,7 @@ var xBookmarkFileRemoveGroup func(uintptr, string, string, **Error) bool | |||
| 584 | 622 | // In the event no group was defined, %FALSE is returned and | |
| 585 | 623 | // @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. | |
| 586 | 624 | func (x *BookmarkFile) RemoveGroup(UriVar string, GroupVar string) (bool, error) { | |
| 625 | + | core.LazyRegister(&xBookmarkFileRemoveGroup, "GLIB", "g_bookmark_file_remove_group", false) | |
| 587 | 626 | var cerr *Error | |
| 588 | 627 | ||
| 589 | 628 | cret := xBookmarkFileRemoveGroup(x.GoPointer(), UriVar, GroupVar, &cerr) | |
| @@ -597,6 +636,7 @@ var xBookmarkFileRemoveItem func(uintptr, string, **Error) bool | |||
| 597 | 636 | ||
| 598 | 637 | // Removes the bookmark for @uri from the bookmark file @bookmark. | |
| 599 | 638 | func (x *BookmarkFile) RemoveItem(UriVar string) (bool, error) { | |
| 639 | + | core.LazyRegister(&xBookmarkFileRemoveItem, "GLIB", "g_bookmark_file_remove_item", false) | |
| 600 | 640 | var cerr *Error | |
| 601 | 641 | ||
| 602 | 642 | cret := xBookmarkFileRemoveItem(x.GoPointer(), UriVar, &cerr) | |
| @@ -612,6 +652,8 @@ var xBookmarkFileSetAdded func(uintptr, string, int) | |||
| 612 | 652 | // | |
| 613 | 653 | // If no bookmark for @uri is found then it is created. | |
| 614 | 654 | func (x *BookmarkFile) SetAdded(UriVar string, AddedVar int) { | |
| 655 | + | core.LazyRegister(&xBookmarkFileSetAdded, "GLIB", "g_bookmark_file_set_added", false) | |
| 656 | + | ||
| 615 | 657 | xBookmarkFileSetAdded(x.GoPointer(), UriVar, AddedVar) | |
| 616 | 658 | } | |
| 617 | 659 | ||
| @@ -621,6 +663,8 @@ var xBookmarkFileSetAddedDateTime func(uintptr, string, *DateTime) | |||
| 621 | 663 | // | |
| 622 | 664 | // If no bookmark for @uri is found then it is created. | |
| 623 | 665 | func (x *BookmarkFile) SetAddedDateTime(UriVar string, AddedVar *DateTime) { | |
| 666 | + | core.LazyRegister(&xBookmarkFileSetAddedDateTime, "GLIB", "g_bookmark_file_set_added_date_time", false) | |
| 667 | + | ||
| 624 | 668 | xBookmarkFileSetAddedDateTime(x.GoPointer(), UriVar, AddedVar) | |
| 625 | 669 | } | |
| 626 | 670 | ||
| @@ -655,6 +699,7 @@ var xBookmarkFileSetAppInfo func(uintptr, string, string, string, int, int, **Er | |||
| 655 | 699 | // %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark | |
| 656 | 700 | // for @uri is found, one is created. | |
| 657 | 701 | func (x *BookmarkFile) SetAppInfo(UriVar string, NameVar string, ExecVar string, CountVar int, StampVar int) (bool, error) { | |
| 702 | + | core.LazyRegister(&xBookmarkFileSetAppInfo, "GLIB", "g_bookmark_file_set_app_info", false) | |
| 658 | 703 | var cerr *Error | |
| 659 | 704 | ||
| 660 | 705 | cret := xBookmarkFileSetAppInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | |
| @@ -694,6 +739,7 @@ var xBookmarkFileSetApplicationInfo func(uintptr, string, string, string, int, * | |||
| 694 | 739 | // %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark | |
| 695 | 740 | // for @uri is found, one is created. | |
| 696 | 741 | func (x *BookmarkFile) SetApplicationInfo(UriVar string, NameVar string, ExecVar string, CountVar int, StampVar *DateTime) (bool, error) { | |
| 742 | + | core.LazyRegister(&xBookmarkFileSetApplicationInfo, "GLIB", "g_bookmark_file_set_application_info", false) | |
| 697 | 743 | var cerr *Error | |
| 698 | 744 | ||
| 699 | 745 | cret := xBookmarkFileSetApplicationInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | |
| @@ -711,6 +757,8 @@ var xBookmarkFileSetDescription func(uintptr, uintptr, string) | |||
| 711 | 757 | // | |
| 712 | 758 | // If a bookmark for @uri cannot be found then it is created. | |
| 713 | 759 | func (x *BookmarkFile) SetDescription(UriVar *string, DescriptionVar string) { | |
| 760 | + | core.LazyRegister(&xBookmarkFileSetDescription, "GLIB", "g_bookmark_file_set_description", false) | |
| 761 | + | ||
| 714 | 762 | UriVarPtr := core.GStrdupNullable(UriVar) | |
| 715 | 763 | defer core.GFreeNullable(UriVarPtr) | |
| 716 | 764 | ||
| @@ -724,6 +772,8 @@ var xBookmarkFileSetGroups func(uintptr, string, []string, uint) | |||
| 724 | 772 | // | |
| 725 | 773 | // If @uri cannot be found then an item for it is created. | |
| 726 | 774 | func (x *BookmarkFile) SetGroups(UriVar string, GroupsVar []string, LengthVar uint) { | |
| 775 | + | core.LazyRegister(&xBookmarkFileSetGroups, "GLIB", "g_bookmark_file_set_groups", false) | |
| 776 | + | ||
| 727 | 777 | xBookmarkFileSetGroups(x.GoPointer(), UriVar, GroupsVar, LengthVar) | |
| 728 | 778 | } | |
| 729 | 779 | ||
| @@ -735,6 +785,8 @@ var xBookmarkFileSetIcon func(uintptr, string, uintptr, string) | |||
| 735 | 785 | // | |
| 736 | 786 | // If no bookmark for @uri is found one is created. | |
| 737 | 787 | func (x *BookmarkFile) SetIcon(UriVar string, HrefVar *string, MimeTypeVar string) { | |
| 788 | + | core.LazyRegister(&xBookmarkFileSetIcon, "GLIB", "g_bookmark_file_set_icon", false) | |
| 789 | + | ||
| 738 | 790 | HrefVarPtr := core.GStrdupNullable(HrefVar) | |
| 739 | 791 | defer core.GFreeNullable(HrefVarPtr) | |
| 740 | 792 | ||
| @@ -747,6 +799,8 @@ var xBookmarkFileSetIsPrivate func(uintptr, string, bool) | |||
| 747 | 799 | // | |
| 748 | 800 | // If a bookmark for @uri cannot be found then it is created. | |
| 749 | 801 | func (x *BookmarkFile) SetIsPrivate(UriVar string, IsPrivateVar bool) { | |
| 802 | + | core.LazyRegister(&xBookmarkFileSetIsPrivate, "GLIB", "g_bookmark_file_set_is_private", false) | |
| 803 | + | ||
| 750 | 804 | xBookmarkFileSetIsPrivate(x.GoPointer(), UriVar, IsPrivateVar) | |
| 751 | 805 | } | |
| 752 | 806 | ||
| @@ -756,6 +810,8 @@ var xBookmarkFileSetMimeType func(uintptr, string, string) | |||
| 756 | 810 | // | |
| 757 | 811 | // If a bookmark for @uri cannot be found then it is created. | |
| 758 | 812 | func (x *BookmarkFile) SetMimeType(UriVar string, MimeTypeVar string) { | |
| 813 | + | core.LazyRegister(&xBookmarkFileSetMimeType, "GLIB", "g_bookmark_file_set_mime_type", false) | |
| 814 | + | ||
| 759 | 815 | xBookmarkFileSetMimeType(x.GoPointer(), UriVar, MimeTypeVar) | |
| 760 | 816 | } | |
| 761 | 817 | ||
| @@ -770,6 +826,8 @@ var xBookmarkFileSetModified func(uintptr, string, int) | |||
| 770 | 826 | // modifies a bookmark also changes the modification time, except for | |
| 771 | 827 | // g_bookmark_file_set_visited_date_time(). | |
| 772 | 828 | func (x *BookmarkFile) SetModified(UriVar string, ModifiedVar int) { | |
| 829 | + | core.LazyRegister(&xBookmarkFileSetModified, "GLIB", "g_bookmark_file_set_modified", false) | |
| 830 | + | ||
| 773 | 831 | xBookmarkFileSetModified(x.GoPointer(), UriVar, ModifiedVar) | |
| 774 | 832 | } | |
| 775 | 833 | ||
| @@ -784,6 +842,8 @@ var xBookmarkFileSetModifiedDateTime func(uintptr, string, *DateTime) | |||
| 784 | 842 | // modifies a bookmark also changes the modification time, except for | |
| 785 | 843 | // g_bookmark_file_set_visited_date_time(). | |
| 786 | 844 | func (x *BookmarkFile) SetModifiedDateTime(UriVar string, ModifiedVar *DateTime) { | |
| 845 | + | core.LazyRegister(&xBookmarkFileSetModifiedDateTime, "GLIB", "g_bookmark_file_set_modified_date_time", false) | |
| 846 | + | ||
| 787 | 847 | xBookmarkFileSetModifiedDateTime(x.GoPointer(), UriVar, ModifiedVar) | |
| 788 | 848 | } | |
| 789 | 849 | ||
| @@ -796,6 +856,8 @@ var xBookmarkFileSetTitle func(uintptr, uintptr, string) | |||
| 796 | 856 | // | |
| 797 | 857 | // If a bookmark for @uri cannot be found then it is created. | |
| 798 | 858 | func (x *BookmarkFile) SetTitle(UriVar *string, TitleVar string) { | |
| 859 | + | core.LazyRegister(&xBookmarkFileSetTitle, "GLIB", "g_bookmark_file_set_title", false) | |
| 860 | + | ||
| 799 | 861 | UriVarPtr := core.GStrdupNullable(UriVar) | |
| 800 | 862 | defer core.GFreeNullable(UriVarPtr) | |
| 801 | 863 | ||
| @@ -814,6 +876,8 @@ var xBookmarkFileSetVisited func(uintptr, string, int) | |||
| 814 | 876 | // using g_bookmark_file_get_mime_type(). Changing the "visited" time | |
| 815 | 877 | // does not affect the "modified" time. | |
| 816 | 878 | func (x *BookmarkFile) SetVisited(UriVar string, VisitedVar int) { | |
| 879 | + | core.LazyRegister(&xBookmarkFileSetVisited, "GLIB", "g_bookmark_file_set_visited", false) | |
| 880 | + | ||
| 817 | 881 | xBookmarkFileSetVisited(x.GoPointer(), UriVar, VisitedVar) | |
| 818 | 882 | } | |
| 819 | 883 | ||
| @@ -829,6 +893,8 @@ var xBookmarkFileSetVisitedDateTime func(uintptr, string, *DateTime) | |||
| 829 | 893 | // using g_bookmark_file_get_mime_type(). Changing the "visited" time | |
| 830 | 894 | // does not affect the "modified" time. | |
| 831 | 895 | func (x *BookmarkFile) SetVisitedDateTime(UriVar string, VisitedVar *DateTime) { | |
| 896 | + | core.LazyRegister(&xBookmarkFileSetVisitedDateTime, "GLIB", "g_bookmark_file_set_visited_date_time", false) | |
| 897 | + | ||
| 832 | 898 | xBookmarkFileSetVisitedDateTime(x.GoPointer(), UriVar, VisitedVar) | |
| 833 | 899 | } | |
| 834 | 900 | ||
| @@ -836,6 +902,7 @@ var xBookmarkFileToData func(uintptr, *uint, **Error) uintptr | |||
| 836 | 902 | ||
| 837 | 903 | // This function outputs @bookmark as a string. | |
| 838 | 904 | func (x *BookmarkFile) ToData(LengthVar *uint) (uintptr, error) { | |
| 905 | + | core.LazyRegister(&xBookmarkFileToData, "GLIB", "g_bookmark_file_to_data", false) | |
| 839 | 906 | var cerr *Error | |
| 840 | 907 | ||
| 841 | 908 | cret := xBookmarkFileToData(x.GoPointer(), LengthVar, &cerr) | |
| @@ -850,6 +917,7 @@ var xBookmarkFileToFile func(uintptr, string, **Error) bool | |||
| 850 | 917 | // This function outputs @bookmark into a file. The write process is | |
| 851 | 918 | // guaranteed to be atomic by using g_file_set_contents() internally. | |
| 852 | 919 | func (x *BookmarkFile) ToFile(FilenameVar string) (bool, error) { | |
| 920 | + | core.LazyRegister(&xBookmarkFileToFile, "GLIB", "g_bookmark_file_to_file", false) | |
| 853 | 921 | var cerr *Error | |
| 854 | 922 | ||
| 855 | 923 | cret := xBookmarkFileToFile(x.GoPointer(), FilenameVar, &cerr) | |
| @@ -887,64 +955,4 @@ const ( | |||
| 887 | 955 | func init() { | |
| 888 | 956 | core.SetPackageName("GLIB", "glib-2.0") | |
| 889 | 957 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | |
| 890 | - | var libs []uintptr | |
| 891 | - | for _, libPath := range core.GetPaths("GLIB") { | |
| 892 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 893 | - | if err != nil { | |
| 894 | - | panic(err) | |
| 895 | - | } | |
| 896 | - | libs = append(libs, lib) | |
| 897 | - | } | |
| 898 | - | ||
| 899 | - | core.PuregoSafeRegister(&xBookmarkFileGLibType, libs, "g_bookmark_file_get_type") | |
| 900 | - | ||
| 901 | - | core.PuregoSafeRegister(&xNewBookmarkFile, libs, "g_bookmark_file_new") | |
| 902 | - | ||
| 903 | - | core.PuregoSafeRegister(&xBookmarkFileAddApplication, libs, "g_bookmark_file_add_application") | |
| 904 | - | core.PuregoSafeRegister(&xBookmarkFileAddGroup, libs, "g_bookmark_file_add_group") | |
| 905 | - | core.PuregoSafeRegister(&xBookmarkFileCopy, libs, "g_bookmark_file_copy") | |
| 906 | - | core.PuregoSafeRegister(&xBookmarkFileFree, libs, "g_bookmark_file_free") | |
| 907 | - | core.PuregoSafeRegister(&xBookmarkFileGetAdded, libs, "g_bookmark_file_get_added") | |
| 908 | - | core.PuregoSafeRegister(&xBookmarkFileGetAddedDateTime, libs, "g_bookmark_file_get_added_date_time") | |
| 909 | - | core.PuregoSafeRegister(&xBookmarkFileGetAppInfo, libs, "g_bookmark_file_get_app_info") | |
| 910 | - | core.PuregoSafeRegister(&xBookmarkFileGetApplicationInfo, libs, "g_bookmark_file_get_application_info") | |
| 911 | - | core.PuregoSafeRegister(&xBookmarkFileGetApplications, libs, "g_bookmark_file_get_applications") | |
| 912 | - | core.PuregoSafeRegister(&xBookmarkFileGetDescription, libs, "g_bookmark_file_get_description") | |
| 913 | - | core.PuregoSafeRegister(&xBookmarkFileGetGroups, libs, "g_bookmark_file_get_groups") | |
| 914 | - | core.PuregoSafeRegister(&xBookmarkFileGetIcon, libs, "g_bookmark_file_get_icon") | |
| 915 | - | core.PuregoSafeRegister(&xBookmarkFileGetIsPrivate, libs, "g_bookmark_file_get_is_private") | |
| 916 | - | core.PuregoSafeRegister(&xBookmarkFileGetMimeType, libs, "g_bookmark_file_get_mime_type") | |
| 917 | - | core.PuregoSafeRegister(&xBookmarkFileGetModified, libs, "g_bookmark_file_get_modified") | |
| 918 | - | core.PuregoSafeRegister(&xBookmarkFileGetModifiedDateTime, libs, "g_bookmark_file_get_modified_date_time") | |
| 919 | - | core.PuregoSafeRegister(&xBookmarkFileGetSize, libs, "g_bookmark_file_get_size") | |
| 920 | - | core.PuregoSafeRegister(&xBookmarkFileGetTitle, libs, "g_bookmark_file_get_title") | |
| 921 | - | core.PuregoSafeRegister(&xBookmarkFileGetUris, libs, "g_bookmark_file_get_uris") | |
| 922 | - | core.PuregoSafeRegister(&xBookmarkFileGetVisited, libs, "g_bookmark_file_get_visited") | |
| 923 | - | core.PuregoSafeRegister(&xBookmarkFileGetVisitedDateTime, libs, "g_bookmark_file_get_visited_date_time") | |
| 924 | - | core.PuregoSafeRegister(&xBookmarkFileHasApplication, libs, "g_bookmark_file_has_application") | |
| 925 | - | core.PuregoSafeRegister(&xBookmarkFileHasGroup, libs, "g_bookmark_file_has_group") | |
| 926 | - | core.PuregoSafeRegister(&xBookmarkFileHasItem, libs, "g_bookmark_file_has_item") | |
| 927 | - | core.PuregoSafeRegister(&xBookmarkFileLoadFromData, libs, "g_bookmark_file_load_from_data") | |
| 928 | - | core.PuregoSafeRegister(&xBookmarkFileLoadFromDataDirs, libs, "g_bookmark_file_load_from_data_dirs") | |
| 929 | - | core.PuregoSafeRegister(&xBookmarkFileLoadFromFile, libs, "g_bookmark_file_load_from_file") | |
| 930 | - | core.PuregoSafeRegister(&xBookmarkFileMoveItem, libs, "g_bookmark_file_move_item") | |
| 931 | - | core.PuregoSafeRegister(&xBookmarkFileRemoveApplication, libs, "g_bookmark_file_remove_application") | |
| 932 | - | core.PuregoSafeRegister(&xBookmarkFileRemoveGroup, libs, "g_bookmark_file_remove_group") | |
| 933 | - | core.PuregoSafeRegister(&xBookmarkFileRemoveItem, libs, "g_bookmark_file_remove_item") | |
| 934 | - | core.PuregoSafeRegister(&xBookmarkFileSetAdded, libs, "g_bookmark_file_set_added") | |
| 935 | - | core.PuregoSafeRegister(&xBookmarkFileSetAddedDateTime, libs, "g_bookmark_file_set_added_date_time") | |
| 936 | - | core.PuregoSafeRegister(&xBookmarkFileSetAppInfo, libs, "g_bookmark_file_set_app_info") | |
| 937 | - | core.PuregoSafeRegister(&xBookmarkFileSetApplicationInfo, libs, "g_bookmark_file_set_application_info") | |
| 938 | - | core.PuregoSafeRegister(&xBookmarkFileSetDescription, libs, "g_bookmark_file_set_description") | |
| 939 | - | core.PuregoSafeRegister(&xBookmarkFileSetGroups, libs, "g_bookmark_file_set_groups") | |
| 940 | - | core.PuregoSafeRegister(&xBookmarkFileSetIcon, libs, "g_bookmark_file_set_icon") | |
| 941 | - | core.PuregoSafeRegister(&xBookmarkFileSetIsPrivate, libs, "g_bookmark_file_set_is_private") | |
| 942 | - | core.PuregoSafeRegister(&xBookmarkFileSetMimeType, libs, "g_bookmark_file_set_mime_type") | |
| 943 | - | core.PuregoSafeRegister(&xBookmarkFileSetModified, libs, "g_bookmark_file_set_modified") | |
| 944 | - | core.PuregoSafeRegister(&xBookmarkFileSetModifiedDateTime, libs, "g_bookmark_file_set_modified_date_time") | |
| 945 | - | core.PuregoSafeRegister(&xBookmarkFileSetTitle, libs, "g_bookmark_file_set_title") | |
| 946 | - | core.PuregoSafeRegister(&xBookmarkFileSetVisited, libs, "g_bookmark_file_set_visited") | |
| 947 | - | core.PuregoSafeRegister(&xBookmarkFileSetVisitedDateTime, libs, "g_bookmark_file_set_visited_date_time") | |
| 948 | - | core.PuregoSafeRegister(&xBookmarkFileToData, libs, "g_bookmark_file_to_data") | |
| 949 | - | core.PuregoSafeRegister(&xBookmarkFileToFile, libs, "g_bookmark_file_to_file") | |
| 950 | 958 | } | |
| @@ -5,7 +5,6 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | - | "github.com/bnema/purego" | |||
| 9 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject/types" | 9 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| 11 | ) | 10 | ) | ||
| @@ -54,6 +53,7 @@ type BookmarkFile struct { | |||||
| 54 | var xBookmarkFileGLibType func() types.GType | 53 | var xBookmarkFileGLibType func() types.GType | ||
| 55 | 54 | ||||
| 56 | func BookmarkFileGLibType() types.GType { | 55 | func BookmarkFileGLibType() types.GType { | ||
| 56 | + | core.LazyRegister(&xBookmarkFileGLibType, "GLIB", "g_bookmark_file_get_type", false) | |||
| 57 | return xBookmarkFileGLibType() | 57 | return xBookmarkFileGLibType() | ||
| 58 | } | 58 | } | ||
| 59 | 59 | ||||
| @@ -77,6 +77,8 @@ var xNewBookmarkFile func() uintptr | |||||
| 77 | // or g_bookmark_file_load_from_data_dirs() to read an existing bookmark | 77 | // or g_bookmark_file_load_from_data_dirs() to read an existing bookmark | ||
| 78 | // file. | 78 | // file. | ||
| 79 | func NewBookmarkFile() *BookmarkFile { | 79 | func NewBookmarkFile() *BookmarkFile { | ||
| 80 | + | core.LazyRegister(&xNewBookmarkFile, "GLIB", "g_bookmark_file_new", false) | |||
| 81 | + | ||||
| 80 | cret := xNewBookmarkFile() | 82 | cret := xNewBookmarkFile() | ||
| 81 | if cret == 0 { | 83 | if cret == 0 { | ||
| 82 | return nil | 84 | return nil | ||
| @@ -109,6 +111,8 @@ var xBookmarkFileAddApplication func(uintptr, string, uintptr, uintptr) | |||||
| 109 | // | 111 | // | ||
| 110 | // If no bookmark for @uri is found, one is created. | 112 | // If no bookmark for @uri is found, one is created. | ||
| 111 | func (x *BookmarkFile) AddApplication(UriVar string, NameVar *string, ExecVar *string) { | 113 | func (x *BookmarkFile) AddApplication(UriVar string, NameVar *string, ExecVar *string) { | ||
| 114 | + | core.LazyRegister(&xBookmarkFileAddApplication, "GLIB", "g_bookmark_file_add_application", false) | |||
| 115 | + | ||||
| 112 | NameVarPtr := core.GStrdupNullable(NameVar) | 116 | NameVarPtr := core.GStrdupNullable(NameVar) | ||
| 113 | defer core.GFreeNullable(NameVarPtr) | 117 | defer core.GFreeNullable(NameVarPtr) | ||
| 114 | 118 | ||||
| @@ -125,6 +129,8 @@ var xBookmarkFileAddGroup func(uintptr, string, string) | |||||
| 125 | // | 129 | // | ||
| 126 | // If no bookmark for @uri is found then it is created. | 130 | // If no bookmark for @uri is found then it is created. | ||
| 127 | func (x *BookmarkFile) AddGroup(UriVar string, GroupVar string) { | 131 | func (x *BookmarkFile) AddGroup(UriVar string, GroupVar string) { | ||
| 132 | + | core.LazyRegister(&xBookmarkFileAddGroup, "GLIB", "g_bookmark_file_add_group", false) | |||
| 133 | + | ||||
| 128 | xBookmarkFileAddGroup(x.GoPointer(), UriVar, GroupVar) | 134 | xBookmarkFileAddGroup(x.GoPointer(), UriVar, GroupVar) | ||
| 129 | } | 135 | } | ||
| 130 | 136 | ||||
| @@ -132,6 +138,8 @@ var xBookmarkFileCopy func(uintptr) uintptr | |||||
| 132 | 138 | ||||
| 133 | // Deeply copies a @bookmark #GBookmarkFile object to a new one. | 139 | // Deeply copies a @bookmark #GBookmarkFile object to a new one. | ||
| 134 | func (x *BookmarkFile) Copy() *BookmarkFile { | 140 | func (x *BookmarkFile) Copy() *BookmarkFile { | ||
| 141 | + | core.LazyRegister(&xBookmarkFileCopy, "GLIB", "g_bookmark_file_copy", false) | |||
| 142 | + | ||||
| 135 | cret := xBookmarkFileCopy(x.GoPointer()) | 143 | cret := xBookmarkFileCopy(x.GoPointer()) | ||
| 136 | if cret == 0 { | 144 | if cret == 0 { | ||
| 137 | return nil | 145 | return nil | ||
| @@ -143,6 +151,8 @@ var xBookmarkFileFree func(uintptr) | |||||
| 143 | 151 | ||||
| 144 | // Frees a #GBookmarkFile. | 152 | // Frees a #GBookmarkFile. | ||
| 145 | func (x *BookmarkFile) Free() { | 153 | func (x *BookmarkFile) Free() { | ||
| 154 | + | core.LazyRegister(&xBookmarkFileFree, "GLIB", "g_bookmark_file_free", false) | |||
| 155 | + | ||||
| 146 | xBookmarkFileFree(x.GoPointer()) | 156 | xBookmarkFileFree(x.GoPointer()) | ||
| 147 | } | 157 | } | ||
| 148 | 158 | ||||
| @@ -153,6 +163,7 @@ var xBookmarkFileGetAdded func(uintptr, string, **Error) int | |||||
| 153 | // In the event the URI cannot be found, -1 is returned and | 163 | // In the event the URI cannot be found, -1 is returned and | ||
| 154 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 164 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 155 | func (x *BookmarkFile) GetAdded(UriVar string) (int, error) { | 165 | func (x *BookmarkFile) GetAdded(UriVar string) (int, error) { | ||
| 166 | + | core.LazyRegister(&xBookmarkFileGetAdded, "GLIB", "g_bookmark_file_get_added", false) | |||
| 156 | var cerr *Error | 167 | var cerr *Error | ||
| 157 | 168 | ||||
| 158 | cret := xBookmarkFileGetAdded(x.GoPointer(), UriVar, &cerr) | 169 | cret := xBookmarkFileGetAdded(x.GoPointer(), UriVar, &cerr) | ||
| @@ -169,6 +180,7 @@ var xBookmarkFileGetAddedDateTime func(uintptr, string, **Error) uintptr | |||||
| 169 | // In the event the URI cannot be found, %NULL is returned and | 180 | // In the event the URI cannot be found, %NULL is returned and | ||
| 170 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 181 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 171 | func (x *BookmarkFile) GetAddedDateTime(UriVar string) (*DateTime, error) { | 182 | func (x *BookmarkFile) GetAddedDateTime(UriVar string) (*DateTime, error) { | ||
| 183 | + | core.LazyRegister(&xBookmarkFileGetAddedDateTime, "GLIB", "g_bookmark_file_get_added_date_time", false) | |||
| 172 | var cerr *Error | 184 | var cerr *Error | ||
| 173 | 185 | ||||
| 174 | cret := xBookmarkFileGetAddedDateTime(x.GoPointer(), UriVar, &cerr) | 186 | cret := xBookmarkFileGetAddedDateTime(x.GoPointer(), UriVar, &cerr) | ||
| @@ -197,6 +209,7 @@ var xBookmarkFileGetAppInfo func(uintptr, string, string, *string, *uint, *int, | |||||
| 197 | // the command line fails, an error of the %G_SHELL_ERROR domain is | 209 | // the command line fails, an error of the %G_SHELL_ERROR domain is | ||
| 198 | // set and %FALSE is returned. | 210 | // set and %FALSE is returned. | ||
| 199 | func (x *BookmarkFile) GetAppInfo(UriVar string, NameVar string, ExecVar *string, CountVar *uint, StampVar *int) (bool, error) { | 211 | func (x *BookmarkFile) GetAppInfo(UriVar string, NameVar string, ExecVar *string, CountVar *uint, StampVar *int) (bool, error) { | ||
| 212 | + | core.LazyRegister(&xBookmarkFileGetAppInfo, "GLIB", "g_bookmark_file_get_app_info", false) | |||
| 200 | var cerr *Error | 213 | var cerr *Error | ||
| 201 | 214 | ||||
| 202 | cret := xBookmarkFileGetAppInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | 215 | cret := xBookmarkFileGetAppInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | ||
| @@ -222,6 +235,7 @@ var xBookmarkFileGetApplicationInfo func(uintptr, string, string, *string, *uint | |||||
| 222 | // the command line fails, an error of the %G_SHELL_ERROR domain is | 235 | // the command line fails, an error of the %G_SHELL_ERROR domain is | ||
| 223 | // set and %FALSE is returned. | 236 | // set and %FALSE is returned. | ||
| 224 | func (x *BookmarkFile) GetApplicationInfo(UriVar string, NameVar string, ExecVar *string, CountVar *uint, StampVar **DateTime) (bool, error) { | 237 | func (x *BookmarkFile) GetApplicationInfo(UriVar string, NameVar string, ExecVar *string, CountVar *uint, StampVar **DateTime) (bool, error) { | ||
| 238 | + | core.LazyRegister(&xBookmarkFileGetApplicationInfo, "GLIB", "g_bookmark_file_get_application_info", false) | |||
| 225 | var cerr *Error | 239 | var cerr *Error | ||
| 226 | 240 | ||||
| 227 | cret := xBookmarkFileGetApplicationInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | 241 | cret := xBookmarkFileGetApplicationInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | ||
| @@ -239,6 +253,7 @@ var xBookmarkFileGetApplications func(uintptr, string, *uint, **Error) []string | |||||
| 239 | // In the event the URI cannot be found, %NULL is returned and | 253 | // In the event the URI cannot be found, %NULL is returned and | ||
| 240 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 254 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 241 | func (x *BookmarkFile) GetApplications(UriVar string, LengthVar *uint) ([]string, error) { | 255 | func (x *BookmarkFile) GetApplications(UriVar string, LengthVar *uint) ([]string, error) { | ||
| 256 | + | core.LazyRegister(&xBookmarkFileGetApplications, "GLIB", "g_bookmark_file_get_applications", false) | |||
| 242 | var cerr *Error | 257 | var cerr *Error | ||
| 243 | 258 | ||||
| 244 | cret := xBookmarkFileGetApplications(x.GoPointer(), UriVar, LengthVar, &cerr) | 259 | cret := xBookmarkFileGetApplications(x.GoPointer(), UriVar, LengthVar, &cerr) | ||
| @@ -255,6 +270,7 @@ var xBookmarkFileGetDescription func(uintptr, string, **Error) string | |||||
| 255 | // In the event the URI cannot be found, %NULL is returned and | 270 | // In the event the URI cannot be found, %NULL is returned and | ||
| 256 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 271 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 257 | func (x *BookmarkFile) GetDescription(UriVar string) (string, error) { | 272 | func (x *BookmarkFile) GetDescription(UriVar string) (string, error) { | ||
| 273 | + | core.LazyRegister(&xBookmarkFileGetDescription, "GLIB", "g_bookmark_file_get_description", false) | |||
| 258 | var cerr *Error | 274 | var cerr *Error | ||
| 259 | 275 | ||||
| 260 | cret := xBookmarkFileGetDescription(x.GoPointer(), UriVar, &cerr) | 276 | cret := xBookmarkFileGetDescription(x.GoPointer(), UriVar, &cerr) | ||
| @@ -274,6 +290,7 @@ var xBookmarkFileGetGroups func(uintptr, string, *uint, **Error) []string | |||||
| 274 | // The returned array is %NULL terminated, so @length may optionally | 290 | // The returned array is %NULL terminated, so @length may optionally | ||
| 275 | // be %NULL. | 291 | // be %NULL. | ||
| 276 | func (x *BookmarkFile) GetGroups(UriVar string, LengthVar *uint) ([]string, error) { | 292 | func (x *BookmarkFile) GetGroups(UriVar string, LengthVar *uint) ([]string, error) { | ||
| 293 | + | core.LazyRegister(&xBookmarkFileGetGroups, "GLIB", "g_bookmark_file_get_groups", false) | |||
| 277 | var cerr *Error | 294 | var cerr *Error | ||
| 278 | 295 | ||||
| 279 | cret := xBookmarkFileGetGroups(x.GoPointer(), UriVar, LengthVar, &cerr) | 296 | cret := xBookmarkFileGetGroups(x.GoPointer(), UriVar, LengthVar, &cerr) | ||
| @@ -290,6 +307,7 @@ var xBookmarkFileGetIcon func(uintptr, string, *string, *string, **Error) bool | |||||
| 290 | // In the event the URI cannot be found, %FALSE is returned and | 307 | // In the event the URI cannot be found, %FALSE is returned and | ||
| 291 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 308 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 292 | func (x *BookmarkFile) GetIcon(UriVar string, HrefVar *string, MimeTypeVar *string) (bool, error) { | 309 | func (x *BookmarkFile) GetIcon(UriVar string, HrefVar *string, MimeTypeVar *string) (bool, error) { | ||
| 310 | + | core.LazyRegister(&xBookmarkFileGetIcon, "GLIB", "g_bookmark_file_get_icon", false) | |||
| 293 | var cerr *Error | 311 | var cerr *Error | ||
| 294 | 312 | ||||
| 295 | cret := xBookmarkFileGetIcon(x.GoPointer(), UriVar, HrefVar, MimeTypeVar, &cerr) | 313 | cret := xBookmarkFileGetIcon(x.GoPointer(), UriVar, HrefVar, MimeTypeVar, &cerr) | ||
| @@ -308,6 +326,7 @@ var xBookmarkFileGetIsPrivate func(uintptr, string, **Error) bool | |||||
| 308 | // event that the private flag cannot be found, %FALSE is returned and | 326 | // event that the private flag cannot be found, %FALSE is returned and | ||
| 309 | // @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. | 327 | // @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. | ||
| 310 | func (x *BookmarkFile) GetIsPrivate(UriVar string) (bool, error) { | 328 | func (x *BookmarkFile) GetIsPrivate(UriVar string) (bool, error) { | ||
| 329 | + | core.LazyRegister(&xBookmarkFileGetIsPrivate, "GLIB", "g_bookmark_file_get_is_private", false) | |||
| 311 | var cerr *Error | 330 | var cerr *Error | ||
| 312 | 331 | ||||
| 313 | cret := xBookmarkFileGetIsPrivate(x.GoPointer(), UriVar, &cerr) | 332 | cret := xBookmarkFileGetIsPrivate(x.GoPointer(), UriVar, &cerr) | ||
| @@ -326,6 +345,7 @@ var xBookmarkFileGetMimeType func(uintptr, string, **Error) string | |||||
| 326 | // event that the MIME type cannot be found, %NULL is returned and | 345 | // event that the MIME type cannot be found, %NULL is returned and | ||
| 327 | // @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. | 346 | // @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. | ||
| 328 | func (x *BookmarkFile) GetMimeType(UriVar string) (string, error) { | 347 | func (x *BookmarkFile) GetMimeType(UriVar string) (string, error) { | ||
| 348 | + | core.LazyRegister(&xBookmarkFileGetMimeType, "GLIB", "g_bookmark_file_get_mime_type", false) | |||
| 329 | var cerr *Error | 349 | var cerr *Error | ||
| 330 | 350 | ||||
| 331 | cret := xBookmarkFileGetMimeType(x.GoPointer(), UriVar, &cerr) | 351 | cret := xBookmarkFileGetMimeType(x.GoPointer(), UriVar, &cerr) | ||
| @@ -342,6 +362,7 @@ var xBookmarkFileGetModified func(uintptr, string, **Error) int | |||||
| 342 | // In the event the URI cannot be found, -1 is returned and | 362 | // In the event the URI cannot be found, -1 is returned and | ||
| 343 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 363 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 344 | func (x *BookmarkFile) GetModified(UriVar string) (int, error) { | 364 | func (x *BookmarkFile) GetModified(UriVar string) (int, error) { | ||
| 365 | + | core.LazyRegister(&xBookmarkFileGetModified, "GLIB", "g_bookmark_file_get_modified", false) | |||
| 345 | var cerr *Error | 366 | var cerr *Error | ||
| 346 | 367 | ||||
| 347 | cret := xBookmarkFileGetModified(x.GoPointer(), UriVar, &cerr) | 368 | cret := xBookmarkFileGetModified(x.GoPointer(), UriVar, &cerr) | ||
| @@ -358,6 +379,7 @@ var xBookmarkFileGetModifiedDateTime func(uintptr, string, **Error) uintptr | |||||
| 358 | // In the event the URI cannot be found, %NULL is returned and | 379 | // In the event the URI cannot be found, %NULL is returned and | ||
| 359 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 380 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 360 | func (x *BookmarkFile) GetModifiedDateTime(UriVar string) (*DateTime, error) { | 381 | func (x *BookmarkFile) GetModifiedDateTime(UriVar string) (*DateTime, error) { | ||
| 382 | + | core.LazyRegister(&xBookmarkFileGetModifiedDateTime, "GLIB", "g_bookmark_file_get_modified_date_time", false) | |||
| 361 | var cerr *Error | 383 | var cerr *Error | ||
| 362 | 384 | ||||
| 363 | cret := xBookmarkFileGetModifiedDateTime(x.GoPointer(), UriVar, &cerr) | 385 | cret := xBookmarkFileGetModifiedDateTime(x.GoPointer(), UriVar, &cerr) | ||
| @@ -374,6 +396,8 @@ var xBookmarkFileGetSize func(uintptr) int | |||||
| 374 | 396 | ||||
| 375 | // Gets the number of bookmarks inside @bookmark. | 397 | // Gets the number of bookmarks inside @bookmark. | ||
| 376 | func (x *BookmarkFile) GetSize() int { | 398 | func (x *BookmarkFile) GetSize() int { | ||
| 399 | + | core.LazyRegister(&xBookmarkFileGetSize, "GLIB", "g_bookmark_file_get_size", false) | |||
| 400 | + | ||||
| 377 | cret := xBookmarkFileGetSize(x.GoPointer()) | 401 | cret := xBookmarkFileGetSize(x.GoPointer()) | ||
| 378 | return cret | 402 | return cret | ||
| 379 | } | 403 | } | ||
| @@ -387,6 +411,7 @@ var xBookmarkFileGetTitle func(uintptr, uintptr, **Error) string | |||||
| 387 | // In the event the URI cannot be found, %NULL is returned and | 411 | // In the event the URI cannot be found, %NULL is returned and | ||
| 388 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 412 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 389 | func (x *BookmarkFile) GetTitle(UriVar *string) (string, error) { | 413 | func (x *BookmarkFile) GetTitle(UriVar *string) (string, error) { | ||
| 414 | + | core.LazyRegister(&xBookmarkFileGetTitle, "GLIB", "g_bookmark_file_get_title", false) | |||
| 390 | var cerr *Error | 415 | var cerr *Error | ||
| 391 | 416 | ||||
| 392 | UriVarPtr := core.GStrdupNullable(UriVar) | 417 | UriVarPtr := core.GStrdupNullable(UriVar) | ||
| @@ -405,6 +430,8 @@ var xBookmarkFileGetUris func(uintptr, *uint) []string | |||||
| 405 | // The array of returned URIs will be %NULL-terminated, so @length may | 430 | // The array of returned URIs will be %NULL-terminated, so @length may | ||
| 406 | // optionally be %NULL. | 431 | // optionally be %NULL. | ||
| 407 | func (x *BookmarkFile) GetUris(LengthVar *uint) []string { | 432 | func (x *BookmarkFile) GetUris(LengthVar *uint) []string { | ||
| 433 | + | core.LazyRegister(&xBookmarkFileGetUris, "GLIB", "g_bookmark_file_get_uris", false) | |||
| 434 | + | ||||
| 408 | cret := xBookmarkFileGetUris(x.GoPointer(), LengthVar) | 435 | cret := xBookmarkFileGetUris(x.GoPointer(), LengthVar) | ||
| 409 | return cret | 436 | return cret | ||
| 410 | } | 437 | } | ||
| @@ -416,6 +443,7 @@ var xBookmarkFileGetVisited func(uintptr, string, **Error) int | |||||
| 416 | // In the event the URI cannot be found, -1 is returned and | 443 | // In the event the URI cannot be found, -1 is returned and | ||
| 417 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 444 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 418 | func (x *BookmarkFile) GetVisited(UriVar string) (int, error) { | 445 | func (x *BookmarkFile) GetVisited(UriVar string) (int, error) { | ||
| 446 | + | core.LazyRegister(&xBookmarkFileGetVisited, "GLIB", "g_bookmark_file_get_visited", false) | |||
| 419 | var cerr *Error | 447 | var cerr *Error | ||
| 420 | 448 | ||||
| 421 | cret := xBookmarkFileGetVisited(x.GoPointer(), UriVar, &cerr) | 449 | cret := xBookmarkFileGetVisited(x.GoPointer(), UriVar, &cerr) | ||
| @@ -432,6 +460,7 @@ var xBookmarkFileGetVisitedDateTime func(uintptr, string, **Error) uintptr | |||||
| 432 | // In the event the URI cannot be found, %NULL is returned and | 460 | // In the event the URI cannot be found, %NULL is returned and | ||
| 433 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 461 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 434 | func (x *BookmarkFile) GetVisitedDateTime(UriVar string) (*DateTime, error) { | 462 | func (x *BookmarkFile) GetVisitedDateTime(UriVar string) (*DateTime, error) { | ||
| 463 | + | core.LazyRegister(&xBookmarkFileGetVisitedDateTime, "GLIB", "g_bookmark_file_get_visited_date_time", false) | |||
| 435 | var cerr *Error | 464 | var cerr *Error | ||
| 436 | 465 | ||||
| 437 | cret := xBookmarkFileGetVisitedDateTime(x.GoPointer(), UriVar, &cerr) | 466 | cret := xBookmarkFileGetVisitedDateTime(x.GoPointer(), UriVar, &cerr) | ||
| @@ -452,6 +481,7 @@ var xBookmarkFileHasApplication func(uintptr, string, string, **Error) bool | |||||
| 452 | // In the event the URI cannot be found, %FALSE is returned and | 481 | // In the event the URI cannot be found, %FALSE is returned and | ||
| 453 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 482 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 454 | func (x *BookmarkFile) HasApplication(UriVar string, NameVar string) (bool, error) { | 483 | func (x *BookmarkFile) HasApplication(UriVar string, NameVar string) (bool, error) { | ||
| 484 | + | core.LazyRegister(&xBookmarkFileHasApplication, "GLIB", "g_bookmark_file_has_application", false) | |||
| 455 | var cerr *Error | 485 | var cerr *Error | ||
| 456 | 486 | ||||
| 457 | cret := xBookmarkFileHasApplication(x.GoPointer(), UriVar, NameVar, &cerr) | 487 | cret := xBookmarkFileHasApplication(x.GoPointer(), UriVar, NameVar, &cerr) | ||
| @@ -469,6 +499,7 @@ var xBookmarkFileHasGroup func(uintptr, string, string, **Error) bool | |||||
| 469 | // In the event the URI cannot be found, %FALSE is returned and | 499 | // In the event the URI cannot be found, %FALSE is returned and | ||
| 470 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 500 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 471 | func (x *BookmarkFile) HasGroup(UriVar string, GroupVar string) (bool, error) { | 501 | func (x *BookmarkFile) HasGroup(UriVar string, GroupVar string) (bool, error) { | ||
| 502 | + | core.LazyRegister(&xBookmarkFileHasGroup, "GLIB", "g_bookmark_file_has_group", false) | |||
| 472 | var cerr *Error | 503 | var cerr *Error | ||
| 473 | 504 | ||||
| 474 | cret := xBookmarkFileHasGroup(x.GoPointer(), UriVar, GroupVar, &cerr) | 505 | cret := xBookmarkFileHasGroup(x.GoPointer(), UriVar, GroupVar, &cerr) | ||
| @@ -482,6 +513,8 @@ var xBookmarkFileHasItem func(uintptr, string) bool | |||||
| 482 | 513 | ||||
| 483 | // Looks whether the desktop bookmark has an item with its URI set to @uri. | 514 | // Looks whether the desktop bookmark has an item with its URI set to @uri. | ||
| 484 | func (x *BookmarkFile) HasItem(UriVar string) bool { | 515 | func (x *BookmarkFile) HasItem(UriVar string) bool { | ||
| 516 | + | core.LazyRegister(&xBookmarkFileHasItem, "GLIB", "g_bookmark_file_has_item", false) | |||
| 517 | + | ||||
| 485 | cret := xBookmarkFileHasItem(x.GoPointer(), UriVar) | 518 | cret := xBookmarkFileHasItem(x.GoPointer(), UriVar) | ||
| 486 | return cret | 519 | return cret | ||
| 487 | } | 520 | } | ||
| @@ -492,6 +525,7 @@ var xBookmarkFileLoadFromData func(uintptr, []byte, uint, **Error) bool | |||||
| 492 | // structure. If the object cannot be created then @error is set to a | 525 | // structure. If the object cannot be created then @error is set to a | ||
| 493 | // #GBookmarkFileError. | 526 | // #GBookmarkFileError. | ||
| 494 | func (x *BookmarkFile) LoadFromData(DataVar []byte, LengthVar uint) (bool, error) { | 527 | func (x *BookmarkFile) LoadFromData(DataVar []byte, LengthVar uint) (bool, error) { | ||
| 528 | + | core.LazyRegister(&xBookmarkFileLoadFromData, "GLIB", "g_bookmark_file_load_from_data", false) | |||
| 495 | var cerr *Error | 529 | var cerr *Error | ||
| 496 | 530 | ||||
| 497 | cret := xBookmarkFileLoadFromData(x.GoPointer(), DataVar, LengthVar, &cerr) | 531 | cret := xBookmarkFileLoadFromData(x.GoPointer(), DataVar, LengthVar, &cerr) | ||
| @@ -509,6 +543,7 @@ var xBookmarkFileLoadFromDataDirs func(uintptr, string, *string, **Error) bool | |||||
| 509 | // @full_path. If the file could not be loaded then @error is | 543 | // @full_path. If the file could not be loaded then @error is | ||
| 510 | // set to either a #GFileError or #GBookmarkFileError. | 544 | // set to either a #GFileError or #GBookmarkFileError. | ||
| 511 | func (x *BookmarkFile) LoadFromDataDirs(FileVar string, FullPathVar *string) (bool, error) { | 545 | func (x *BookmarkFile) LoadFromDataDirs(FileVar string, FullPathVar *string) (bool, error) { | ||
| 546 | + | core.LazyRegister(&xBookmarkFileLoadFromDataDirs, "GLIB", "g_bookmark_file_load_from_data_dirs", false) | |||
| 512 | var cerr *Error | 547 | var cerr *Error | ||
| 513 | 548 | ||||
| 514 | cret := xBookmarkFileLoadFromDataDirs(x.GoPointer(), FileVar, FullPathVar, &cerr) | 549 | cret := xBookmarkFileLoadFromDataDirs(x.GoPointer(), FileVar, FullPathVar, &cerr) | ||
| @@ -524,6 +559,7 @@ var xBookmarkFileLoadFromFile func(uintptr, string, **Error) bool | |||||
| 524 | // If the file could not be loaded then @error is set to either a #GFileError | 559 | // If the file could not be loaded then @error is set to either a #GFileError | ||
| 525 | // or #GBookmarkFileError. | 560 | // or #GBookmarkFileError. | ||
| 526 | func (x *BookmarkFile) LoadFromFile(FilenameVar string) (bool, error) { | 561 | func (x *BookmarkFile) LoadFromFile(FilenameVar string) (bool, error) { | ||
| 562 | + | core.LazyRegister(&xBookmarkFileLoadFromFile, "GLIB", "g_bookmark_file_load_from_file", false) | |||
| 527 | var cerr *Error | 563 | var cerr *Error | ||
| 528 | 564 | ||||
| 529 | cret := xBookmarkFileLoadFromFile(x.GoPointer(), FilenameVar, &cerr) | 565 | cret := xBookmarkFileLoadFromFile(x.GoPointer(), FilenameVar, &cerr) | ||
| @@ -542,6 +578,7 @@ var xBookmarkFileMoveItem func(uintptr, string, uintptr, **Error) bool | |||||
| 542 | // In the event the URI cannot be found, %FALSE is returned and | 578 | // In the event the URI cannot be found, %FALSE is returned and | ||
| 543 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | 579 | // @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. | ||
| 544 | func (x *BookmarkFile) MoveItem(OldUriVar string, NewUriVar *string) (bool, error) { | 580 | func (x *BookmarkFile) MoveItem(OldUriVar string, NewUriVar *string) (bool, error) { | ||
| 581 | + | core.LazyRegister(&xBookmarkFileMoveItem, "GLIB", "g_bookmark_file_move_item", false) | |||
| 545 | var cerr *Error | 582 | var cerr *Error | ||
| 546 | 583 | ||||
| 547 | NewUriVarPtr := core.GStrdupNullable(NewUriVar) | 584 | NewUriVarPtr := core.GStrdupNullable(NewUriVar) | ||
| @@ -565,6 +602,7 @@ var xBookmarkFileRemoveApplication func(uintptr, string, string, **Error) bool | |||||
| 565 | // a bookmark for @uri, %FALSE is returned and error is set to | 602 | // a bookmark for @uri, %FALSE is returned and error is set to | ||
| 566 | // %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. | 603 | // %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. | ||
| 567 | func (x *BookmarkFile) RemoveApplication(UriVar string, NameVar string) (bool, error) { | 604 | func (x *BookmarkFile) RemoveApplication(UriVar string, NameVar string) (bool, error) { | ||
| 605 | + | core.LazyRegister(&xBookmarkFileRemoveApplication, "GLIB", "g_bookmark_file_remove_application", false) | |||
| 568 | var cerr *Error | 606 | var cerr *Error | ||
| 569 | 607 | ||||
| 570 | cret := xBookmarkFileRemoveApplication(x.GoPointer(), UriVar, NameVar, &cerr) | 608 | cret := xBookmarkFileRemoveApplication(x.GoPointer(), UriVar, NameVar, &cerr) | ||
| @@ -584,6 +622,7 @@ var xBookmarkFileRemoveGroup func(uintptr, string, string, **Error) bool | |||||
| 584 | // In the event no group was defined, %FALSE is returned and | 622 | // In the event no group was defined, %FALSE is returned and | ||
| 585 | // @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. | 623 | // @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. | ||
| 586 | func (x *BookmarkFile) RemoveGroup(UriVar string, GroupVar string) (bool, error) { | 624 | func (x *BookmarkFile) RemoveGroup(UriVar string, GroupVar string) (bool, error) { | ||
| 625 | + | core.LazyRegister(&xBookmarkFileRemoveGroup, "GLIB", "g_bookmark_file_remove_group", false) | |||
| 587 | var cerr *Error | 626 | var cerr *Error | ||
| 588 | 627 | ||||
| 589 | cret := xBookmarkFileRemoveGroup(x.GoPointer(), UriVar, GroupVar, &cerr) | 628 | cret := xBookmarkFileRemoveGroup(x.GoPointer(), UriVar, GroupVar, &cerr) | ||
| @@ -597,6 +636,7 @@ var xBookmarkFileRemoveItem func(uintptr, string, **Error) bool | |||||
| 597 | 636 | ||||
| 598 | // Removes the bookmark for @uri from the bookmark file @bookmark. | 637 | // Removes the bookmark for @uri from the bookmark file @bookmark. | ||
| 599 | func (x *BookmarkFile) RemoveItem(UriVar string) (bool, error) { | 638 | func (x *BookmarkFile) RemoveItem(UriVar string) (bool, error) { | ||
| 639 | + | core.LazyRegister(&xBookmarkFileRemoveItem, "GLIB", "g_bookmark_file_remove_item", false) | |||
| 600 | var cerr *Error | 640 | var cerr *Error | ||
| 601 | 641 | ||||
| 602 | cret := xBookmarkFileRemoveItem(x.GoPointer(), UriVar, &cerr) | 642 | cret := xBookmarkFileRemoveItem(x.GoPointer(), UriVar, &cerr) | ||
| @@ -612,6 +652,8 @@ var xBookmarkFileSetAdded func(uintptr, string, int) | |||||
| 612 | // | 652 | // | ||
| 613 | // If no bookmark for @uri is found then it is created. | 653 | // If no bookmark for @uri is found then it is created. | ||
| 614 | func (x *BookmarkFile) SetAdded(UriVar string, AddedVar int) { | 654 | func (x *BookmarkFile) SetAdded(UriVar string, AddedVar int) { | ||
| 655 | + | core.LazyRegister(&xBookmarkFileSetAdded, "GLIB", "g_bookmark_file_set_added", false) | |||
| 656 | + | ||||
| 615 | xBookmarkFileSetAdded(x.GoPointer(), UriVar, AddedVar) | 657 | xBookmarkFileSetAdded(x.GoPointer(), UriVar, AddedVar) | ||
| 616 | } | 658 | } | ||
| 617 | 659 | ||||
| @@ -621,6 +663,8 @@ var xBookmarkFileSetAddedDateTime func(uintptr, string, *DateTime) | |||||
| 621 | // | 663 | // | ||
| 622 | // If no bookmark for @uri is found then it is created. | 664 | // If no bookmark for @uri is found then it is created. | ||
| 623 | func (x *BookmarkFile) SetAddedDateTime(UriVar string, AddedVar *DateTime) { | 665 | func (x *BookmarkFile) SetAddedDateTime(UriVar string, AddedVar *DateTime) { | ||
| 666 | + | core.LazyRegister(&xBookmarkFileSetAddedDateTime, "GLIB", "g_bookmark_file_set_added_date_time", false) | |||
| 667 | + | ||||
| 624 | xBookmarkFileSetAddedDateTime(x.GoPointer(), UriVar, AddedVar) | 668 | xBookmarkFileSetAddedDateTime(x.GoPointer(), UriVar, AddedVar) | ||
| 625 | } | 669 | } | ||
| 626 | 670 | ||||
| @@ -655,6 +699,7 @@ var xBookmarkFileSetAppInfo func(uintptr, string, string, string, int, int, **Er | |||||
| 655 | // %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark | 699 | // %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark | ||
| 656 | // for @uri is found, one is created. | 700 | // for @uri is found, one is created. | ||
| 657 | func (x *BookmarkFile) SetAppInfo(UriVar string, NameVar string, ExecVar string, CountVar int, StampVar int) (bool, error) { | 701 | func (x *BookmarkFile) SetAppInfo(UriVar string, NameVar string, ExecVar string, CountVar int, StampVar int) (bool, error) { | ||
| 702 | + | core.LazyRegister(&xBookmarkFileSetAppInfo, "GLIB", "g_bookmark_file_set_app_info", false) | |||
| 658 | var cerr *Error | 703 | var cerr *Error | ||
| 659 | 704 | ||||
| 660 | cret := xBookmarkFileSetAppInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | 705 | cret := xBookmarkFileSetAppInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | ||
| @@ -694,6 +739,7 @@ var xBookmarkFileSetApplicationInfo func(uintptr, string, string, string, int, * | |||||
| 694 | // %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark | 739 | // %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark | ||
| 695 | // for @uri is found, one is created. | 740 | // for @uri is found, one is created. | ||
| 696 | func (x *BookmarkFile) SetApplicationInfo(UriVar string, NameVar string, ExecVar string, CountVar int, StampVar *DateTime) (bool, error) { | 741 | func (x *BookmarkFile) SetApplicationInfo(UriVar string, NameVar string, ExecVar string, CountVar int, StampVar *DateTime) (bool, error) { | ||
| 742 | + | core.LazyRegister(&xBookmarkFileSetApplicationInfo, "GLIB", "g_bookmark_file_set_application_info", false) | |||
| 697 | var cerr *Error | 743 | var cerr *Error | ||
| 698 | 744 | ||||
| 699 | cret := xBookmarkFileSetApplicationInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | 745 | cret := xBookmarkFileSetApplicationInfo(x.GoPointer(), UriVar, NameVar, ExecVar, CountVar, StampVar, &cerr) | ||
| @@ -711,6 +757,8 @@ var xBookmarkFileSetDescription func(uintptr, uintptr, string) | |||||
| 711 | // | 757 | // | ||
| 712 | // If a bookmark for @uri cannot be found then it is created. | 758 | // If a bookmark for @uri cannot be found then it is created. | ||
| 713 | func (x *BookmarkFile) SetDescription(UriVar *string, DescriptionVar string) { | 759 | func (x *BookmarkFile) SetDescription(UriVar *string, DescriptionVar string) { | ||
| 760 | + | core.LazyRegister(&xBookmarkFileSetDescription, "GLIB", "g_bookmark_file_set_description", false) | |||
| 761 | + | ||||
| 714 | UriVarPtr := core.GStrdupNullable(UriVar) | 762 | UriVarPtr := core.GStrdupNullable(UriVar) | ||
| 715 | defer core.GFreeNullable(UriVarPtr) | 763 | defer core.GFreeNullable(UriVarPtr) | ||
| 716 | 764 | ||||
| @@ -724,6 +772,8 @@ var xBookmarkFileSetGroups func(uintptr, string, []string, uint) | |||||
| 724 | // | 772 | // | ||
| 725 | // If @uri cannot be found then an item for it is created. | 773 | // If @uri cannot be found then an item for it is created. | ||
| 726 | func (x *BookmarkFile) SetGroups(UriVar string, GroupsVar []string, LengthVar uint) { | 774 | func (x *BookmarkFile) SetGroups(UriVar string, GroupsVar []string, LengthVar uint) { | ||
| 775 | + | core.LazyRegister(&xBookmarkFileSetGroups, "GLIB", "g_bookmark_file_set_groups", false) | |||
| 776 | + | ||||
| 727 | xBookmarkFileSetGroups(x.GoPointer(), UriVar, GroupsVar, LengthVar) | 777 | xBookmarkFileSetGroups(x.GoPointer(), UriVar, GroupsVar, LengthVar) | ||
| 728 | } | 778 | } | ||
| 729 | 779 | ||||
| @@ -735,6 +785,8 @@ var xBookmarkFileSetIcon func(uintptr, string, uintptr, string) | |||||
| 735 | // | 785 | // | ||
| 736 | // If no bookmark for @uri is found one is created. | 786 | // If no bookmark for @uri is found one is created. | ||
| 737 | func (x *BookmarkFile) SetIcon(UriVar string, HrefVar *string, MimeTypeVar string) { | 787 | func (x *BookmarkFile) SetIcon(UriVar string, HrefVar *string, MimeTypeVar string) { | ||
| 788 | + | core.LazyRegister(&xBookmarkFileSetIcon, "GLIB", "g_bookmark_file_set_icon", false) | |||
| 789 | + | ||||
| 738 | HrefVarPtr := core.GStrdupNullable(HrefVar) | 790 | HrefVarPtr := core.GStrdupNullable(HrefVar) | ||
| 739 | defer core.GFreeNullable(HrefVarPtr) | 791 | defer core.GFreeNullable(HrefVarPtr) | ||
| 740 | 792 | ||||
| @@ -747,6 +799,8 @@ var xBookmarkFileSetIsPrivate func(uintptr, string, bool) | |||||
| 747 | // | 799 | // | ||
| 748 | // If a bookmark for @uri cannot be found then it is created. | 800 | // If a bookmark for @uri cannot be found then it is created. | ||
| 749 | func (x *BookmarkFile) SetIsPrivate(UriVar string, IsPrivateVar bool) { | 801 | func (x *BookmarkFile) SetIsPrivate(UriVar string, IsPrivateVar bool) { | ||
| 802 | + | core.LazyRegister(&xBookmarkFileSetIsPrivate, "GLIB", "g_bookmark_file_set_is_private", false) | |||
| 803 | + | ||||
| 750 | xBookmarkFileSetIsPrivate(x.GoPointer(), UriVar, IsPrivateVar) | 804 | xBookmarkFileSetIsPrivate(x.GoPointer(), UriVar, IsPrivateVar) | ||
| 751 | } | 805 | } | ||
| 752 | 806 | ||||
| @@ -756,6 +810,8 @@ var xBookmarkFileSetMimeType func(uintptr, string, string) | |||||
| 756 | // | 810 | // | ||
| 757 | // If a bookmark for @uri cannot be found then it is created. | 811 | // If a bookmark for @uri cannot be found then it is created. | ||
| 758 | func (x *BookmarkFile) SetMimeType(UriVar string, MimeTypeVar string) { | 812 | func (x *BookmarkFile) SetMimeType(UriVar string, MimeTypeVar string) { | ||
| 813 | + | core.LazyRegister(&xBookmarkFileSetMimeType, "GLIB", "g_bookmark_file_set_mime_type", false) | |||
| 814 | + | ||||
| 759 | xBookmarkFileSetMimeType(x.GoPointer(), UriVar, MimeTypeVar) | 815 | xBookmarkFileSetMimeType(x.GoPointer(), UriVar, MimeTypeVar) | ||
| 760 | } | 816 | } | ||
| 761 | 817 | ||||
| @@ -770,6 +826,8 @@ var xBookmarkFileSetModified func(uintptr, string, int) | |||||
| 770 | // modifies a bookmark also changes the modification time, except for | 826 | // modifies a bookmark also changes the modification time, except for | ||
| 771 | // g_bookmark_file_set_visited_date_time(). | 827 | // g_bookmark_file_set_visited_date_time(). | ||
| 772 | func (x *BookmarkFile) SetModified(UriVar string, ModifiedVar int) { | 828 | func (x *BookmarkFile) SetModified(UriVar string, ModifiedVar int) { | ||
| 829 | + | core.LazyRegister(&xBookmarkFileSetModified, "GLIB", "g_bookmark_file_set_modified", false) | |||
| 830 | + | ||||
| 773 | xBookmarkFileSetModified(x.GoPointer(), UriVar, ModifiedVar) | 831 | xBookmarkFileSetModified(x.GoPointer(), UriVar, ModifiedVar) | ||
| 774 | } | 832 | } | ||
| 775 | 833 | ||||
| @@ -784,6 +842,8 @@ var xBookmarkFileSetModifiedDateTime func(uintptr, string, *DateTime) | |||||
| 784 | // modifies a bookmark also changes the modification time, except for | 842 | // modifies a bookmark also changes the modification time, except for | ||
| 785 | // g_bookmark_file_set_visited_date_time(). | 843 | // g_bookmark_file_set_visited_date_time(). | ||
| 786 | func (x *BookmarkFile) SetModifiedDateTime(UriVar string, ModifiedVar *DateTime) { | 844 | func (x *BookmarkFile) SetModifiedDateTime(UriVar string, ModifiedVar *DateTime) { | ||
| 845 | + | core.LazyRegister(&xBookmarkFileSetModifiedDateTime, "GLIB", "g_bookmark_file_set_modified_date_time", false) | |||
| 846 | + | ||||
| 787 | xBookmarkFileSetModifiedDateTime(x.GoPointer(), UriVar, ModifiedVar) | 847 | xBookmarkFileSetModifiedDateTime(x.GoPointer(), UriVar, ModifiedVar) | ||
| 788 | } | 848 | } | ||
| 789 | 849 | ||||
| @@ -796,6 +856,8 @@ var xBookmarkFileSetTitle func(uintptr, uintptr, string) | |||||
| 796 | // | 856 | // | ||
| 797 | // If a bookmark for @uri cannot be found then it is created. | 857 | // If a bookmark for @uri cannot be found then it is created. | ||
| 798 | func (x *BookmarkFile) SetTitle(UriVar *string, TitleVar string) { | 858 | func (x *BookmarkFile) SetTitle(UriVar *string, TitleVar string) { | ||
| 859 | + | core.LazyRegister(&xBookmarkFileSetTitle, "GLIB", "g_bookmark_file_set_title", false) | |||
| 860 | + | ||||
| 799 | UriVarPtr := core.GStrdupNullable(UriVar) | 861 | UriVarPtr := core.GStrdupNullable(UriVar) | ||
| 800 | defer core.GFreeNullable(UriVarPtr) | 862 | defer core.GFreeNullable(UriVarPtr) | ||
| 801 | 863 | ||||
| @@ -814,6 +876,8 @@ var xBookmarkFileSetVisited func(uintptr, string, int) | |||||
| 814 | // using g_bookmark_file_get_mime_type(). Changing the "visited" time | 876 | // using g_bookmark_file_get_mime_type(). Changing the "visited" time | ||
| 815 | // does not affect the "modified" time. | 877 | // does not affect the "modified" time. | ||
| 816 | func (x *BookmarkFile) SetVisited(UriVar string, VisitedVar int) { | 878 | func (x *BookmarkFile) SetVisited(UriVar string, VisitedVar int) { | ||
| 879 | + | core.LazyRegister(&xBookmarkFileSetVisited, "GLIB", "g_bookmark_file_set_visited", false) | |||
| 880 | + | ||||
| 817 | xBookmarkFileSetVisited(x.GoPointer(), UriVar, VisitedVar) | 881 | xBookmarkFileSetVisited(x.GoPointer(), UriVar, VisitedVar) | ||
| 818 | } | 882 | } | ||
| 819 | 883 | ||||
| @@ -829,6 +893,8 @@ var xBookmarkFileSetVisitedDateTime func(uintptr, string, *DateTime) | |||||
| 829 | // using g_bookmark_file_get_mime_type(). Changing the "visited" time | 893 | // using g_bookmark_file_get_mime_type(). Changing the "visited" time | ||
| 830 | // does not affect the "modified" time. | 894 | // does not affect the "modified" time. | ||
| 831 | func (x *BookmarkFile) SetVisitedDateTime(UriVar string, VisitedVar *DateTime) { | 895 | func (x *BookmarkFile) SetVisitedDateTime(UriVar string, VisitedVar *DateTime) { | ||
| 896 | + | core.LazyRegister(&xBookmarkFileSetVisitedDateTime, "GLIB", "g_bookmark_file_set_visited_date_time", false) | |||
| 897 | + | ||||
| 832 | xBookmarkFileSetVisitedDateTime(x.GoPointer(), UriVar, VisitedVar) | 898 | xBookmarkFileSetVisitedDateTime(x.GoPointer(), UriVar, VisitedVar) | ||
| 833 | } | 899 | } | ||
| 834 | 900 | ||||
| @@ -836,6 +902,7 @@ var xBookmarkFileToData func(uintptr, *uint, **Error) uintptr | |||||
| 836 | 902 | ||||
| 837 | // This function outputs @bookmark as a string. | 903 | // This function outputs @bookmark as a string. | ||
| 838 | func (x *BookmarkFile) ToData(LengthVar *uint) (uintptr, error) { | 904 | func (x *BookmarkFile) ToData(LengthVar *uint) (uintptr, error) { | ||
| 905 | + | core.LazyRegister(&xBookmarkFileToData, "GLIB", "g_bookmark_file_to_data", false) | |||
| 839 | var cerr *Error | 906 | var cerr *Error | ||
| 840 | 907 | ||||
| 841 | cret := xBookmarkFileToData(x.GoPointer(), LengthVar, &cerr) | 908 | cret := xBookmarkFileToData(x.GoPointer(), LengthVar, &cerr) | ||
| @@ -850,6 +917,7 @@ var xBookmarkFileToFile func(uintptr, string, **Error) bool | |||||
| 850 | // This function outputs @bookmark into a file. The write process is | 917 | // This function outputs @bookmark into a file. The write process is | ||
| 851 | // guaranteed to be atomic by using g_file_set_contents() internally. | 918 | // guaranteed to be atomic by using g_file_set_contents() internally. | ||
| 852 | func (x *BookmarkFile) ToFile(FilenameVar string) (bool, error) { | 919 | func (x *BookmarkFile) ToFile(FilenameVar string) (bool, error) { | ||
| 920 | + | core.LazyRegister(&xBookmarkFileToFile, "GLIB", "g_bookmark_file_to_file", false) | |||
| 853 | var cerr *Error | 921 | var cerr *Error | ||
| 854 | 922 | ||||
| 855 | cret := xBookmarkFileToFile(x.GoPointer(), FilenameVar, &cerr) | 923 | cret := xBookmarkFileToFile(x.GoPointer(), FilenameVar, &cerr) | ||
| @@ -887,64 +955,4 @@ const ( | |||||
| 887 | func init() { | 955 | func init() { | ||
| 888 | core.SetPackageName("GLIB", "glib-2.0") | 956 | core.SetPackageName("GLIB", "glib-2.0") | ||
| 889 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | 957 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | ||
| 890 | - | var libs []uintptr | |||
| 891 | - | for _, libPath := range core.GetPaths("GLIB") { | |||
| 892 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 893 | - | if err != nil { | |||
| 894 | - | panic(err) | |||
| 895 | - | } | |||
| 896 | - | libs = append(libs, lib) | |||
| 897 | - | } | |||
| 898 | - | ||||
| 899 | - | core.PuregoSafeRegister(&xBookmarkFileGLibType, libs, "g_bookmark_file_get_type") | |||
| 900 | - | ||||
| 901 | - | core.PuregoSafeRegister(&xNewBookmarkFile, libs, "g_bookmark_file_new") | |||
| 902 | - | ||||
| 903 | - | core.PuregoSafeRegister(&xBookmarkFileAddApplication, libs, "g_bookmark_file_add_application") | |||
| 904 | - | core.PuregoSafeRegister(&xBookmarkFileAddGroup, libs, "g_bookmark_file_add_group") | |||
| 905 | - | core.PuregoSafeRegister(&xBookmarkFileCopy, libs, "g_bookmark_file_copy") | |||
| 906 | - | core.PuregoSafeRegister(&xBookmarkFileFree, libs, "g_bookmark_file_free") | |||
| 907 | - | core.PuregoSafeRegister(&xBookmarkFileGetAdded, libs, "g_bookmark_file_get_added") | |||
| 908 | - | core.PuregoSafeRegister(&xBookmarkFileGetAddedDateTime, libs, "g_bookmark_file_get_added_date_time") | |||
| 909 | - | core.PuregoSafeRegister(&xBookmarkFileGetAppInfo, libs, "g_bookmark_file_get_app_info") | |||
| 910 | - | core.PuregoSafeRegister(&xBookmarkFileGetApplicationInfo, libs, "g_bookmark_file_get_application_info") | |||
| 911 | - | core.PuregoSafeRegister(&xBookmarkFileGetApplications, libs, "g_bookmark_file_get_applications") | |||
| 912 | - | core.PuregoSafeRegister(&xBookmarkFileGetDescription, libs, "g_bookmark_file_get_description") | |||
| 913 | - | core.PuregoSafeRegister(&xBookmarkFileGetGroups, libs, "g_bookmark_file_get_groups") | |||
| 914 | - | core.PuregoSafeRegister(&xBookmarkFileGetIcon, libs, "g_bookmark_file_get_icon") | |||
| 915 | - | core.PuregoSafeRegister(&xBookmarkFileGetIsPrivate, libs, "g_bookmark_file_get_is_private") | |||
| 916 | - | core.PuregoSafeRegister(&xBookmarkFileGetMimeType, libs, "g_bookmark_file_get_mime_type") | |||
| 917 | - | core.PuregoSafeRegister(&xBookmarkFileGetModified, libs, "g_bookmark_file_get_modified") | |||
| 918 | - | core.PuregoSafeRegister(&xBookmarkFileGetModifiedDateTime, libs, "g_bookmark_file_get_modified_date_time") | |||
| 919 | - | core.PuregoSafeRegister(&xBookmarkFileGetSize, libs, "g_bookmark_file_get_size") | |||
| 920 | - | core.PuregoSafeRegister(&xBookmarkFileGetTitle, libs, "g_bookmark_file_get_title") | |||
| 921 | - | core.PuregoSafeRegister(&xBookmarkFileGetUris, libs, "g_bookmark_file_get_uris") | |||
| 922 | - | core.PuregoSafeRegister(&xBookmarkFileGetVisited, libs, "g_bookmark_file_get_visited") | |||
| 923 | - | core.PuregoSafeRegister(&xBookmarkFileGetVisitedDateTime, libs, "g_bookmark_file_get_visited_date_time") | |||
| 924 | - | core.PuregoSafeRegister(&xBookmarkFileHasApplication, libs, "g_bookmark_file_has_application") | |||
| 925 | - | core.PuregoSafeRegister(&xBookmarkFileHasGroup, libs, "g_bookmark_file_has_group") | |||
| 926 | - | core.PuregoSafeRegister(&xBookmarkFileHasItem, libs, "g_bookmark_file_has_item") | |||
| 927 | - | core.PuregoSafeRegister(&xBookmarkFileLoadFromData, libs, "g_bookmark_file_load_from_data") | |||
| 928 | - | core.PuregoSafeRegister(&xBookmarkFileLoadFromDataDirs, libs, "g_bookmark_file_load_from_data_dirs") | |||
| 929 | - | core.PuregoSafeRegister(&xBookmarkFileLoadFromFile, libs, "g_bookmark_file_load_from_file") | |||
| 930 | - | core.PuregoSafeRegister(&xBookmarkFileMoveItem, libs, "g_bookmark_file_move_item") | |||
| 931 | - | core.PuregoSafeRegister(&xBookmarkFileRemoveApplication, libs, "g_bookmark_file_remove_application") | |||
| 932 | - | core.PuregoSafeRegister(&xBookmarkFileRemoveGroup, libs, "g_bookmark_file_remove_group") | |||
| 933 | - | core.PuregoSafeRegister(&xBookmarkFileRemoveItem, libs, "g_bookmark_file_remove_item") | |||
| 934 | - | core.PuregoSafeRegister(&xBookmarkFileSetAdded, libs, "g_bookmark_file_set_added") | |||
| 935 | - | core.PuregoSafeRegister(&xBookmarkFileSetAddedDateTime, libs, "g_bookmark_file_set_added_date_time") | |||
| 936 | - | core.PuregoSafeRegister(&xBookmarkFileSetAppInfo, libs, "g_bookmark_file_set_app_info") | |||
| 937 | - | core.PuregoSafeRegister(&xBookmarkFileSetApplicationInfo, libs, "g_bookmark_file_set_application_info") | |||
| 938 | - | core.PuregoSafeRegister(&xBookmarkFileSetDescription, libs, "g_bookmark_file_set_description") | |||
| 939 | - | core.PuregoSafeRegister(&xBookmarkFileSetGroups, libs, "g_bookmark_file_set_groups") | |||
| 940 | - | core.PuregoSafeRegister(&xBookmarkFileSetIcon, libs, "g_bookmark_file_set_icon") | |||
| 941 | - | core.PuregoSafeRegister(&xBookmarkFileSetIsPrivate, libs, "g_bookmark_file_set_is_private") | |||
| 942 | - | core.PuregoSafeRegister(&xBookmarkFileSetMimeType, libs, "g_bookmark_file_set_mime_type") | |||
| 943 | - | core.PuregoSafeRegister(&xBookmarkFileSetModified, libs, "g_bookmark_file_set_modified") | |||
| 944 | - | core.PuregoSafeRegister(&xBookmarkFileSetModifiedDateTime, libs, "g_bookmark_file_set_modified_date_time") | |||
| 945 | - | core.PuregoSafeRegister(&xBookmarkFileSetTitle, libs, "g_bookmark_file_set_title") | |||
| 946 | - | core.PuregoSafeRegister(&xBookmarkFileSetVisited, libs, "g_bookmark_file_set_visited") | |||
| 947 | - | core.PuregoSafeRegister(&xBookmarkFileSetVisitedDateTime, libs, "g_bookmark_file_set_visited_date_time") | |||
| 948 | - | core.PuregoSafeRegister(&xBookmarkFileToData, libs, "g_bookmark_file_to_data") | |||
| 949 | - | core.PuregoSafeRegister(&xBookmarkFileToFile, libs, "g_bookmark_file_to_file") | |||
| 950 | } | 958 | } | ||