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
| @@ -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/gio" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -138,6 +137,7 @@ type ViewStack struct { | |||
| 138 | 137 | var xViewStackGLibType func() types.GType | |
| 139 | 138 | ||
| 140 | 139 | func ViewStackGLibType() types.GType { | |
| 140 | + | core.LazyRegister(&xViewStackGLibType, "ADW", "adw_view_stack_get_type", false) | |
| 141 | 141 | return xViewStackGLibType() | |
| 142 | 142 | } | |
| 143 | 143 | ||
| @@ -151,6 +151,7 @@ var xNewViewStack func() uintptr | |||
| 151 | 151 | ||
| 152 | 152 | // Creates a new `AdwViewStack`. | |
| 153 | 153 | func NewViewStack() *ViewStack { | |
| 154 | + | core.LazyRegister(&xNewViewStack, "ADW", "adw_view_stack_new", false) | |
| 154 | 155 | var cls *ViewStack | |
| 155 | 156 | ||
| 156 | 157 | cret := xNewViewStack() | |
| @@ -168,6 +169,7 @@ var xViewStackAdd func(uintptr, uintptr) uintptr | |||
| 168 | 169 | ||
| 169 | 170 | // Adds a child to @self. | |
| 170 | 171 | func (x *ViewStack) Add(ChildVar *gtk.Widget) *ViewStackPage { | |
| 172 | + | core.LazyRegister(&xViewStackAdd, "ADW", "adw_view_stack_add", false) | |
| 171 | 173 | var cls *ViewStackPage | |
| 172 | 174 | ||
| 173 | 175 | cret := xViewStackAdd(x.GoPointer(), ChildVar.GoPointer()) | |
| @@ -187,6 +189,7 @@ var xViewStackAddNamed func(uintptr, uintptr, uintptr) uintptr | |||
| 187 | 189 | // | |
| 188 | 190 | // The child is identified by the @name. | |
| 189 | 191 | func (x *ViewStack) AddNamed(ChildVar *gtk.Widget, NameVar *string) *ViewStackPage { | |
| 192 | + | core.LazyRegister(&xViewStackAddNamed, "ADW", "adw_view_stack_add_named", false) | |
| 190 | 193 | var cls *ViewStackPage | |
| 191 | 194 | ||
| 192 | 195 | NameVarPtr := core.GStrdupNullable(NameVar) | |
| @@ -210,6 +213,7 @@ var xViewStackAddTitled func(uintptr, uintptr, uintptr, string) uintptr | |||
| 210 | 213 | // The child is identified by the @name. The @title will be used by | |
| 211 | 214 | // [class@ViewSwitcher] to represent @child, so it should be short. | |
| 212 | 215 | func (x *ViewStack) AddTitled(ChildVar *gtk.Widget, NameVar *string, TitleVar string) *ViewStackPage { | |
| 216 | + | core.LazyRegister(&xViewStackAddTitled, "ADW", "adw_view_stack_add_titled", false) | |
| 213 | 217 | var cls *ViewStackPage | |
| 214 | 218 | ||
| 215 | 219 | NameVarPtr := core.GStrdupNullable(NameVar) | |
| @@ -233,6 +237,7 @@ var xViewStackAddTitledWithIcon func(uintptr, uintptr, uintptr, string, string) | |||
| 233 | 237 | // The child is identified by the @name. The @title and @icon_name will be used | |
| 234 | 238 | // by [class@ViewSwitcher] to represent @child. | |
| 235 | 239 | func (x *ViewStack) AddTitledWithIcon(ChildVar *gtk.Widget, NameVar *string, TitleVar string, IconNameVar string) *ViewStackPage { | |
| 240 | + | core.LazyRegister(&xViewStackAddTitledWithIcon, "ADW", "adw_view_stack_add_titled_with_icon", false) | |
| 236 | 241 | var cls *ViewStackPage | |
| 237 | 242 | ||
| 238 | 243 | NameVarPtr := core.GStrdupNullable(NameVar) | |
| @@ -253,6 +258,7 @@ var xViewStackGetChildByName func(uintptr, string) uintptr | |||
| 253 | 258 | ||
| 254 | 259 | // Finds the child with @name in @self. | |
| 255 | 260 | func (x *ViewStack) GetChildByName(NameVar string) *gtk.Widget { | |
| 261 | + | core.LazyRegister(&xViewStackGetChildByName, "ADW", "adw_view_stack_get_child_by_name", false) | |
| 256 | 262 | var cls *gtk.Widget | |
| 257 | 263 | ||
| 258 | 264 | cret := xViewStackGetChildByName(x.GoPointer(), NameVar) | |
| @@ -274,6 +280,8 @@ var xViewStackGetEnableTransitions func(uintptr) bool | |||
| 274 | 280 | // [property@ViewStack:transition-running] to know when the transition is | |
| 275 | 281 | // running. | |
| 276 | 282 | func (x *ViewStack) GetEnableTransitions() bool { | |
| 283 | + | core.LazyRegister(&xViewStackGetEnableTransitions, "ADW", "adw_view_stack_get_enable_transitions", false) | |
| 284 | + | ||
| 277 | 285 | cret := xViewStackGetEnableTransitions(x.GoPointer()) | |
| 278 | 286 | return cret | |
| 279 | 287 | } | |
| @@ -282,6 +290,8 @@ var xViewStackGetHhomogeneous func(uintptr) bool | |||
| 282 | 290 | ||
| 283 | 291 | // Gets whether @self is horizontally homogeneous. | |
| 284 | 292 | func (x *ViewStack) GetHhomogeneous() bool { | |
| 293 | + | core.LazyRegister(&xViewStackGetHhomogeneous, "ADW", "adw_view_stack_get_hhomogeneous", false) | |
| 294 | + | ||
| 285 | 295 | cret := xViewStackGetHhomogeneous(x.GoPointer()) | |
| 286 | 296 | return cret | |
| 287 | 297 | } | |
| @@ -290,6 +300,7 @@ var xViewStackGetPage func(uintptr, uintptr) uintptr | |||
| 290 | 300 | ||
| 291 | 301 | // Gets the [class@ViewStackPage] object for @child. | |
| 292 | 302 | func (x *ViewStack) GetPage(ChildVar *gtk.Widget) *ViewStackPage { | |
| 303 | + | core.LazyRegister(&xViewStackGetPage, "ADW", "adw_view_stack_get_page", false) | |
| 293 | 304 | var cls *ViewStackPage | |
| 294 | 305 | ||
| 295 | 306 | cret := xViewStackGetPage(x.GoPointer(), ChildVar.GoPointer()) | |
| @@ -315,6 +326,7 @@ var xViewStackGetPages func(uintptr) uintptr | |||
| 315 | 326 | // The model also implements [iface@Gtk.SelectionModel] and can be used to track | |
| 316 | 327 | // and change the visible page. | |
| 317 | 328 | func (x *ViewStack) GetPages() *gtk.SelectionModelBase { | |
| 329 | + | core.LazyRegister(&xViewStackGetPages, "ADW", "adw_view_stack_get_pages", false) | |
| 318 | 330 | var cls *gtk.SelectionModelBase | |
| 319 | 331 | ||
| 320 | 332 | cret := xViewStackGetPages(x.GoPointer()) | |
| @@ -331,6 +343,8 @@ var xViewStackGetTransitionDuration func(uintptr) uint | |||
| 331 | 343 | ||
| 332 | 344 | // Gets the transition animation duration for @self. | |
| 333 | 345 | func (x *ViewStack) GetTransitionDuration() uint { | |
| 346 | + | core.LazyRegister(&xViewStackGetTransitionDuration, "ADW", "adw_view_stack_get_transition_duration", false) | |
| 347 | + | ||
| 334 | 348 | cret := xViewStackGetTransitionDuration(x.GoPointer()) | |
| 335 | 349 | return cret | |
| 336 | 350 | } | |
| @@ -343,6 +357,8 @@ var xViewStackGetTransitionRunning func(uintptr) bool | |||
| 343 | 357 | // then immediately to `FALSE`, so it's possible to rely on its notifications | |
| 344 | 358 | // to know that a transition has happened. | |
| 345 | 359 | func (x *ViewStack) GetTransitionRunning() bool { | |
| 360 | + | core.LazyRegister(&xViewStackGetTransitionRunning, "ADW", "adw_view_stack_get_transition_running", false) | |
| 361 | + | ||
| 346 | 362 | cret := xViewStackGetTransitionRunning(x.GoPointer()) | |
| 347 | 363 | return cret | |
| 348 | 364 | } | |
| @@ -351,6 +367,8 @@ var xViewStackGetVhomogeneous func(uintptr) bool | |||
| 351 | 367 | ||
| 352 | 368 | // Gets whether @self is vertically homogeneous. | |
| 353 | 369 | func (x *ViewStack) GetVhomogeneous() bool { | |
| 370 | + | core.LazyRegister(&xViewStackGetVhomogeneous, "ADW", "adw_view_stack_get_vhomogeneous", false) | |
| 371 | + | ||
| 354 | 372 | cret := xViewStackGetVhomogeneous(x.GoPointer()) | |
| 355 | 373 | return cret | |
| 356 | 374 | } | |
| @@ -359,6 +377,7 @@ var xViewStackGetVisibleChild func(uintptr) uintptr | |||
| 359 | 377 | ||
| 360 | 378 | // Gets the currently visible child of @self. | |
| 361 | 379 | func (x *ViewStack) GetVisibleChild() *gtk.Widget { | |
| 380 | + | core.LazyRegister(&xViewStackGetVisibleChild, "ADW", "adw_view_stack_get_visible_child", false) | |
| 362 | 381 | var cls *gtk.Widget | |
| 363 | 382 | ||
| 364 | 383 | cret := xViewStackGetVisibleChild(x.GoPointer()) | |
| @@ -376,6 +395,8 @@ var xViewStackGetVisibleChildName func(uintptr) string | |||
| 376 | 395 | ||
| 377 | 396 | // Returns the name of the currently visible child of @self. | |
| 378 | 397 | func (x *ViewStack) GetVisibleChildName() string { | |
| 398 | + | core.LazyRegister(&xViewStackGetVisibleChildName, "ADW", "adw_view_stack_get_visible_child_name", false) | |
| 399 | + | ||
| 379 | 400 | cret := xViewStackGetVisibleChildName(x.GoPointer()) | |
| 380 | 401 | return cret | |
| 381 | 402 | } | |
| @@ -384,6 +405,8 @@ var xViewStackRemove func(uintptr, uintptr) | |||
| 384 | 405 | ||
| 385 | 406 | // Removes a child widget from @self. | |
| 386 | 407 | func (x *ViewStack) Remove(ChildVar *gtk.Widget) { | |
| 408 | + | core.LazyRegister(&xViewStackRemove, "ADW", "adw_view_stack_remove", false) | |
| 409 | + | ||
| 387 | 410 | xViewStackRemove(x.GoPointer(), ChildVar.GoPointer()) | |
| 388 | 411 | } | |
| 389 | 412 | ||
| @@ -391,6 +414,8 @@ var xViewStackSetEnableTransitions func(uintptr, bool) | |||
| 391 | 414 | ||
| 392 | 415 | // Sets whether @self uses a crossfade transition between pages. | |
| 393 | 416 | func (x *ViewStack) SetEnableTransitions(EnableTransitionsVar bool) { | |
| 417 | + | core.LazyRegister(&xViewStackSetEnableTransitions, "ADW", "adw_view_stack_set_enable_transitions", false) | |
| 418 | + | ||
| 394 | 419 | xViewStackSetEnableTransitions(x.GoPointer(), EnableTransitionsVar) | |
| 395 | 420 | } | |
| 396 | 421 | ||
| @@ -404,6 +429,8 @@ var xViewStackSetHhomogeneous func(uintptr, bool) | |||
| 404 | 429 | // If it's `FALSE`, the stack may change width when a different child becomes | |
| 405 | 430 | // visible. | |
| 406 | 431 | func (x *ViewStack) SetHhomogeneous(HhomogeneousVar bool) { | |
| 432 | + | core.LazyRegister(&xViewStackSetHhomogeneous, "ADW", "adw_view_stack_set_hhomogeneous", false) | |
| 433 | + | ||
| 407 | 434 | xViewStackSetHhomogeneous(x.GoPointer(), HhomogeneousVar) | |
| 408 | 435 | } | |
| 409 | 436 | ||
| @@ -413,6 +440,8 @@ var xViewStackSetTransitionDuration func(uintptr, uint) | |||
| 413 | 440 | // | |
| 414 | 441 | // Only used when [property@ViewStack:enable-transitions] is set to `TRUE`. | |
| 415 | 442 | func (x *ViewStack) SetTransitionDuration(DurationVar uint) { | |
| 443 | + | core.LazyRegister(&xViewStackSetTransitionDuration, "ADW", "adw_view_stack_set_transition_duration", false) | |
| 444 | + | ||
| 416 | 445 | xViewStackSetTransitionDuration(x.GoPointer(), DurationVar) | |
| 417 | 446 | } | |
| 418 | 447 | ||
| @@ -426,6 +455,8 @@ var xViewStackSetVhomogeneous func(uintptr, bool) | |||
| 426 | 455 | // If it's `FALSE`, the stack may change height when a different child becomes | |
| 427 | 456 | // visible. | |
| 428 | 457 | func (x *ViewStack) SetVhomogeneous(VhomogeneousVar bool) { | |
| 458 | + | core.LazyRegister(&xViewStackSetVhomogeneous, "ADW", "adw_view_stack_set_vhomogeneous", false) | |
| 459 | + | ||
| 429 | 460 | xViewStackSetVhomogeneous(x.GoPointer(), VhomogeneousVar) | |
| 430 | 461 | } | |
| 431 | 462 | ||
| @@ -433,6 +464,8 @@ var xViewStackSetVisibleChild func(uintptr, uintptr) | |||
| 433 | 464 | ||
| 434 | 465 | // Makes @child the visible child of @self. | |
| 435 | 466 | func (x *ViewStack) SetVisibleChild(ChildVar *gtk.Widget) { | |
| 467 | + | core.LazyRegister(&xViewStackSetVisibleChild, "ADW", "adw_view_stack_set_visible_child", false) | |
| 468 | + | ||
| 436 | 469 | xViewStackSetVisibleChild(x.GoPointer(), ChildVar.GoPointer()) | |
| 437 | 470 | } | |
| 438 | 471 | ||
| @@ -442,6 +475,8 @@ var xViewStackSetVisibleChildName func(uintptr, string) | |||
| 442 | 475 | // | |
| 443 | 476 | // See [property@ViewStack:visible-child]. | |
| 444 | 477 | func (x *ViewStack) SetVisibleChildName(NameVar string) { | |
| 478 | + | core.LazyRegister(&xViewStackSetVisibleChildName, "ADW", "adw_view_stack_set_visible_child_name", false) | |
| 479 | + | ||
| 445 | 480 | xViewStackSetVisibleChildName(x.GoPointer(), NameVar) | |
| 446 | 481 | } | |
| 447 | 482 | ||
| @@ -861,6 +896,7 @@ type ViewStackPage struct { | |||
| 861 | 896 | var xViewStackPageGLibType func() types.GType | |
| 862 | 897 | ||
| 863 | 898 | func ViewStackPageGLibType() types.GType { | |
| 899 | + | core.LazyRegister(&xViewStackPageGLibType, "ADW", "adw_view_stack_page_get_type", false) | |
| 864 | 900 | return xViewStackPageGLibType() | |
| 865 | 901 | } | |
| 866 | 902 | ||
| @@ -874,6 +910,8 @@ var xViewStackPageGetBadgeNumber func(uintptr) uint | |||
| 874 | 910 | ||
| 875 | 911 | // Gets the badge number for this page. | |
| 876 | 912 | func (x *ViewStackPage) GetBadgeNumber() uint { | |
| 913 | + | core.LazyRegister(&xViewStackPageGetBadgeNumber, "ADW", "adw_view_stack_page_get_badge_number", false) | |
| 914 | + | ||
| 877 | 915 | cret := xViewStackPageGetBadgeNumber(x.GoPointer()) | |
| 878 | 916 | return cret | |
| 879 | 917 | } | |
| @@ -882,6 +920,7 @@ var xViewStackPageGetChild func(uintptr) uintptr | |||
| 882 | 920 | ||
| 883 | 921 | // Gets the stack child to which @self belongs. | |
| 884 | 922 | func (x *ViewStackPage) GetChild() *gtk.Widget { | |
| 923 | + | core.LazyRegister(&xViewStackPageGetChild, "ADW", "adw_view_stack_page_get_child", false) | |
| 885 | 924 | var cls *gtk.Widget | |
| 886 | 925 | ||
| 887 | 926 | cret := xViewStackPageGetChild(x.GoPointer()) | |
| @@ -899,6 +938,8 @@ var xViewStackPageGetIconName func(uintptr) string | |||
| 899 | 938 | ||
| 900 | 939 | // Gets the icon name of the page. | |
| 901 | 940 | func (x *ViewStackPage) GetIconName() string { | |
| 941 | + | core.LazyRegister(&xViewStackPageGetIconName, "ADW", "adw_view_stack_page_get_icon_name", false) | |
| 942 | + | ||
| 902 | 943 | cret := xViewStackPageGetIconName(x.GoPointer()) | |
| 903 | 944 | return cret | |
| 904 | 945 | } | |
| @@ -907,6 +948,8 @@ var xViewStackPageGetName func(uintptr) string | |||
| 907 | 948 | ||
| 908 | 949 | // Gets the name of the page. | |
| 909 | 950 | func (x *ViewStackPage) GetName() string { | |
| 951 | + | core.LazyRegister(&xViewStackPageGetName, "ADW", "adw_view_stack_page_get_name", false) | |
| 952 | + | ||
| 910 | 953 | cret := xViewStackPageGetName(x.GoPointer()) | |
| 911 | 954 | return cret | |
| 912 | 955 | } | |
| @@ -915,6 +958,8 @@ var xViewStackPageGetNeedsAttention func(uintptr) bool | |||
| 915 | 958 | ||
| 916 | 959 | // Gets whether the page requires the user attention. | |
| 917 | 960 | func (x *ViewStackPage) GetNeedsAttention() bool { | |
| 961 | + | core.LazyRegister(&xViewStackPageGetNeedsAttention, "ADW", "adw_view_stack_page_get_needs_attention", false) | |
| 962 | + | ||
| 918 | 963 | cret := xViewStackPageGetNeedsAttention(x.GoPointer()) | |
| 919 | 964 | return cret | |
| 920 | 965 | } | |
| @@ -923,6 +968,8 @@ var xViewStackPageGetSectionTitle func(uintptr) string | |||
| 923 | 968 | ||
| 924 | 969 | // Gets the section title for @self. | |
| 925 | 970 | func (x *ViewStackPage) GetSectionTitle() string { | |
| 971 | + | core.LazyRegister(&xViewStackPageGetSectionTitle, "ADW", "adw_view_stack_page_get_section_title", false) | |
| 972 | + | ||
| 926 | 973 | cret := xViewStackPageGetSectionTitle(x.GoPointer()) | |
| 927 | 974 | return cret | |
| 928 | 975 | } | |
| @@ -931,6 +978,8 @@ var xViewStackPageGetStartsSection func(uintptr) bool | |||
| 931 | 978 | ||
| 932 | 979 | // Gets whether @self starts a section. | |
| 933 | 980 | func (x *ViewStackPage) GetStartsSection() bool { | |
| 981 | + | core.LazyRegister(&xViewStackPageGetStartsSection, "ADW", "adw_view_stack_page_get_starts_section", false) | |
| 982 | + | ||
| 934 | 983 | cret := xViewStackPageGetStartsSection(x.GoPointer()) | |
| 935 | 984 | return cret | |
| 936 | 985 | } | |
| @@ -939,6 +988,8 @@ var xViewStackPageGetTitle func(uintptr) string | |||
| 939 | 988 | ||
| 940 | 989 | // Gets the page title. | |
| 941 | 990 | func (x *ViewStackPage) GetTitle() string { | |
| 991 | + | core.LazyRegister(&xViewStackPageGetTitle, "ADW", "adw_view_stack_page_get_title", false) | |
| 992 | + | ||
| 942 | 993 | cret := xViewStackPageGetTitle(x.GoPointer()) | |
| 943 | 994 | return cret | |
| 944 | 995 | } | |
| @@ -947,6 +998,8 @@ var xViewStackPageGetUseUnderline func(uintptr) bool | |||
| 947 | 998 | ||
| 948 | 999 | // Gets whether underlines in the page title indicate mnemonics. | |
| 949 | 1000 | func (x *ViewStackPage) GetUseUnderline() bool { | |
| 1001 | + | core.LazyRegister(&xViewStackPageGetUseUnderline, "ADW", "adw_view_stack_page_get_use_underline", false) | |
| 1002 | + | ||
| 950 | 1003 | cret := xViewStackPageGetUseUnderline(x.GoPointer()) | |
| 951 | 1004 | return cret | |
| 952 | 1005 | } | |
| @@ -958,6 +1011,8 @@ var xViewStackPageGetVisible func(uintptr) bool | |||
| 958 | 1011 | // This is independent from the [property@Gtk.Widget:visible] | |
| 959 | 1012 | // property of its widget. | |
| 960 | 1013 | func (x *ViewStackPage) GetVisible() bool { | |
| 1014 | + | core.LazyRegister(&xViewStackPageGetVisible, "ADW", "adw_view_stack_page_get_visible", false) | |
| 1015 | + | ||
| 961 | 1016 | cret := xViewStackPageGetVisible(x.GoPointer()) | |
| 962 | 1017 | return cret | |
| 963 | 1018 | } | |
| @@ -971,6 +1026,8 @@ var xViewStackPageSetBadgeNumber func(uintptr, uint) | |||
| 971 | 1026 | // | |
| 972 | 1027 | // It can be used together with [property@ViewStack{age}:needs-attention]. | |
| 973 | 1028 | func (x *ViewStackPage) SetBadgeNumber(BadgeNumberVar uint) { | |
| 1029 | + | core.LazyRegister(&xViewStackPageSetBadgeNumber, "ADW", "adw_view_stack_page_set_badge_number", false) | |
| 1030 | + | ||
| 974 | 1031 | xViewStackPageSetBadgeNumber(x.GoPointer(), BadgeNumberVar) | |
| 975 | 1032 | } | |
| 976 | 1033 | ||
| @@ -978,6 +1035,8 @@ var xViewStackPageSetIconName func(uintptr, uintptr) | |||
| 978 | 1035 | ||
| 979 | 1036 | // Sets the icon name of the page. | |
| 980 | 1037 | func (x *ViewStackPage) SetIconName(IconNameVar *string) { | |
| 1038 | + | core.LazyRegister(&xViewStackPageSetIconName, "ADW", "adw_view_stack_page_set_icon_name", false) | |
| 1039 | + | ||
| 981 | 1040 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | |
| 982 | 1041 | defer core.GFreeNullable(IconNameVarPtr) | |
| 983 | 1042 | ||
| @@ -988,6 +1047,8 @@ var xViewStackPageSetName func(uintptr, uintptr) | |||
| 988 | 1047 | ||
| 989 | 1048 | // Sets the name of the page. | |
| 990 | 1049 | func (x *ViewStackPage) SetName(NameVar *string) { | |
| 1050 | + | core.LazyRegister(&xViewStackPageSetName, "ADW", "adw_view_stack_page_set_name", false) | |
| 1051 | + | ||
| 991 | 1052 | NameVarPtr := core.GStrdupNullable(NameVar) | |
| 992 | 1053 | defer core.GFreeNullable(NameVarPtr) | |
| 993 | 1054 | ||
| @@ -1000,6 +1061,8 @@ var xViewStackPageSetNeedsAttention func(uintptr, bool) | |||
| 1000 | 1061 | // | |
| 1001 | 1062 | // [class@ViewSwitcher] will display it as a dot next to the page icon. | |
| 1002 | 1063 | func (x *ViewStackPage) SetNeedsAttention(NeedsAttentionVar bool) { | |
| 1064 | + | core.LazyRegister(&xViewStackPageSetNeedsAttention, "ADW", "adw_view_stack_page_set_needs_attention", false) | |
| 1065 | + | ||
| 1003 | 1066 | xViewStackPageSetNeedsAttention(x.GoPointer(), NeedsAttentionVar) | |
| 1004 | 1067 | } | |
| 1005 | 1068 | ||
| @@ -1009,6 +1072,8 @@ var xViewStackPageSetSectionTitle func(uintptr, uintptr) | |||
| 1009 | 1072 | // | |
| 1010 | 1073 | // Does nothing unless [property@ViewStackPage:starts-section] is set. | |
| 1011 | 1074 | func (x *ViewStackPage) SetSectionTitle(SectionTitleVar *string) { | |
| 1075 | + | core.LazyRegister(&xViewStackPageSetSectionTitle, "ADW", "adw_view_stack_page_set_section_title", false) | |
| 1076 | + | ||
| 1012 | 1077 | SectionTitleVarPtr := core.GStrdupNullable(SectionTitleVar) | |
| 1013 | 1078 | defer core.GFreeNullable(SectionTitleVarPtr) | |
| 1014 | 1079 | ||
| @@ -1025,6 +1090,8 @@ var xViewStackPageSetStartsSection func(uintptr, bool) | |||
| 1025 | 1090 | // If [property@ViewStackPage:section-title] is set, it should be used as a | |
| 1026 | 1091 | // title for the section. | |
| 1027 | 1092 | func (x *ViewStackPage) SetStartsSection(StartsSectionVar bool) { | |
| 1093 | + | core.LazyRegister(&xViewStackPageSetStartsSection, "ADW", "adw_view_stack_page_set_starts_section", false) | |
| 1094 | + | ||
| 1028 | 1095 | xViewStackPageSetStartsSection(x.GoPointer(), StartsSectionVar) | |
| 1029 | 1096 | } | |
| 1030 | 1097 | ||
| @@ -1032,6 +1099,8 @@ var xViewStackPageSetTitle func(uintptr, uintptr) | |||
| 1032 | 1099 | ||
| 1033 | 1100 | // Sets the page title. | |
| 1034 | 1101 | func (x *ViewStackPage) SetTitle(TitleVar *string) { | |
| 1102 | + | core.LazyRegister(&xViewStackPageSetTitle, "ADW", "adw_view_stack_page_set_title", false) | |
| 1103 | + | ||
| 1035 | 1104 | TitleVarPtr := core.GStrdupNullable(TitleVar) | |
| 1036 | 1105 | defer core.GFreeNullable(TitleVarPtr) | |
| 1037 | 1106 | ||
| @@ -1042,6 +1111,8 @@ var xViewStackPageSetUseUnderline func(uintptr, bool) | |||
| 1042 | 1111 | ||
| 1043 | 1112 | // Sets whether underlines in the page title indicate mnemonics. | |
| 1044 | 1113 | func (x *ViewStackPage) SetUseUnderline(UseUnderlineVar bool) { | |
| 1114 | + | core.LazyRegister(&xViewStackPageSetUseUnderline, "ADW", "adw_view_stack_page_set_use_underline", false) | |
| 1115 | + | ||
| 1045 | 1116 | xViewStackPageSetUseUnderline(x.GoPointer(), UseUnderlineVar) | |
| 1046 | 1117 | } | |
| 1047 | 1118 | ||
| @@ -1052,6 +1123,8 @@ var xViewStackPageSetVisible func(uintptr, bool) | |||
| 1052 | 1123 | // This is independent from the [property@Gtk.Widget:visible] property of | |
| 1053 | 1124 | // [property@ViewStackPage:child]. | |
| 1054 | 1125 | func (x *ViewStackPage) SetVisible(VisibleVar bool) { | |
| 1126 | + | core.LazyRegister(&xViewStackPageSetVisible, "ADW", "adw_view_stack_page_set_visible", false) | |
| 1127 | + | ||
| 1055 | 1128 | xViewStackPageSetVisible(x.GoPointer(), VisibleVar) | |
| 1056 | 1129 | } | |
| 1057 | 1130 | ||
| @@ -1516,6 +1589,7 @@ type ViewStackPages struct { | |||
| 1516 | 1589 | var xViewStackPagesGLibType func() types.GType | |
| 1517 | 1590 | ||
| 1518 | 1591 | func ViewStackPagesGLibType() types.GType { | |
| 1592 | + | core.LazyRegister(&xViewStackPagesGLibType, "ADW", "adw_view_stack_pages_get_type", false) | |
| 1519 | 1593 | return xViewStackPagesGLibType() | |
| 1520 | 1594 | } | |
| 1521 | 1595 | ||
| @@ -1533,6 +1607,7 @@ var xViewStackPagesGetSelectedPage func(uintptr) uintptr | |||
| 1533 | 1607 | // | |
| 1534 | 1608 | // Returns `NULL` if there's no selected page. | |
| 1535 | 1609 | func (x *ViewStackPages) GetSelectedPage() *ViewStackPage { | |
| 1610 | + | core.LazyRegister(&xViewStackPagesGetSelectedPage, "ADW", "adw_view_stack_pages_get_selected_page", false) | |
| 1536 | 1611 | var cls *ViewStackPage | |
| 1537 | 1612 | ||
| 1538 | 1613 | cret := xViewStackPagesGetSelectedPage(x.GoPointer()) | |
| @@ -1552,6 +1627,8 @@ var xViewStackPagesSetSelectedPage func(uintptr, uintptr) | |||
| 1552 | 1627 | // | |
| 1553 | 1628 | // See [property@ViewStack:visible-child]. | |
| 1554 | 1629 | func (x *ViewStackPages) SetSelectedPage(PageVar *ViewStackPage) { | |
| 1630 | + | core.LazyRegister(&xViewStackPagesSetSelectedPage, "ADW", "adw_view_stack_pages_set_selected_page", false) | |
| 1631 | + | ||
| 1555 | 1632 | xViewStackPagesSetSelectedPage(x.GoPointer(), PageVar.GoPointer()) | |
| 1556 | 1633 | } | |
| 1557 | 1634 | ||
| @@ -1810,65 +1887,4 @@ func (x *ViewStackPages) UnselectRange(PositionVar uint, NItemsVar uint) bool { | |||
| 1810 | 1887 | func init() { | |
| 1811 | 1888 | core.SetPackageName("ADW", "libadwaita-1") | |
| 1812 | 1889 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 1813 | - | var libs []uintptr | |
| 1814 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 1815 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 1816 | - | if err != nil { | |
| 1817 | - | panic(err) | |
| 1818 | - | } | |
| 1819 | - | libs = append(libs, lib) | |
| 1820 | - | } | |
| 1821 | - | ||
| 1822 | - | core.PuregoSafeRegister(&xViewStackGLibType, libs, "adw_view_stack_get_type") | |
| 1823 | - | ||
| 1824 | - | core.PuregoSafeRegister(&xNewViewStack, libs, "adw_view_stack_new") | |
| 1825 | - | ||
| 1826 | - | core.PuregoSafeRegister(&xViewStackAdd, libs, "adw_view_stack_add") | |
| 1827 | - | core.PuregoSafeRegister(&xViewStackAddNamed, libs, "adw_view_stack_add_named") | |
| 1828 | - | core.PuregoSafeRegister(&xViewStackAddTitled, libs, "adw_view_stack_add_titled") | |
| 1829 | - | core.PuregoSafeRegister(&xViewStackAddTitledWithIcon, libs, "adw_view_stack_add_titled_with_icon") | |
| 1830 | - | core.PuregoSafeRegister(&xViewStackGetChildByName, libs, "adw_view_stack_get_child_by_name") | |
| 1831 | - | core.PuregoSafeRegister(&xViewStackGetEnableTransitions, libs, "adw_view_stack_get_enable_transitions") | |
| 1832 | - | core.PuregoSafeRegister(&xViewStackGetHhomogeneous, libs, "adw_view_stack_get_hhomogeneous") | |
| 1833 | - | core.PuregoSafeRegister(&xViewStackGetPage, libs, "adw_view_stack_get_page") | |
| 1834 | - | core.PuregoSafeRegister(&xViewStackGetPages, libs, "adw_view_stack_get_pages") | |
| 1835 | - | core.PuregoSafeRegister(&xViewStackGetTransitionDuration, libs, "adw_view_stack_get_transition_duration") | |
| 1836 | - | core.PuregoSafeRegister(&xViewStackGetTransitionRunning, libs, "adw_view_stack_get_transition_running") | |
| 1837 | - | core.PuregoSafeRegister(&xViewStackGetVhomogeneous, libs, "adw_view_stack_get_vhomogeneous") | |
| 1838 | - | core.PuregoSafeRegister(&xViewStackGetVisibleChild, libs, "adw_view_stack_get_visible_child") | |
| 1839 | - | core.PuregoSafeRegister(&xViewStackGetVisibleChildName, libs, "adw_view_stack_get_visible_child_name") | |
| 1840 | - | core.PuregoSafeRegister(&xViewStackRemove, libs, "adw_view_stack_remove") | |
| 1841 | - | core.PuregoSafeRegister(&xViewStackSetEnableTransitions, libs, "adw_view_stack_set_enable_transitions") | |
| 1842 | - | core.PuregoSafeRegister(&xViewStackSetHhomogeneous, libs, "adw_view_stack_set_hhomogeneous") | |
| 1843 | - | core.PuregoSafeRegister(&xViewStackSetTransitionDuration, libs, "adw_view_stack_set_transition_duration") | |
| 1844 | - | core.PuregoSafeRegister(&xViewStackSetVhomogeneous, libs, "adw_view_stack_set_vhomogeneous") | |
| 1845 | - | core.PuregoSafeRegister(&xViewStackSetVisibleChild, libs, "adw_view_stack_set_visible_child") | |
| 1846 | - | core.PuregoSafeRegister(&xViewStackSetVisibleChildName, libs, "adw_view_stack_set_visible_child_name") | |
| 1847 | - | ||
| 1848 | - | core.PuregoSafeRegister(&xViewStackPageGLibType, libs, "adw_view_stack_page_get_type") | |
| 1849 | - | ||
| 1850 | - | core.PuregoSafeRegister(&xViewStackPageGetBadgeNumber, libs, "adw_view_stack_page_get_badge_number") | |
| 1851 | - | core.PuregoSafeRegister(&xViewStackPageGetChild, libs, "adw_view_stack_page_get_child") | |
| 1852 | - | core.PuregoSafeRegister(&xViewStackPageGetIconName, libs, "adw_view_stack_page_get_icon_name") | |
| 1853 | - | core.PuregoSafeRegister(&xViewStackPageGetName, libs, "adw_view_stack_page_get_name") | |
| 1854 | - | core.PuregoSafeRegister(&xViewStackPageGetNeedsAttention, libs, "adw_view_stack_page_get_needs_attention") | |
| 1855 | - | core.PuregoSafeRegister(&xViewStackPageGetSectionTitle, libs, "adw_view_stack_page_get_section_title") | |
| 1856 | - | core.PuregoSafeRegister(&xViewStackPageGetStartsSection, libs, "adw_view_stack_page_get_starts_section") | |
| 1857 | - | core.PuregoSafeRegister(&xViewStackPageGetTitle, libs, "adw_view_stack_page_get_title") | |
| 1858 | - | core.PuregoSafeRegister(&xViewStackPageGetUseUnderline, libs, "adw_view_stack_page_get_use_underline") | |
| 1859 | - | core.PuregoSafeRegister(&xViewStackPageGetVisible, libs, "adw_view_stack_page_get_visible") | |
| 1860 | - | core.PuregoSafeRegister(&xViewStackPageSetBadgeNumber, libs, "adw_view_stack_page_set_badge_number") | |
| 1861 | - | core.PuregoSafeRegister(&xViewStackPageSetIconName, libs, "adw_view_stack_page_set_icon_name") | |
| 1862 | - | core.PuregoSafeRegister(&xViewStackPageSetName, libs, "adw_view_stack_page_set_name") | |
| 1863 | - | core.PuregoSafeRegister(&xViewStackPageSetNeedsAttention, libs, "adw_view_stack_page_set_needs_attention") | |
| 1864 | - | core.PuregoSafeRegister(&xViewStackPageSetSectionTitle, libs, "adw_view_stack_page_set_section_title") | |
| 1865 | - | core.PuregoSafeRegister(&xViewStackPageSetStartsSection, libs, "adw_view_stack_page_set_starts_section") | |
| 1866 | - | core.PuregoSafeRegister(&xViewStackPageSetTitle, libs, "adw_view_stack_page_set_title") | |
| 1867 | - | core.PuregoSafeRegister(&xViewStackPageSetUseUnderline, libs, "adw_view_stack_page_set_use_underline") | |
| 1868 | - | core.PuregoSafeRegister(&xViewStackPageSetVisible, libs, "adw_view_stack_page_set_visible") | |
| 1869 | - | ||
| 1870 | - | core.PuregoSafeRegister(&xViewStackPagesGLibType, libs, "adw_view_stack_pages_get_type") | |
| 1871 | - | ||
| 1872 | - | core.PuregoSafeRegister(&xViewStackPagesGetSelectedPage, libs, "adw_view_stack_pages_get_selected_page") | |
| 1873 | - | core.PuregoSafeRegister(&xViewStackPagesSetSelectedPage, libs, "adw_view_stack_pages_set_selected_page") | |
| 1874 | 1890 | } | |
| @@ -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/gio" | 9 | "github.com/bnema/puregotk/v4/gio" | ||
| 11 | "github.com/bnema/puregotk/v4/gobject" | 10 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -138,6 +137,7 @@ type ViewStack struct { | |||||
| 138 | var xViewStackGLibType func() types.GType | 137 | var xViewStackGLibType func() types.GType | ||
| 139 | 138 | ||||
| 140 | func ViewStackGLibType() types.GType { | 139 | func ViewStackGLibType() types.GType { | ||
| 140 | + | core.LazyRegister(&xViewStackGLibType, "ADW", "adw_view_stack_get_type", false) | |||
| 141 | return xViewStackGLibType() | 141 | return xViewStackGLibType() | ||
| 142 | } | 142 | } | ||
| 143 | 143 | ||||
| @@ -151,6 +151,7 @@ var xNewViewStack func() uintptr | |||||
| 151 | 151 | ||||
| 152 | // Creates a new `AdwViewStack`. | 152 | // Creates a new `AdwViewStack`. | ||
| 153 | func NewViewStack() *ViewStack { | 153 | func NewViewStack() *ViewStack { | ||
| 154 | + | core.LazyRegister(&xNewViewStack, "ADW", "adw_view_stack_new", false) | |||
| 154 | var cls *ViewStack | 155 | var cls *ViewStack | ||
| 155 | 156 | ||||
| 156 | cret := xNewViewStack() | 157 | cret := xNewViewStack() | ||
| @@ -168,6 +169,7 @@ var xViewStackAdd func(uintptr, uintptr) uintptr | |||||
| 168 | 169 | ||||
| 169 | // Adds a child to @self. | 170 | // Adds a child to @self. | ||
| 170 | func (x *ViewStack) Add(ChildVar *gtk.Widget) *ViewStackPage { | 171 | func (x *ViewStack) Add(ChildVar *gtk.Widget) *ViewStackPage { | ||
| 172 | + | core.LazyRegister(&xViewStackAdd, "ADW", "adw_view_stack_add", false) | |||
| 171 | var cls *ViewStackPage | 173 | var cls *ViewStackPage | ||
| 172 | 174 | ||||
| 173 | cret := xViewStackAdd(x.GoPointer(), ChildVar.GoPointer()) | 175 | cret := xViewStackAdd(x.GoPointer(), ChildVar.GoPointer()) | ||
| @@ -187,6 +189,7 @@ var xViewStackAddNamed func(uintptr, uintptr, uintptr) uintptr | |||||
| 187 | // | 189 | // | ||
| 188 | // The child is identified by the @name. | 190 | // The child is identified by the @name. | ||
| 189 | func (x *ViewStack) AddNamed(ChildVar *gtk.Widget, NameVar *string) *ViewStackPage { | 191 | func (x *ViewStack) AddNamed(ChildVar *gtk.Widget, NameVar *string) *ViewStackPage { | ||
| 192 | + | core.LazyRegister(&xViewStackAddNamed, "ADW", "adw_view_stack_add_named", false) | |||
| 190 | var cls *ViewStackPage | 193 | var cls *ViewStackPage | ||
| 191 | 194 | ||||
| 192 | NameVarPtr := core.GStrdupNullable(NameVar) | 195 | NameVarPtr := core.GStrdupNullable(NameVar) | ||
| @@ -210,6 +213,7 @@ var xViewStackAddTitled func(uintptr, uintptr, uintptr, string) uintptr | |||||
| 210 | // The child is identified by the @name. The @title will be used by | 213 | // The child is identified by the @name. The @title will be used by | ||
| 211 | // [class@ViewSwitcher] to represent @child, so it should be short. | 214 | // [class@ViewSwitcher] to represent @child, so it should be short. | ||
| 212 | func (x *ViewStack) AddTitled(ChildVar *gtk.Widget, NameVar *string, TitleVar string) *ViewStackPage { | 215 | func (x *ViewStack) AddTitled(ChildVar *gtk.Widget, NameVar *string, TitleVar string) *ViewStackPage { | ||
| 216 | + | core.LazyRegister(&xViewStackAddTitled, "ADW", "adw_view_stack_add_titled", false) | |||
| 213 | var cls *ViewStackPage | 217 | var cls *ViewStackPage | ||
| 214 | 218 | ||||
| 215 | NameVarPtr := core.GStrdupNullable(NameVar) | 219 | NameVarPtr := core.GStrdupNullable(NameVar) | ||
| @@ -233,6 +237,7 @@ var xViewStackAddTitledWithIcon func(uintptr, uintptr, uintptr, string, string) | |||||
| 233 | // The child is identified by the @name. The @title and @icon_name will be used | 237 | // The child is identified by the @name. The @title and @icon_name will be used | ||
| 234 | // by [class@ViewSwitcher] to represent @child. | 238 | // by [class@ViewSwitcher] to represent @child. | ||
| 235 | func (x *ViewStack) AddTitledWithIcon(ChildVar *gtk.Widget, NameVar *string, TitleVar string, IconNameVar string) *ViewStackPage { | 239 | func (x *ViewStack) AddTitledWithIcon(ChildVar *gtk.Widget, NameVar *string, TitleVar string, IconNameVar string) *ViewStackPage { | ||
| 240 | + | core.LazyRegister(&xViewStackAddTitledWithIcon, "ADW", "adw_view_stack_add_titled_with_icon", false) | |||
| 236 | var cls *ViewStackPage | 241 | var cls *ViewStackPage | ||
| 237 | 242 | ||||
| 238 | NameVarPtr := core.GStrdupNullable(NameVar) | 243 | NameVarPtr := core.GStrdupNullable(NameVar) | ||
| @@ -253,6 +258,7 @@ var xViewStackGetChildByName func(uintptr, string) uintptr | |||||
| 253 | 258 | ||||
| 254 | // Finds the child with @name in @self. | 259 | // Finds the child with @name in @self. | ||
| 255 | func (x *ViewStack) GetChildByName(NameVar string) *gtk.Widget { | 260 | func (x *ViewStack) GetChildByName(NameVar string) *gtk.Widget { | ||
| 261 | + | core.LazyRegister(&xViewStackGetChildByName, "ADW", "adw_view_stack_get_child_by_name", false) | |||
| 256 | var cls *gtk.Widget | 262 | var cls *gtk.Widget | ||
| 257 | 263 | ||||
| 258 | cret := xViewStackGetChildByName(x.GoPointer(), NameVar) | 264 | cret := xViewStackGetChildByName(x.GoPointer(), NameVar) | ||
| @@ -274,6 +280,8 @@ var xViewStackGetEnableTransitions func(uintptr) bool | |||||
| 274 | // [property@ViewStack:transition-running] to know when the transition is | 280 | // [property@ViewStack:transition-running] to know when the transition is | ||
| 275 | // running. | 281 | // running. | ||
| 276 | func (x *ViewStack) GetEnableTransitions() bool { | 282 | func (x *ViewStack) GetEnableTransitions() bool { | ||
| 283 | + | core.LazyRegister(&xViewStackGetEnableTransitions, "ADW", "adw_view_stack_get_enable_transitions", false) | |||
| 284 | + | ||||
| 277 | cret := xViewStackGetEnableTransitions(x.GoPointer()) | 285 | cret := xViewStackGetEnableTransitions(x.GoPointer()) | ||
| 278 | return cret | 286 | return cret | ||
| 279 | } | 287 | } | ||
| @@ -282,6 +290,8 @@ var xViewStackGetHhomogeneous func(uintptr) bool | |||||
| 282 | 290 | ||||
| 283 | // Gets whether @self is horizontally homogeneous. | 291 | // Gets whether @self is horizontally homogeneous. | ||
| 284 | func (x *ViewStack) GetHhomogeneous() bool { | 292 | func (x *ViewStack) GetHhomogeneous() bool { | ||
| 293 | + | core.LazyRegister(&xViewStackGetHhomogeneous, "ADW", "adw_view_stack_get_hhomogeneous", false) | |||
| 294 | + | ||||
| 285 | cret := xViewStackGetHhomogeneous(x.GoPointer()) | 295 | cret := xViewStackGetHhomogeneous(x.GoPointer()) | ||
| 286 | return cret | 296 | return cret | ||
| 287 | } | 297 | } | ||
| @@ -290,6 +300,7 @@ var xViewStackGetPage func(uintptr, uintptr) uintptr | |||||
| 290 | 300 | ||||
| 291 | // Gets the [class@ViewStackPage] object for @child. | 301 | // Gets the [class@ViewStackPage] object for @child. | ||
| 292 | func (x *ViewStack) GetPage(ChildVar *gtk.Widget) *ViewStackPage { | 302 | func (x *ViewStack) GetPage(ChildVar *gtk.Widget) *ViewStackPage { | ||
| 303 | + | core.LazyRegister(&xViewStackGetPage, "ADW", "adw_view_stack_get_page", false) | |||
| 293 | var cls *ViewStackPage | 304 | var cls *ViewStackPage | ||
| 294 | 305 | ||||
| 295 | cret := xViewStackGetPage(x.GoPointer(), ChildVar.GoPointer()) | 306 | cret := xViewStackGetPage(x.GoPointer(), ChildVar.GoPointer()) | ||
| @@ -315,6 +326,7 @@ var xViewStackGetPages func(uintptr) uintptr | |||||
| 315 | // The model also implements [iface@Gtk.SelectionModel] and can be used to track | 326 | // The model also implements [iface@Gtk.SelectionModel] and can be used to track | ||
| 316 | // and change the visible page. | 327 | // and change the visible page. | ||
| 317 | func (x *ViewStack) GetPages() *gtk.SelectionModelBase { | 328 | func (x *ViewStack) GetPages() *gtk.SelectionModelBase { | ||
| 329 | + | core.LazyRegister(&xViewStackGetPages, "ADW", "adw_view_stack_get_pages", false) | |||
| 318 | var cls *gtk.SelectionModelBase | 330 | var cls *gtk.SelectionModelBase | ||
| 319 | 331 | ||||
| 320 | cret := xViewStackGetPages(x.GoPointer()) | 332 | cret := xViewStackGetPages(x.GoPointer()) | ||
| @@ -331,6 +343,8 @@ var xViewStackGetTransitionDuration func(uintptr) uint | |||||
| 331 | 343 | ||||
| 332 | // Gets the transition animation duration for @self. | 344 | // Gets the transition animation duration for @self. | ||
| 333 | func (x *ViewStack) GetTransitionDuration() uint { | 345 | func (x *ViewStack) GetTransitionDuration() uint { | ||
| 346 | + | core.LazyRegister(&xViewStackGetTransitionDuration, "ADW", "adw_view_stack_get_transition_duration", false) | |||
| 347 | + | ||||
| 334 | cret := xViewStackGetTransitionDuration(x.GoPointer()) | 348 | cret := xViewStackGetTransitionDuration(x.GoPointer()) | ||
| 335 | return cret | 349 | return cret | ||
| 336 | } | 350 | } | ||
| @@ -343,6 +357,8 @@ var xViewStackGetTransitionRunning func(uintptr) bool | |||||
| 343 | // then immediately to `FALSE`, so it's possible to rely on its notifications | 357 | // then immediately to `FALSE`, so it's possible to rely on its notifications | ||
| 344 | // to know that a transition has happened. | 358 | // to know that a transition has happened. | ||
| 345 | func (x *ViewStack) GetTransitionRunning() bool { | 359 | func (x *ViewStack) GetTransitionRunning() bool { | ||
| 360 | + | core.LazyRegister(&xViewStackGetTransitionRunning, "ADW", "adw_view_stack_get_transition_running", false) | |||
| 361 | + | ||||
| 346 | cret := xViewStackGetTransitionRunning(x.GoPointer()) | 362 | cret := xViewStackGetTransitionRunning(x.GoPointer()) | ||
| 347 | return cret | 363 | return cret | ||
| 348 | } | 364 | } | ||
| @@ -351,6 +367,8 @@ var xViewStackGetVhomogeneous func(uintptr) bool | |||||
| 351 | 367 | ||||
| 352 | // Gets whether @self is vertically homogeneous. | 368 | // Gets whether @self is vertically homogeneous. | ||
| 353 | func (x *ViewStack) GetVhomogeneous() bool { | 369 | func (x *ViewStack) GetVhomogeneous() bool { | ||
| 370 | + | core.LazyRegister(&xViewStackGetVhomogeneous, "ADW", "adw_view_stack_get_vhomogeneous", false) | |||
| 371 | + | ||||
| 354 | cret := xViewStackGetVhomogeneous(x.GoPointer()) | 372 | cret := xViewStackGetVhomogeneous(x.GoPointer()) | ||
| 355 | return cret | 373 | return cret | ||
| 356 | } | 374 | } | ||
| @@ -359,6 +377,7 @@ var xViewStackGetVisibleChild func(uintptr) uintptr | |||||
| 359 | 377 | ||||
| 360 | // Gets the currently visible child of @self. | 378 | // Gets the currently visible child of @self. | ||
| 361 | func (x *ViewStack) GetVisibleChild() *gtk.Widget { | 379 | func (x *ViewStack) GetVisibleChild() *gtk.Widget { | ||
| 380 | + | core.LazyRegister(&xViewStackGetVisibleChild, "ADW", "adw_view_stack_get_visible_child", false) | |||
| 362 | var cls *gtk.Widget | 381 | var cls *gtk.Widget | ||
| 363 | 382 | ||||
| 364 | cret := xViewStackGetVisibleChild(x.GoPointer()) | 383 | cret := xViewStackGetVisibleChild(x.GoPointer()) | ||
| @@ -376,6 +395,8 @@ var xViewStackGetVisibleChildName func(uintptr) string | |||||
| 376 | 395 | ||||
| 377 | // Returns the name of the currently visible child of @self. | 396 | // Returns the name of the currently visible child of @self. | ||
| 378 | func (x *ViewStack) GetVisibleChildName() string { | 397 | func (x *ViewStack) GetVisibleChildName() string { | ||
| 398 | + | core.LazyRegister(&xViewStackGetVisibleChildName, "ADW", "adw_view_stack_get_visible_child_name", false) | |||
| 399 | + | ||||
| 379 | cret := xViewStackGetVisibleChildName(x.GoPointer()) | 400 | cret := xViewStackGetVisibleChildName(x.GoPointer()) | ||
| 380 | return cret | 401 | return cret | ||
| 381 | } | 402 | } | ||
| @@ -384,6 +405,8 @@ var xViewStackRemove func(uintptr, uintptr) | |||||
| 384 | 405 | ||||
| 385 | // Removes a child widget from @self. | 406 | // Removes a child widget from @self. | ||
| 386 | func (x *ViewStack) Remove(ChildVar *gtk.Widget) { | 407 | func (x *ViewStack) Remove(ChildVar *gtk.Widget) { | ||
| 408 | + | core.LazyRegister(&xViewStackRemove, "ADW", "adw_view_stack_remove", false) | |||
| 409 | + | ||||
| 387 | xViewStackRemove(x.GoPointer(), ChildVar.GoPointer()) | 410 | xViewStackRemove(x.GoPointer(), ChildVar.GoPointer()) | ||
| 388 | } | 411 | } | ||
| 389 | 412 | ||||
| @@ -391,6 +414,8 @@ var xViewStackSetEnableTransitions func(uintptr, bool) | |||||
| 391 | 414 | ||||
| 392 | // Sets whether @self uses a crossfade transition between pages. | 415 | // Sets whether @self uses a crossfade transition between pages. | ||
| 393 | func (x *ViewStack) SetEnableTransitions(EnableTransitionsVar bool) { | 416 | func (x *ViewStack) SetEnableTransitions(EnableTransitionsVar bool) { | ||
| 417 | + | core.LazyRegister(&xViewStackSetEnableTransitions, "ADW", "adw_view_stack_set_enable_transitions", false) | |||
| 418 | + | ||||
| 394 | xViewStackSetEnableTransitions(x.GoPointer(), EnableTransitionsVar) | 419 | xViewStackSetEnableTransitions(x.GoPointer(), EnableTransitionsVar) | ||
| 395 | } | 420 | } | ||
| 396 | 421 | ||||
| @@ -404,6 +429,8 @@ var xViewStackSetHhomogeneous func(uintptr, bool) | |||||
| 404 | // If it's `FALSE`, the stack may change width when a different child becomes | 429 | // If it's `FALSE`, the stack may change width when a different child becomes | ||
| 405 | // visible. | 430 | // visible. | ||
| 406 | func (x *ViewStack) SetHhomogeneous(HhomogeneousVar bool) { | 431 | func (x *ViewStack) SetHhomogeneous(HhomogeneousVar bool) { | ||
| 432 | + | core.LazyRegister(&xViewStackSetHhomogeneous, "ADW", "adw_view_stack_set_hhomogeneous", false) | |||
| 433 | + | ||||
| 407 | xViewStackSetHhomogeneous(x.GoPointer(), HhomogeneousVar) | 434 | xViewStackSetHhomogeneous(x.GoPointer(), HhomogeneousVar) | ||
| 408 | } | 435 | } | ||
| 409 | 436 | ||||
| @@ -413,6 +440,8 @@ var xViewStackSetTransitionDuration func(uintptr, uint) | |||||
| 413 | // | 440 | // | ||
| 414 | // Only used when [property@ViewStack:enable-transitions] is set to `TRUE`. | 441 | // Only used when [property@ViewStack:enable-transitions] is set to `TRUE`. | ||
| 415 | func (x *ViewStack) SetTransitionDuration(DurationVar uint) { | 442 | func (x *ViewStack) SetTransitionDuration(DurationVar uint) { | ||
| 443 | + | core.LazyRegister(&xViewStackSetTransitionDuration, "ADW", "adw_view_stack_set_transition_duration", false) | |||
| 444 | + | ||||
| 416 | xViewStackSetTransitionDuration(x.GoPointer(), DurationVar) | 445 | xViewStackSetTransitionDuration(x.GoPointer(), DurationVar) | ||
| 417 | } | 446 | } | ||
| 418 | 447 | ||||
| @@ -426,6 +455,8 @@ var xViewStackSetVhomogeneous func(uintptr, bool) | |||||
| 426 | // If it's `FALSE`, the stack may change height when a different child becomes | 455 | // If it's `FALSE`, the stack may change height when a different child becomes | ||
| 427 | // visible. | 456 | // visible. | ||
| 428 | func (x *ViewStack) SetVhomogeneous(VhomogeneousVar bool) { | 457 | func (x *ViewStack) SetVhomogeneous(VhomogeneousVar bool) { | ||
| 458 | + | core.LazyRegister(&xViewStackSetVhomogeneous, "ADW", "adw_view_stack_set_vhomogeneous", false) | |||
| 459 | + | ||||
| 429 | xViewStackSetVhomogeneous(x.GoPointer(), VhomogeneousVar) | 460 | xViewStackSetVhomogeneous(x.GoPointer(), VhomogeneousVar) | ||
| 430 | } | 461 | } | ||
| 431 | 462 | ||||
| @@ -433,6 +464,8 @@ var xViewStackSetVisibleChild func(uintptr, uintptr) | |||||
| 433 | 464 | ||||
| 434 | // Makes @child the visible child of @self. | 465 | // Makes @child the visible child of @self. | ||
| 435 | func (x *ViewStack) SetVisibleChild(ChildVar *gtk.Widget) { | 466 | func (x *ViewStack) SetVisibleChild(ChildVar *gtk.Widget) { | ||
| 467 | + | core.LazyRegister(&xViewStackSetVisibleChild, "ADW", "adw_view_stack_set_visible_child", false) | |||
| 468 | + | ||||
| 436 | xViewStackSetVisibleChild(x.GoPointer(), ChildVar.GoPointer()) | 469 | xViewStackSetVisibleChild(x.GoPointer(), ChildVar.GoPointer()) | ||
| 437 | } | 470 | } | ||
| 438 | 471 | ||||
| @@ -442,6 +475,8 @@ var xViewStackSetVisibleChildName func(uintptr, string) | |||||
| 442 | // | 475 | // | ||
| 443 | // See [property@ViewStack:visible-child]. | 476 | // See [property@ViewStack:visible-child]. | ||
| 444 | func (x *ViewStack) SetVisibleChildName(NameVar string) { | 477 | func (x *ViewStack) SetVisibleChildName(NameVar string) { | ||
| 478 | + | core.LazyRegister(&xViewStackSetVisibleChildName, "ADW", "adw_view_stack_set_visible_child_name", false) | |||
| 479 | + | ||||
| 445 | xViewStackSetVisibleChildName(x.GoPointer(), NameVar) | 480 | xViewStackSetVisibleChildName(x.GoPointer(), NameVar) | ||
| 446 | } | 481 | } | ||
| 447 | 482 | ||||
| @@ -861,6 +896,7 @@ type ViewStackPage struct { | |||||
| 861 | var xViewStackPageGLibType func() types.GType | 896 | var xViewStackPageGLibType func() types.GType | ||
| 862 | 897 | ||||
| 863 | func ViewStackPageGLibType() types.GType { | 898 | func ViewStackPageGLibType() types.GType { | ||
| 899 | + | core.LazyRegister(&xViewStackPageGLibType, "ADW", "adw_view_stack_page_get_type", false) | |||
| 864 | return xViewStackPageGLibType() | 900 | return xViewStackPageGLibType() | ||
| 865 | } | 901 | } | ||
| 866 | 902 | ||||
| @@ -874,6 +910,8 @@ var xViewStackPageGetBadgeNumber func(uintptr) uint | |||||
| 874 | 910 | ||||
| 875 | // Gets the badge number for this page. | 911 | // Gets the badge number for this page. | ||
| 876 | func (x *ViewStackPage) GetBadgeNumber() uint { | 912 | func (x *ViewStackPage) GetBadgeNumber() uint { | ||
| 913 | + | core.LazyRegister(&xViewStackPageGetBadgeNumber, "ADW", "adw_view_stack_page_get_badge_number", false) | |||
| 914 | + | ||||
| 877 | cret := xViewStackPageGetBadgeNumber(x.GoPointer()) | 915 | cret := xViewStackPageGetBadgeNumber(x.GoPointer()) | ||
| 878 | return cret | 916 | return cret | ||
| 879 | } | 917 | } | ||
| @@ -882,6 +920,7 @@ var xViewStackPageGetChild func(uintptr) uintptr | |||||
| 882 | 920 | ||||
| 883 | // Gets the stack child to which @self belongs. | 921 | // Gets the stack child to which @self belongs. | ||
| 884 | func (x *ViewStackPage) GetChild() *gtk.Widget { | 922 | func (x *ViewStackPage) GetChild() *gtk.Widget { | ||
| 923 | + | core.LazyRegister(&xViewStackPageGetChild, "ADW", "adw_view_stack_page_get_child", false) | |||
| 885 | var cls *gtk.Widget | 924 | var cls *gtk.Widget | ||
| 886 | 925 | ||||
| 887 | cret := xViewStackPageGetChild(x.GoPointer()) | 926 | cret := xViewStackPageGetChild(x.GoPointer()) | ||
| @@ -899,6 +938,8 @@ var xViewStackPageGetIconName func(uintptr) string | |||||
| 899 | 938 | ||||
| 900 | // Gets the icon name of the page. | 939 | // Gets the icon name of the page. | ||
| 901 | func (x *ViewStackPage) GetIconName() string { | 940 | func (x *ViewStackPage) GetIconName() string { | ||
| 941 | + | core.LazyRegister(&xViewStackPageGetIconName, "ADW", "adw_view_stack_page_get_icon_name", false) | |||
| 942 | + | ||||
| 902 | cret := xViewStackPageGetIconName(x.GoPointer()) | 943 | cret := xViewStackPageGetIconName(x.GoPointer()) | ||
| 903 | return cret | 944 | return cret | ||
| 904 | } | 945 | } | ||
| @@ -907,6 +948,8 @@ var xViewStackPageGetName func(uintptr) string | |||||
| 907 | 948 | ||||
| 908 | // Gets the name of the page. | 949 | // Gets the name of the page. | ||
| 909 | func (x *ViewStackPage) GetName() string { | 950 | func (x *ViewStackPage) GetName() string { | ||
| 951 | + | core.LazyRegister(&xViewStackPageGetName, "ADW", "adw_view_stack_page_get_name", false) | |||
| 952 | + | ||||
| 910 | cret := xViewStackPageGetName(x.GoPointer()) | 953 | cret := xViewStackPageGetName(x.GoPointer()) | ||
| 911 | return cret | 954 | return cret | ||
| 912 | } | 955 | } | ||
| @@ -915,6 +958,8 @@ var xViewStackPageGetNeedsAttention func(uintptr) bool | |||||
| 915 | 958 | ||||
| 916 | // Gets whether the page requires the user attention. | 959 | // Gets whether the page requires the user attention. | ||
| 917 | func (x *ViewStackPage) GetNeedsAttention() bool { | 960 | func (x *ViewStackPage) GetNeedsAttention() bool { | ||
| 961 | + | core.LazyRegister(&xViewStackPageGetNeedsAttention, "ADW", "adw_view_stack_page_get_needs_attention", false) | |||
| 962 | + | ||||
| 918 | cret := xViewStackPageGetNeedsAttention(x.GoPointer()) | 963 | cret := xViewStackPageGetNeedsAttention(x.GoPointer()) | ||
| 919 | return cret | 964 | return cret | ||
| 920 | } | 965 | } | ||
| @@ -923,6 +968,8 @@ var xViewStackPageGetSectionTitle func(uintptr) string | |||||
| 923 | 968 | ||||
| 924 | // Gets the section title for @self. | 969 | // Gets the section title for @self. | ||
| 925 | func (x *ViewStackPage) GetSectionTitle() string { | 970 | func (x *ViewStackPage) GetSectionTitle() string { | ||
| 971 | + | core.LazyRegister(&xViewStackPageGetSectionTitle, "ADW", "adw_view_stack_page_get_section_title", false) | |||
| 972 | + | ||||
| 926 | cret := xViewStackPageGetSectionTitle(x.GoPointer()) | 973 | cret := xViewStackPageGetSectionTitle(x.GoPointer()) | ||
| 927 | return cret | 974 | return cret | ||
| 928 | } | 975 | } | ||
| @@ -931,6 +978,8 @@ var xViewStackPageGetStartsSection func(uintptr) bool | |||||
| 931 | 978 | ||||
| 932 | // Gets whether @self starts a section. | 979 | // Gets whether @self starts a section. | ||
| 933 | func (x *ViewStackPage) GetStartsSection() bool { | 980 | func (x *ViewStackPage) GetStartsSection() bool { | ||
| 981 | + | core.LazyRegister(&xViewStackPageGetStartsSection, "ADW", "adw_view_stack_page_get_starts_section", false) | |||
| 982 | + | ||||
| 934 | cret := xViewStackPageGetStartsSection(x.GoPointer()) | 983 | cret := xViewStackPageGetStartsSection(x.GoPointer()) | ||
| 935 | return cret | 984 | return cret | ||
| 936 | } | 985 | } | ||
| @@ -939,6 +988,8 @@ var xViewStackPageGetTitle func(uintptr) string | |||||
| 939 | 988 | ||||
| 940 | // Gets the page title. | 989 | // Gets the page title. | ||
| 941 | func (x *ViewStackPage) GetTitle() string { | 990 | func (x *ViewStackPage) GetTitle() string { | ||
| 991 | + | core.LazyRegister(&xViewStackPageGetTitle, "ADW", "adw_view_stack_page_get_title", false) | |||
| 992 | + | ||||
| 942 | cret := xViewStackPageGetTitle(x.GoPointer()) | 993 | cret := xViewStackPageGetTitle(x.GoPointer()) | ||
| 943 | return cret | 994 | return cret | ||
| 944 | } | 995 | } | ||
| @@ -947,6 +998,8 @@ var xViewStackPageGetUseUnderline func(uintptr) bool | |||||
| 947 | 998 | ||||
| 948 | // Gets whether underlines in the page title indicate mnemonics. | 999 | // Gets whether underlines in the page title indicate mnemonics. | ||
| 949 | func (x *ViewStackPage) GetUseUnderline() bool { | 1000 | func (x *ViewStackPage) GetUseUnderline() bool { | ||
| 1001 | + | core.LazyRegister(&xViewStackPageGetUseUnderline, "ADW", "adw_view_stack_page_get_use_underline", false) | |||
| 1002 | + | ||||
| 950 | cret := xViewStackPageGetUseUnderline(x.GoPointer()) | 1003 | cret := xViewStackPageGetUseUnderline(x.GoPointer()) | ||
| 951 | return cret | 1004 | return cret | ||
| 952 | } | 1005 | } | ||
| @@ -958,6 +1011,8 @@ var xViewStackPageGetVisible func(uintptr) bool | |||||
| 958 | // This is independent from the [property@Gtk.Widget:visible] | 1011 | // This is independent from the [property@Gtk.Widget:visible] | ||
| 959 | // property of its widget. | 1012 | // property of its widget. | ||
| 960 | func (x *ViewStackPage) GetVisible() bool { | 1013 | func (x *ViewStackPage) GetVisible() bool { | ||
| 1014 | + | core.LazyRegister(&xViewStackPageGetVisible, "ADW", "adw_view_stack_page_get_visible", false) | |||
| 1015 | + | ||||
| 961 | cret := xViewStackPageGetVisible(x.GoPointer()) | 1016 | cret := xViewStackPageGetVisible(x.GoPointer()) | ||
| 962 | return cret | 1017 | return cret | ||
| 963 | } | 1018 | } | ||
| @@ -971,6 +1026,8 @@ var xViewStackPageSetBadgeNumber func(uintptr, uint) | |||||
| 971 | // | 1026 | // | ||
| 972 | // It can be used together with [property@ViewStack{age}:needs-attention]. | 1027 | // It can be used together with [property@ViewStack{age}:needs-attention]. | ||
| 973 | func (x *ViewStackPage) SetBadgeNumber(BadgeNumberVar uint) { | 1028 | func (x *ViewStackPage) SetBadgeNumber(BadgeNumberVar uint) { | ||
| 1029 | + | core.LazyRegister(&xViewStackPageSetBadgeNumber, "ADW", "adw_view_stack_page_set_badge_number", false) | |||
| 1030 | + | ||||
| 974 | xViewStackPageSetBadgeNumber(x.GoPointer(), BadgeNumberVar) | 1031 | xViewStackPageSetBadgeNumber(x.GoPointer(), BadgeNumberVar) | ||
| 975 | } | 1032 | } | ||
| 976 | 1033 | ||||
| @@ -978,6 +1035,8 @@ var xViewStackPageSetIconName func(uintptr, uintptr) | |||||
| 978 | 1035 | ||||
| 979 | // Sets the icon name of the page. | 1036 | // Sets the icon name of the page. | ||
| 980 | func (x *ViewStackPage) SetIconName(IconNameVar *string) { | 1037 | func (x *ViewStackPage) SetIconName(IconNameVar *string) { | ||
| 1038 | + | core.LazyRegister(&xViewStackPageSetIconName, "ADW", "adw_view_stack_page_set_icon_name", false) | |||
| 1039 | + | ||||
| 981 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | 1040 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | ||
| 982 | defer core.GFreeNullable(IconNameVarPtr) | 1041 | defer core.GFreeNullable(IconNameVarPtr) | ||
| 983 | 1042 | ||||
| @@ -988,6 +1047,8 @@ var xViewStackPageSetName func(uintptr, uintptr) | |||||
| 988 | 1047 | ||||
| 989 | // Sets the name of the page. | 1048 | // Sets the name of the page. | ||
| 990 | func (x *ViewStackPage) SetName(NameVar *string) { | 1049 | func (x *ViewStackPage) SetName(NameVar *string) { | ||
| 1050 | + | core.LazyRegister(&xViewStackPageSetName, "ADW", "adw_view_stack_page_set_name", false) | |||
| 1051 | + | ||||
| 991 | NameVarPtr := core.GStrdupNullable(NameVar) | 1052 | NameVarPtr := core.GStrdupNullable(NameVar) | ||
| 992 | defer core.GFreeNullable(NameVarPtr) | 1053 | defer core.GFreeNullable(NameVarPtr) | ||
| 993 | 1054 | ||||
| @@ -1000,6 +1061,8 @@ var xViewStackPageSetNeedsAttention func(uintptr, bool) | |||||
| 1000 | // | 1061 | // | ||
| 1001 | // [class@ViewSwitcher] will display it as a dot next to the page icon. | 1062 | // [class@ViewSwitcher] will display it as a dot next to the page icon. | ||
| 1002 | func (x *ViewStackPage) SetNeedsAttention(NeedsAttentionVar bool) { | 1063 | func (x *ViewStackPage) SetNeedsAttention(NeedsAttentionVar bool) { | ||
| 1064 | + | core.LazyRegister(&xViewStackPageSetNeedsAttention, "ADW", "adw_view_stack_page_set_needs_attention", false) | |||
| 1065 | + | ||||
| 1003 | xViewStackPageSetNeedsAttention(x.GoPointer(), NeedsAttentionVar) | 1066 | xViewStackPageSetNeedsAttention(x.GoPointer(), NeedsAttentionVar) | ||
| 1004 | } | 1067 | } | ||
| 1005 | 1068 | ||||
| @@ -1009,6 +1072,8 @@ var xViewStackPageSetSectionTitle func(uintptr, uintptr) | |||||
| 1009 | // | 1072 | // | ||
| 1010 | // Does nothing unless [property@ViewStackPage:starts-section] is set. | 1073 | // Does nothing unless [property@ViewStackPage:starts-section] is set. | ||
| 1011 | func (x *ViewStackPage) SetSectionTitle(SectionTitleVar *string) { | 1074 | func (x *ViewStackPage) SetSectionTitle(SectionTitleVar *string) { | ||
| 1075 | + | core.LazyRegister(&xViewStackPageSetSectionTitle, "ADW", "adw_view_stack_page_set_section_title", false) | |||
| 1076 | + | ||||
| 1012 | SectionTitleVarPtr := core.GStrdupNullable(SectionTitleVar) | 1077 | SectionTitleVarPtr := core.GStrdupNullable(SectionTitleVar) | ||
| 1013 | defer core.GFreeNullable(SectionTitleVarPtr) | 1078 | defer core.GFreeNullable(SectionTitleVarPtr) | ||
| 1014 | 1079 | ||||
| @@ -1025,6 +1090,8 @@ var xViewStackPageSetStartsSection func(uintptr, bool) | |||||
| 1025 | // If [property@ViewStackPage:section-title] is set, it should be used as a | 1090 | // If [property@ViewStackPage:section-title] is set, it should be used as a | ||
| 1026 | // title for the section. | 1091 | // title for the section. | ||
| 1027 | func (x *ViewStackPage) SetStartsSection(StartsSectionVar bool) { | 1092 | func (x *ViewStackPage) SetStartsSection(StartsSectionVar bool) { | ||
| 1093 | + | core.LazyRegister(&xViewStackPageSetStartsSection, "ADW", "adw_view_stack_page_set_starts_section", false) | |||
| 1094 | + | ||||
| 1028 | xViewStackPageSetStartsSection(x.GoPointer(), StartsSectionVar) | 1095 | xViewStackPageSetStartsSection(x.GoPointer(), StartsSectionVar) | ||
| 1029 | } | 1096 | } | ||
| 1030 | 1097 | ||||
| @@ -1032,6 +1099,8 @@ var xViewStackPageSetTitle func(uintptr, uintptr) | |||||
| 1032 | 1099 | ||||
| 1033 | // Sets the page title. | 1100 | // Sets the page title. | ||
| 1034 | func (x *ViewStackPage) SetTitle(TitleVar *string) { | 1101 | func (x *ViewStackPage) SetTitle(TitleVar *string) { | ||
| 1102 | + | core.LazyRegister(&xViewStackPageSetTitle, "ADW", "adw_view_stack_page_set_title", false) | |||
| 1103 | + | ||||
| 1035 | TitleVarPtr := core.GStrdupNullable(TitleVar) | 1104 | TitleVarPtr := core.GStrdupNullable(TitleVar) | ||
| 1036 | defer core.GFreeNullable(TitleVarPtr) | 1105 | defer core.GFreeNullable(TitleVarPtr) | ||
| 1037 | 1106 | ||||
| @@ -1042,6 +1111,8 @@ var xViewStackPageSetUseUnderline func(uintptr, bool) | |||||
| 1042 | 1111 | ||||
| 1043 | // Sets whether underlines in the page title indicate mnemonics. | 1112 | // Sets whether underlines in the page title indicate mnemonics. | ||
| 1044 | func (x *ViewStackPage) SetUseUnderline(UseUnderlineVar bool) { | 1113 | func (x *ViewStackPage) SetUseUnderline(UseUnderlineVar bool) { | ||
| 1114 | + | core.LazyRegister(&xViewStackPageSetUseUnderline, "ADW", "adw_view_stack_page_set_use_underline", false) | |||
| 1115 | + | ||||
| 1045 | xViewStackPageSetUseUnderline(x.GoPointer(), UseUnderlineVar) | 1116 | xViewStackPageSetUseUnderline(x.GoPointer(), UseUnderlineVar) | ||
| 1046 | } | 1117 | } | ||
| 1047 | 1118 | ||||
| @@ -1052,6 +1123,8 @@ var xViewStackPageSetVisible func(uintptr, bool) | |||||
| 1052 | // This is independent from the [property@Gtk.Widget:visible] property of | 1123 | // This is independent from the [property@Gtk.Widget:visible] property of | ||
| 1053 | // [property@ViewStackPage:child]. | 1124 | // [property@ViewStackPage:child]. | ||
| 1054 | func (x *ViewStackPage) SetVisible(VisibleVar bool) { | 1125 | func (x *ViewStackPage) SetVisible(VisibleVar bool) { | ||
| 1126 | + | core.LazyRegister(&xViewStackPageSetVisible, "ADW", "adw_view_stack_page_set_visible", false) | |||
| 1127 | + | ||||
| 1055 | xViewStackPageSetVisible(x.GoPointer(), VisibleVar) | 1128 | xViewStackPageSetVisible(x.GoPointer(), VisibleVar) | ||
| 1056 | } | 1129 | } | ||
| 1057 | 1130 | ||||
| @@ -1516,6 +1589,7 @@ type ViewStackPages struct { | |||||
| 1516 | var xViewStackPagesGLibType func() types.GType | 1589 | var xViewStackPagesGLibType func() types.GType | ||
| 1517 | 1590 | ||||
| 1518 | func ViewStackPagesGLibType() types.GType { | 1591 | func ViewStackPagesGLibType() types.GType { | ||
| 1592 | + | core.LazyRegister(&xViewStackPagesGLibType, "ADW", "adw_view_stack_pages_get_type", false) | |||
| 1519 | return xViewStackPagesGLibType() | 1593 | return xViewStackPagesGLibType() | ||
| 1520 | } | 1594 | } | ||
| 1521 | 1595 | ||||
| @@ -1533,6 +1607,7 @@ var xViewStackPagesGetSelectedPage func(uintptr) uintptr | |||||
| 1533 | // | 1607 | // | ||
| 1534 | // Returns `NULL` if there's no selected page. | 1608 | // Returns `NULL` if there's no selected page. | ||
| 1535 | func (x *ViewStackPages) GetSelectedPage() *ViewStackPage { | 1609 | func (x *ViewStackPages) GetSelectedPage() *ViewStackPage { | ||
| 1610 | + | core.LazyRegister(&xViewStackPagesGetSelectedPage, "ADW", "adw_view_stack_pages_get_selected_page", false) | |||
| 1536 | var cls *ViewStackPage | 1611 | var cls *ViewStackPage | ||
| 1537 | 1612 | ||||
| 1538 | cret := xViewStackPagesGetSelectedPage(x.GoPointer()) | 1613 | cret := xViewStackPagesGetSelectedPage(x.GoPointer()) | ||
| @@ -1552,6 +1627,8 @@ var xViewStackPagesSetSelectedPage func(uintptr, uintptr) | |||||
| 1552 | // | 1627 | // | ||
| 1553 | // See [property@ViewStack:visible-child]. | 1628 | // See [property@ViewStack:visible-child]. | ||
| 1554 | func (x *ViewStackPages) SetSelectedPage(PageVar *ViewStackPage) { | 1629 | func (x *ViewStackPages) SetSelectedPage(PageVar *ViewStackPage) { | ||
| 1630 | + | core.LazyRegister(&xViewStackPagesSetSelectedPage, "ADW", "adw_view_stack_pages_set_selected_page", false) | |||
| 1631 | + | ||||
| 1555 | xViewStackPagesSetSelectedPage(x.GoPointer(), PageVar.GoPointer()) | 1632 | xViewStackPagesSetSelectedPage(x.GoPointer(), PageVar.GoPointer()) | ||
| 1556 | } | 1633 | } | ||
| 1557 | 1634 | ||||
| @@ -1810,65 +1887,4 @@ func (x *ViewStackPages) UnselectRange(PositionVar uint, NItemsVar uint) bool { | |||||
| 1810 | func init() { | 1887 | func init() { | ||
| 1811 | core.SetPackageName("ADW", "libadwaita-1") | 1888 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 1812 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 1889 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 1813 | - | var libs []uintptr | |||
| 1814 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 1815 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 1816 | - | if err != nil { | |||
| 1817 | - | panic(err) | |||
| 1818 | - | } | |||
| 1819 | - | libs = append(libs, lib) | |||
| 1820 | - | } | |||
| 1821 | - | ||||
| 1822 | - | core.PuregoSafeRegister(&xViewStackGLibType, libs, "adw_view_stack_get_type") | |||
| 1823 | - | ||||
| 1824 | - | core.PuregoSafeRegister(&xNewViewStack, libs, "adw_view_stack_new") | |||
| 1825 | - | ||||
| 1826 | - | core.PuregoSafeRegister(&xViewStackAdd, libs, "adw_view_stack_add") | |||
| 1827 | - | core.PuregoSafeRegister(&xViewStackAddNamed, libs, "adw_view_stack_add_named") | |||
| 1828 | - | core.PuregoSafeRegister(&xViewStackAddTitled, libs, "adw_view_stack_add_titled") | |||
| 1829 | - | core.PuregoSafeRegister(&xViewStackAddTitledWithIcon, libs, "adw_view_stack_add_titled_with_icon") | |||
| 1830 | - | core.PuregoSafeRegister(&xViewStackGetChildByName, libs, "adw_view_stack_get_child_by_name") | |||
| 1831 | - | core.PuregoSafeRegister(&xViewStackGetEnableTransitions, libs, "adw_view_stack_get_enable_transitions") | |||
| 1832 | - | core.PuregoSafeRegister(&xViewStackGetHhomogeneous, libs, "adw_view_stack_get_hhomogeneous") | |||
| 1833 | - | core.PuregoSafeRegister(&xViewStackGetPage, libs, "adw_view_stack_get_page") | |||
| 1834 | - | core.PuregoSafeRegister(&xViewStackGetPages, libs, "adw_view_stack_get_pages") | |||
| 1835 | - | core.PuregoSafeRegister(&xViewStackGetTransitionDuration, libs, "adw_view_stack_get_transition_duration") | |||
| 1836 | - | core.PuregoSafeRegister(&xViewStackGetTransitionRunning, libs, "adw_view_stack_get_transition_running") | |||
| 1837 | - | core.PuregoSafeRegister(&xViewStackGetVhomogeneous, libs, "adw_view_stack_get_vhomogeneous") | |||
| 1838 | - | core.PuregoSafeRegister(&xViewStackGetVisibleChild, libs, "adw_view_stack_get_visible_child") | |||
| 1839 | - | core.PuregoSafeRegister(&xViewStackGetVisibleChildName, libs, "adw_view_stack_get_visible_child_name") | |||
| 1840 | - | core.PuregoSafeRegister(&xViewStackRemove, libs, "adw_view_stack_remove") | |||
| 1841 | - | core.PuregoSafeRegister(&xViewStackSetEnableTransitions, libs, "adw_view_stack_set_enable_transitions") | |||
| 1842 | - | core.PuregoSafeRegister(&xViewStackSetHhomogeneous, libs, "adw_view_stack_set_hhomogeneous") | |||
| 1843 | - | core.PuregoSafeRegister(&xViewStackSetTransitionDuration, libs, "adw_view_stack_set_transition_duration") | |||
| 1844 | - | core.PuregoSafeRegister(&xViewStackSetVhomogeneous, libs, "adw_view_stack_set_vhomogeneous") | |||
| 1845 | - | core.PuregoSafeRegister(&xViewStackSetVisibleChild, libs, "adw_view_stack_set_visible_child") | |||
| 1846 | - | core.PuregoSafeRegister(&xViewStackSetVisibleChildName, libs, "adw_view_stack_set_visible_child_name") | |||
| 1847 | - | ||||
| 1848 | - | core.PuregoSafeRegister(&xViewStackPageGLibType, libs, "adw_view_stack_page_get_type") | |||
| 1849 | - | ||||
| 1850 | - | core.PuregoSafeRegister(&xViewStackPageGetBadgeNumber, libs, "adw_view_stack_page_get_badge_number") | |||
| 1851 | - | core.PuregoSafeRegister(&xViewStackPageGetChild, libs, "adw_view_stack_page_get_child") | |||
| 1852 | - | core.PuregoSafeRegister(&xViewStackPageGetIconName, libs, "adw_view_stack_page_get_icon_name") | |||
| 1853 | - | core.PuregoSafeRegister(&xViewStackPageGetName, libs, "adw_view_stack_page_get_name") | |||
| 1854 | - | core.PuregoSafeRegister(&xViewStackPageGetNeedsAttention, libs, "adw_view_stack_page_get_needs_attention") | |||
| 1855 | - | core.PuregoSafeRegister(&xViewStackPageGetSectionTitle, libs, "adw_view_stack_page_get_section_title") | |||
| 1856 | - | core.PuregoSafeRegister(&xViewStackPageGetStartsSection, libs, "adw_view_stack_page_get_starts_section") | |||
| 1857 | - | core.PuregoSafeRegister(&xViewStackPageGetTitle, libs, "adw_view_stack_page_get_title") | |||
| 1858 | - | core.PuregoSafeRegister(&xViewStackPageGetUseUnderline, libs, "adw_view_stack_page_get_use_underline") | |||
| 1859 | - | core.PuregoSafeRegister(&xViewStackPageGetVisible, libs, "adw_view_stack_page_get_visible") | |||
| 1860 | - | core.PuregoSafeRegister(&xViewStackPageSetBadgeNumber, libs, "adw_view_stack_page_set_badge_number") | |||
| 1861 | - | core.PuregoSafeRegister(&xViewStackPageSetIconName, libs, "adw_view_stack_page_set_icon_name") | |||
| 1862 | - | core.PuregoSafeRegister(&xViewStackPageSetName, libs, "adw_view_stack_page_set_name") | |||
| 1863 | - | core.PuregoSafeRegister(&xViewStackPageSetNeedsAttention, libs, "adw_view_stack_page_set_needs_attention") | |||
| 1864 | - | core.PuregoSafeRegister(&xViewStackPageSetSectionTitle, libs, "adw_view_stack_page_set_section_title") | |||
| 1865 | - | core.PuregoSafeRegister(&xViewStackPageSetStartsSection, libs, "adw_view_stack_page_set_starts_section") | |||
| 1866 | - | core.PuregoSafeRegister(&xViewStackPageSetTitle, libs, "adw_view_stack_page_set_title") | |||
| 1867 | - | core.PuregoSafeRegister(&xViewStackPageSetUseUnderline, libs, "adw_view_stack_page_set_use_underline") | |||
| 1868 | - | core.PuregoSafeRegister(&xViewStackPageSetVisible, libs, "adw_view_stack_page_set_visible") | |||
| 1869 | - | ||||
| 1870 | - | core.PuregoSafeRegister(&xViewStackPagesGLibType, libs, "adw_view_stack_pages_get_type") | |||
| 1871 | - | ||||
| 1872 | - | core.PuregoSafeRegister(&xViewStackPagesGetSelectedPage, libs, "adw_view_stack_pages_get_selected_page") | |||
| 1873 | - | core.PuregoSafeRegister(&xViewStackPagesSetSelectedPage, libs, "adw_view_stack_pages_set_selected_page") | |||
| 1874 | } | 1890 | } | ||