Merge pull request #344 from bnema/chore/upstream-foundations
chore(deps): integrate approved upstream foundations
921 files · +28709 -25527
M docs/first-presentation.md +5 -2
| @@ -46,5 +46,8 @@ labels. Set `DUMBER_MACHINE_GPU_PROFILE` to one of `generic-gpu`, | |||
| 46 | 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | |
| 47 | 47 | do not use a device model or other identifier. Publish only the seven reviewed | |
| 48 | 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | |
| 49 | - | must not be published. A missing or incomplete timeline, non-DMABUF backend, or | |
| 50 | - | invalid run fails collection. | |
| 49 | + | must not be published. `metadata.json` derives the selected | |
| 50 | + | `github.com/bnema/purego-cef2gtk` pseudo-version and its full immutable Git | |
| 51 | + | origin hash from Go module metadata; branch selectors or missing origin metadata | |
| 52 | + | fail collection. A missing or incomplete timeline, non-DMABUF backend, or invalid | |
| 53 | + | run also fails collection. | |
| @@ -46,5 +46,8 @@ labels. Set `DUMBER_MACHINE_GPU_PROFILE` to one of `generic-gpu`, | |||||
| 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | ||
| 47 | do not use a device model or other identifier. Publish only the seven reviewed | 47 | do not use a device model or other identifier. Publish only the seven reviewed | ||
| 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | ||
| 49 | - | must not be published. A missing or incomplete timeline, non-DMABUF backend, or | 49 | + | must not be published. `metadata.json` derives the selected |
| 50 | - | invalid run fails collection. | 50 | + | `github.com/bnema/purego-cef2gtk` pseudo-version and its full immutable Git |
| 51 | + | origin hash from Go module metadata; branch selectors or missing origin metadata | |||
| 52 | + | fail collection. A missing or incomplete timeline, non-DMABUF backend, or invalid | |||
| 53 | + | run also fails collection. | |||
M go.mod +5 -5
| @@ -6,11 +6,11 @@ require ( | |||
| 6 | 6 | github.com/a-h/templ v0.3.1020 | |
| 7 | 7 | github.com/andybalholm/brotli v1.2.2 | |
| 8 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | |
| 9 | - | github.com/bnema/purego-cef v0.13.3 | |
| 10 | - | github.com/bnema/purego-cef2gtk v0.8.4 | |
| 11 | - | github.com/bnema/purego-pipewire v0.1.4 | |
| 12 | - | github.com/bnema/purego-sqlite v0.1.3 | |
| 13 | - | github.com/bnema/puregotk v0.7.0 | |
| 9 | + | github.com/bnema/purego-cef v0.13.4-0.20260714140305-f0b7414af67e | |
| 10 | + | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe | |
| 11 | + | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | + | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | + | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | 14 | github.com/charmbracelet/bubbles v1.0.0 | |
| 15 | 15 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 16 | 16 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -6,11 +6,11 @@ require ( | |||||
| 6 | github.com/a-h/templ v0.3.1020 | 6 | github.com/a-h/templ v0.3.1020 | ||
| 7 | github.com/andybalholm/brotli v1.2.2 | 7 | github.com/andybalholm/brotli v1.2.2 | ||
| 8 | github.com/bnema/purego v0.11.0-bnema.4 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | ||
| 9 | - | github.com/bnema/purego-cef v0.13.3 | 9 | + | github.com/bnema/purego-cef v0.13.4-0.20260714140305-f0b7414af67e |
| 10 | - | github.com/bnema/purego-cef2gtk v0.8.4 | 10 | + | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe |
| 11 | - | github.com/bnema/purego-pipewire v0.1.4 | 11 | + | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a |
| 12 | - | github.com/bnema/purego-sqlite v0.1.3 | 12 | + | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c |
| 13 | - | github.com/bnema/puregotk v0.7.0 | 13 | + | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 |
| 14 | github.com/charmbracelet/bubbles v1.0.0 | 14 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 15 | github.com/charmbracelet/bubbletea v1.3.10 | 15 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 16 | github.com/charmbracelet/lipgloss v1.1.0 | 16 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +12 -0 generated file: collapsed
A internal/infrastructure/persistence/sqlite/history_repo_benchmark_test.go +71 -0
| @@ -0,0 +1,71 @@ | |||
| 1 | + | package sqlite_test | |
| 2 | + | ||
| 3 | + | import ( | |
| 4 | + | "fmt" | |
| 5 | + | "path/filepath" | |
| 6 | + | "testing" | |
| 7 | + | ||
| 8 | + | "github.com/bnema/dumber/internal/domain/entity" | |
| 9 | + | "github.com/bnema/dumber/internal/domain/repository" | |
| 10 | + | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | |
| 11 | + | ) | |
| 12 | + | ||
| 13 | + | // newHistoryBenchmarkRepository creates a representative local history corpus | |
| 14 | + | // outside the measured operation. Sidebar reads use GetRecent and omnibox | |
| 15 | + | // history suggestions use Search. | |
| 16 | + | func newHistoryBenchmarkRepository(b *testing.B) (repository.HistoryRepository, func()) { | |
| 17 | + | b.Helper() | |
| 18 | + | ||
| 19 | + | ctx := historyTestCtx() | |
| 20 | + | db, err := sqlite.NewConnection(ctx, filepath.Join(b.TempDir(), "dumber.db")) | |
| 21 | + | if err != nil { | |
| 22 | + | b.Fatal(err) | |
| 23 | + | } | |
| 24 | + | ||
| 25 | + | b.Cleanup(func() { | |
| 26 | + | if err := db.Close(); err != nil { | |
| 27 | + | b.Errorf("close benchmark database: %v", err) | |
| 28 | + | } | |
| 29 | + | }) | |
| 30 | + | ||
| 31 | + | repo := sqlite.NewHistoryRepository(db) | |
| 32 | + | for i := range 200 { | |
| 33 | + | entry := &entity.HistoryEntry{ | |
| 34 | + | URL: fmt.Sprintf("https://example%d.test/dumber/history/%d", i%20, i), | |
| 35 | + | Title: fmt.Sprintf("Dumber history entry %d", i), | |
| 36 | + | } | |
| 37 | + | if err := repo.Save(ctx, entry); err != nil { | |
| 38 | + | b.Fatal(err) | |
| 39 | + | } | |
| 40 | + | } | |
| 41 | + | ||
| 42 | + | return repo, func() {} | |
| 43 | + | } | |
| 44 | + | ||
| 45 | + | func BenchmarkHistorySQLiteSidebarRecent(b *testing.B) { | |
| 46 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |
| 47 | + | defer closeDB() | |
| 48 | + | ctx := historyTestCtx() | |
| 49 | + | ||
| 50 | + | b.ReportAllocs() | |
| 51 | + | b.ResetTimer() | |
| 52 | + | for range b.N { | |
| 53 | + | if _, err := repo.GetRecent(ctx, 50, 0); err != nil { | |
| 54 | + | b.Fatal(err) | |
| 55 | + | } | |
| 56 | + | } | |
| 57 | + | } | |
| 58 | + | ||
| 59 | + | func BenchmarkHistorySQLiteOmniboxSearch(b *testing.B) { | |
| 60 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |
| 61 | + | defer closeDB() | |
| 62 | + | ctx := historyTestCtx() | |
| 63 | + | ||
| 64 | + | b.ReportAllocs() | |
| 65 | + | b.ResetTimer() | |
| 66 | + | for range b.N { | |
| 67 | + | if _, err := repo.Search(ctx, "dumber history", 10); err != nil { | |
| 68 | + | b.Fatal(err) | |
| 69 | + | } | |
| 70 | + | } | |
| 71 | + | } | |
| @@ -0,0 +1,71 @@ | |||||
| 1 | + | package sqlite_test | |||
| 2 | + | ||||
| 3 | + | import ( | |||
| 4 | + | "fmt" | |||
| 5 | + | "path/filepath" | |||
| 6 | + | "testing" | |||
| 7 | + | ||||
| 8 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 9 | + | "github.com/bnema/dumber/internal/domain/repository" | |||
| 10 | + | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // newHistoryBenchmarkRepository creates a representative local history corpus | |||
| 14 | + | // outside the measured operation. Sidebar reads use GetRecent and omnibox | |||
| 15 | + | // history suggestions use Search. | |||
| 16 | + | func newHistoryBenchmarkRepository(b *testing.B) (repository.HistoryRepository, func()) { | |||
| 17 | + | b.Helper() | |||
| 18 | + | ||||
| 19 | + | ctx := historyTestCtx() | |||
| 20 | + | db, err := sqlite.NewConnection(ctx, filepath.Join(b.TempDir(), "dumber.db")) | |||
| 21 | + | if err != nil { | |||
| 22 | + | b.Fatal(err) | |||
| 23 | + | } | |||
| 24 | + | ||||
| 25 | + | b.Cleanup(func() { | |||
| 26 | + | if err := db.Close(); err != nil { | |||
| 27 | + | b.Errorf("close benchmark database: %v", err) | |||
| 28 | + | } | |||
| 29 | + | }) | |||
| 30 | + | ||||
| 31 | + | repo := sqlite.NewHistoryRepository(db) | |||
| 32 | + | for i := range 200 { | |||
| 33 | + | entry := &entity.HistoryEntry{ | |||
| 34 | + | URL: fmt.Sprintf("https://example%d.test/dumber/history/%d", i%20, i), | |||
| 35 | + | Title: fmt.Sprintf("Dumber history entry %d", i), | |||
| 36 | + | } | |||
| 37 | + | if err := repo.Save(ctx, entry); err != nil { | |||
| 38 | + | b.Fatal(err) | |||
| 39 | + | } | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | return repo, func() {} | |||
| 43 | + | } | |||
| 44 | + | ||||
| 45 | + | func BenchmarkHistorySQLiteSidebarRecent(b *testing.B) { | |||
| 46 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |||
| 47 | + | defer closeDB() | |||
| 48 | + | ctx := historyTestCtx() | |||
| 49 | + | ||||
| 50 | + | b.ReportAllocs() | |||
| 51 | + | b.ResetTimer() | |||
| 52 | + | for range b.N { | |||
| 53 | + | if _, err := repo.GetRecent(ctx, 50, 0); err != nil { | |||
| 54 | + | b.Fatal(err) | |||
| 55 | + | } | |||
| 56 | + | } | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | func BenchmarkHistorySQLiteOmniboxSearch(b *testing.B) { | |||
| 60 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |||
| 61 | + | defer closeDB() | |||
| 62 | + | ctx := historyTestCtx() | |||
| 63 | + | ||||
| 64 | + | b.ReportAllocs() | |||
| 65 | + | b.ResetTimer() | |||
| 66 | + | for range b.N { | |||
| 67 | + | if _, err := repo.Search(ctx, "dumber history", 10); err != nil { | |||
| 68 | + | b.Fatal(err) | |||
| 69 | + | } | |||
| 70 | + | } | |||
| 71 | + | } | |||
M internal/logging/first_presentation_collector_test.go +132 -1
| @@ -2,6 +2,7 @@ package logging | |||
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | 4 | "encoding/json" | |
| 5 | + | "fmt" | |
| 5 | 6 | "os" | |
| 6 | 7 | "os/exec" | |
| 7 | 8 | "path/filepath" | |
| @@ -143,8 +144,9 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||
| 143 | 144 | } | |
| 144 | 145 | for _, required := range []string{ | |
| 145 | 146 | `"measured_source_revision"`, | |
| 147 | + | `"version": "v0.8.4-0.20260714160309-bbd397409ebe"`, | |
| 146 | 148 | `"tag": "v0.8.4"`, | |
| 147 | - | `"revision": "f217ece342dea3ef2a3f98671fcd16a39ad0037d"`, | |
| 149 | + | `"revision": "bbd397409ebed75a5979c1e4566a2ef319f6a484"`, | |
| 148 | 150 | } { | |
| 149 | 151 | require.Contains(t, artifacts.String(), required) | |
| 150 | 152 | } | |
| @@ -166,6 +168,135 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||
| 166 | 168 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | |
| 167 | 169 | } | |
| 168 | 170 | ||
| 171 | + | func TestFirstPresentationCollectorDerivesSelectedImmutableModuleProvenance(t *testing.T) { | |
| 172 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 173 | + | require.NoError(t, err) | |
| 174 | + | temp := t.TempDir() | |
| 175 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |
| 176 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |
| 177 | + | binary := filepath.Join(temp, "dumber") | |
| 178 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |
| 179 | + | ||
| 180 | + | // This exact pseudo-version is deliberately newer than the former v0.8.4 | |
| 181 | + | // hardcode; the collector must report what the selected module says. | |
| 182 | + | const version = "v0.8.5-0.20300102030405-bbd397409ebe" | |
| 183 | + | const revision = "bbd397409ebed75a5979c1e4566a2ef319f6a484" | |
| 184 | + | goBin := collectorProvenanceGo(t, temp, version, revision, "") | |
| 185 | + | output := filepath.Join(temp, "artifacts") | |
| 186 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 187 | + | cmd.Dir = repoRoot | |
| 188 | + | cmd.Env = append(os.Environ(), | |
| 189 | + | "DISPLAY=:test", | |
| 190 | + | "DUMBER_CEF_DIR="+runtime, | |
| 191 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |
| 192 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |
| 193 | + | "DUMBER_FIRST_PRESENTATION_TIMEOUT_SECONDS=1", | |
| 194 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |
| 195 | + | ) | |
| 196 | + | result, err := cmd.CombinedOutput() | |
| 197 | + | require.NoErrorf(t, err, "collector failed: %s", result) | |
| 198 | + | ||
| 199 | + | var metadata struct { | |
| 200 | + | Upstream struct { | |
| 201 | + | Module string `json:"module"` | |
| 202 | + | Version string `json:"version"` | |
| 203 | + | Tag string `json:"tag"` | |
| 204 | + | Revision string `json:"revision"` | |
| 205 | + | } `json:"upstream"` | |
| 206 | + | } | |
| 207 | + | contents, err := os.ReadFile(filepath.Join(output, "metadata.json")) | |
| 208 | + | require.NoError(t, err) | |
| 209 | + | require.NoError(t, json.Unmarshal(contents, &metadata)) | |
| 210 | + | require.Equal(t, "github.com/bnema/purego-cef2gtk", metadata.Upstream.Module) | |
| 211 | + | require.Equal(t, version, metadata.Upstream.Version) | |
| 212 | + | require.Equal(t, "v0.8.5", metadata.Upstream.Tag) | |
| 213 | + | require.Equal(t, revision, metadata.Upstream.Revision) | |
| 214 | + | ||
| 215 | + | script, err := os.ReadFile(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 216 | + | require.NoError(t, err) | |
| 217 | + | require.NotContains(t, string(script), "f217ece342dea3ef2a3f98671fcd16a39ad0037d") | |
| 218 | + | } | |
| 219 | + | ||
| 220 | + | func TestFirstPresentationCollectorRejectsNonImmutableModuleProvenanceWithoutLeaks(t *testing.T) { | |
| 221 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 222 | + | require.NoError(t, err) | |
| 223 | + | ||
| 224 | + | for _, test := range []struct { | |
| 225 | + | name, version, revision, ref string | |
| 226 | + | }{ | |
| 227 | + | {name: "branch selector", version: "main", ref: "main"}, | |
| 228 | + | {name: "missing origin", version: "v0.8.5-0.20300102030405-bbd397409ebe"}, | |
| 229 | + | {name: "named origin ref", version: "v0.8.5-0.20300102030405-bbd397409ebe", revision: "bbd397409ebed75a5979c1e4566a2ef319f6a484", ref: "main"}, | |
| 230 | + | } { | |
| 231 | + | t.Run(test.name, func(t *testing.T) { | |
| 232 | + | temp := t.TempDir() | |
| 233 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |
| 234 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |
| 235 | + | binary := filepath.Join(temp, "dumber") | |
| 236 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |
| 237 | + | ||
| 238 | + | goBin := collectorProvenanceGo(t, temp, test.version, test.revision, test.ref) | |
| 239 | + | output := filepath.Join(temp, "artifacts") | |
| 240 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 241 | + | cmd.Dir = repoRoot | |
| 242 | + | cmd.Env = append(os.Environ(), | |
| 243 | + | "DISPLAY=:test", | |
| 244 | + | "DUMBER_CEF_DIR="+runtime, | |
| 245 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |
| 246 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |
| 247 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |
| 248 | + | ) | |
| 249 | + | result, runErr := cmd.CombinedOutput() | |
| 250 | + | require.Errorf(t, runErr, "collector accepted nonimmutable module provenance: %s", result) | |
| 251 | + | require.Contains(t, string(result), "immutable module provenance is unavailable") | |
| 252 | + | require.NotContains(t, string(result), temp) | |
| 253 | + | require.NoFileExists(t, filepath.Join(output, "metadata.json")) | |
| 254 | + | for _, name := range runArtifactNames() { | |
| 255 | + | require.NoFileExists(t, filepath.Join(output, name)) | |
| 256 | + | } | |
| 257 | + | }) | |
| 258 | + | } | |
| 259 | + | } | |
| 260 | + | ||
| 261 | + | func collectorProvenanceGo(t *testing.T, temp, version, revision, ref string) string { | |
| 262 | + | t.Helper() | |
| 263 | + | infoPath := filepath.Join(temp, "module.info") | |
| 264 | + | info := map[string]any{"Version": version} | |
| 265 | + | if revision != "" { | |
| 266 | + | info["Origin"] = map[string]string{ | |
| 267 | + | "VCS": "git", "URL": "https://github.com/bnema/purego-cef2gtk", "Hash": revision, "Ref": ref, | |
| 268 | + | } | |
| 269 | + | } | |
| 270 | + | infoJSON, err := json.Marshal(info) | |
| 271 | + | require.NoError(t, err) | |
| 272 | + | require.NoError(t, os.WriteFile(infoPath, infoJSON, 0o600)) | |
| 273 | + | ||
| 274 | + | selectedJSON, err := json.Marshal(map[string]string{ | |
| 275 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, | |
| 276 | + | }) | |
| 277 | + | require.NoError(t, err) | |
| 278 | + | downloadedJSON, err := json.Marshal(map[string]string{ | |
| 279 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, "Info": infoPath, | |
| 280 | + | }) | |
| 281 | + | require.NoError(t, err) | |
| 282 | + | binDir := filepath.Join(temp, "bin") | |
| 283 | + | require.NoError(t, os.Mkdir(binDir, 0o755)) | |
| 284 | + | goBin := filepath.Join(binDir, "go") | |
| 285 | + | script := fmt.Sprintf(`#!/bin/sh | |
| 286 | + | if [ "$1" = "list" ] && [ "$2" = "-m" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk" ]; then | |
| 287 | + | printf '%%s\n' '%s' | |
| 288 | + | exit 0 | |
| 289 | + | fi | |
| 290 | + | if [ "$1" = "mod" ] && [ "$2" = "download" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk@%s" ]; then | |
| 291 | + | printf '%%s\n' '%s' | |
| 292 | + | exit 0 | |
| 293 | + | fi | |
| 294 | + | exit 1 | |
| 295 | + | `, selectedJSON, version, downloadedJSON) | |
| 296 | + | require.NoError(t, os.WriteFile(goBin, []byte(script), 0o755)) | |
| 297 | + | return goBin | |
| 298 | + | } | |
| 299 | + | ||
| 169 | 300 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | |
| 170 | 301 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 171 | 302 | require.NoError(t, err) | |
| @@ -2,6 +2,7 @@ package logging | |||||
| 2 | 2 | ||||
| 3 | import ( | 3 | import ( | ||
| 4 | "encoding/json" | 4 | "encoding/json" | ||
| 5 | + | "fmt" | |||
| 5 | "os" | 6 | "os" | ||
| 6 | "os/exec" | 7 | "os/exec" | ||
| 7 | "path/filepath" | 8 | "path/filepath" | ||
| @@ -143,8 +144,9 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||||
| 143 | } | 144 | } | ||
| 144 | for _, required := range []string{ | 145 | for _, required := range []string{ | ||
| 145 | `"measured_source_revision"`, | 146 | `"measured_source_revision"`, | ||
| 147 | + | `"version": "v0.8.4-0.20260714160309-bbd397409ebe"`, | |||
| 146 | `"tag": "v0.8.4"`, | 148 | `"tag": "v0.8.4"`, | ||
| 147 | - | `"revision": "f217ece342dea3ef2a3f98671fcd16a39ad0037d"`, | 149 | + | `"revision": "bbd397409ebed75a5979c1e4566a2ef319f6a484"`, |
| 148 | } { | 150 | } { | ||
| 149 | require.Contains(t, artifacts.String(), required) | 151 | require.Contains(t, artifacts.String(), required) | ||
| 150 | } | 152 | } | ||
| @@ -166,6 +168,135 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||||
| 166 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | 168 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | ||
| 167 | } | 169 | } | ||
| 168 | 170 | ||||
| 171 | + | func TestFirstPresentationCollectorDerivesSelectedImmutableModuleProvenance(t *testing.T) { | |||
| 172 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |||
| 173 | + | require.NoError(t, err) | |||
| 174 | + | temp := t.TempDir() | |||
| 175 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |||
| 176 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |||
| 177 | + | binary := filepath.Join(temp, "dumber") | |||
| 178 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |||
| 179 | + | ||||
| 180 | + | // This exact pseudo-version is deliberately newer than the former v0.8.4 | |||
| 181 | + | // hardcode; the collector must report what the selected module says. | |||
| 182 | + | const version = "v0.8.5-0.20300102030405-bbd397409ebe" | |||
| 183 | + | const revision = "bbd397409ebed75a5979c1e4566a2ef319f6a484" | |||
| 184 | + | goBin := collectorProvenanceGo(t, temp, version, revision, "") | |||
| 185 | + | output := filepath.Join(temp, "artifacts") | |||
| 186 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 187 | + | cmd.Dir = repoRoot | |||
| 188 | + | cmd.Env = append(os.Environ(), | |||
| 189 | + | "DISPLAY=:test", | |||
| 190 | + | "DUMBER_CEF_DIR="+runtime, | |||
| 191 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |||
| 192 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |||
| 193 | + | "DUMBER_FIRST_PRESENTATION_TIMEOUT_SECONDS=1", | |||
| 194 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |||
| 195 | + | ) | |||
| 196 | + | result, err := cmd.CombinedOutput() | |||
| 197 | + | require.NoErrorf(t, err, "collector failed: %s", result) | |||
| 198 | + | ||||
| 199 | + | var metadata struct { | |||
| 200 | + | Upstream struct { | |||
| 201 | + | Module string `json:"module"` | |||
| 202 | + | Version string `json:"version"` | |||
| 203 | + | Tag string `json:"tag"` | |||
| 204 | + | Revision string `json:"revision"` | |||
| 205 | + | } `json:"upstream"` | |||
| 206 | + | } | |||
| 207 | + | contents, err := os.ReadFile(filepath.Join(output, "metadata.json")) | |||
| 208 | + | require.NoError(t, err) | |||
| 209 | + | require.NoError(t, json.Unmarshal(contents, &metadata)) | |||
| 210 | + | require.Equal(t, "github.com/bnema/purego-cef2gtk", metadata.Upstream.Module) | |||
| 211 | + | require.Equal(t, version, metadata.Upstream.Version) | |||
| 212 | + | require.Equal(t, "v0.8.5", metadata.Upstream.Tag) | |||
| 213 | + | require.Equal(t, revision, metadata.Upstream.Revision) | |||
| 214 | + | ||||
| 215 | + | script, err := os.ReadFile(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 216 | + | require.NoError(t, err) | |||
| 217 | + | require.NotContains(t, string(script), "f217ece342dea3ef2a3f98671fcd16a39ad0037d") | |||
| 218 | + | } | |||
| 219 | + | ||||
| 220 | + | func TestFirstPresentationCollectorRejectsNonImmutableModuleProvenanceWithoutLeaks(t *testing.T) { | |||
| 221 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |||
| 222 | + | require.NoError(t, err) | |||
| 223 | + | ||||
| 224 | + | for _, test := range []struct { | |||
| 225 | + | name, version, revision, ref string | |||
| 226 | + | }{ | |||
| 227 | + | {name: "branch selector", version: "main", ref: "main"}, | |||
| 228 | + | {name: "missing origin", version: "v0.8.5-0.20300102030405-bbd397409ebe"}, | |||
| 229 | + | {name: "named origin ref", version: "v0.8.5-0.20300102030405-bbd397409ebe", revision: "bbd397409ebed75a5979c1e4566a2ef319f6a484", ref: "main"}, | |||
| 230 | + | } { | |||
| 231 | + | t.Run(test.name, func(t *testing.T) { | |||
| 232 | + | temp := t.TempDir() | |||
| 233 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |||
| 234 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |||
| 235 | + | binary := filepath.Join(temp, "dumber") | |||
| 236 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |||
| 237 | + | ||||
| 238 | + | goBin := collectorProvenanceGo(t, temp, test.version, test.revision, test.ref) | |||
| 239 | + | output := filepath.Join(temp, "artifacts") | |||
| 240 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 241 | + | cmd.Dir = repoRoot | |||
| 242 | + | cmd.Env = append(os.Environ(), | |||
| 243 | + | "DISPLAY=:test", | |||
| 244 | + | "DUMBER_CEF_DIR="+runtime, | |||
| 245 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |||
| 246 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |||
| 247 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |||
| 248 | + | ) | |||
| 249 | + | result, runErr := cmd.CombinedOutput() | |||
| 250 | + | require.Errorf(t, runErr, "collector accepted nonimmutable module provenance: %s", result) | |||
| 251 | + | require.Contains(t, string(result), "immutable module provenance is unavailable") | |||
| 252 | + | require.NotContains(t, string(result), temp) | |||
| 253 | + | require.NoFileExists(t, filepath.Join(output, "metadata.json")) | |||
| 254 | + | for _, name := range runArtifactNames() { | |||
| 255 | + | require.NoFileExists(t, filepath.Join(output, name)) | |||
| 256 | + | } | |||
| 257 | + | }) | |||
| 258 | + | } | |||
| 259 | + | } | |||
| 260 | + | ||||
| 261 | + | func collectorProvenanceGo(t *testing.T, temp, version, revision, ref string) string { | |||
| 262 | + | t.Helper() | |||
| 263 | + | infoPath := filepath.Join(temp, "module.info") | |||
| 264 | + | info := map[string]any{"Version": version} | |||
| 265 | + | if revision != "" { | |||
| 266 | + | info["Origin"] = map[string]string{ | |||
| 267 | + | "VCS": "git", "URL": "https://github.com/bnema/purego-cef2gtk", "Hash": revision, "Ref": ref, | |||
| 268 | + | } | |||
| 269 | + | } | |||
| 270 | + | infoJSON, err := json.Marshal(info) | |||
| 271 | + | require.NoError(t, err) | |||
| 272 | + | require.NoError(t, os.WriteFile(infoPath, infoJSON, 0o600)) | |||
| 273 | + | ||||
| 274 | + | selectedJSON, err := json.Marshal(map[string]string{ | |||
| 275 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, | |||
| 276 | + | }) | |||
| 277 | + | require.NoError(t, err) | |||
| 278 | + | downloadedJSON, err := json.Marshal(map[string]string{ | |||
| 279 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, "Info": infoPath, | |||
| 280 | + | }) | |||
| 281 | + | require.NoError(t, err) | |||
| 282 | + | binDir := filepath.Join(temp, "bin") | |||
| 283 | + | require.NoError(t, os.Mkdir(binDir, 0o755)) | |||
| 284 | + | goBin := filepath.Join(binDir, "go") | |||
| 285 | + | script := fmt.Sprintf(`#!/bin/sh | |||
| 286 | + | if [ "$1" = "list" ] && [ "$2" = "-m" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk" ]; then | |||
| 287 | + | printf '%%s\n' '%s' | |||
| 288 | + | exit 0 | |||
| 289 | + | fi | |||
| 290 | + | if [ "$1" = "mod" ] && [ "$2" = "download" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk@%s" ]; then | |||
| 291 | + | printf '%%s\n' '%s' | |||
| 292 | + | exit 0 | |||
| 293 | + | fi | |||
| 294 | + | exit 1 | |||
| 295 | + | `, selectedJSON, version, downloadedJSON) | |||
| 296 | + | require.NoError(t, os.WriteFile(goBin, []byte(script), 0o755)) | |||
| 297 | + | return goBin | |||
| 298 | + | } | |||
| 299 | + | ||||
| 169 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | 300 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | ||
| 170 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | 301 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | ||
| 171 | require.NoError(t, err) | 302 | require.NoError(t, err) | ||
M scripts/collect_first_presentation.sh +78 -9
| @@ -31,8 +31,78 @@ else | |||
| 31 | 31 | fi | |
| 32 | 32 | readonly output | |
| 33 | 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | |
| 34 | - | readonly upstream_tag="v0.8.4" | |
| 35 | - | readonly upstream_revision="f217ece342dea3ef2a3f98671fcd16a39ad0037d" | |
| 34 | + | ||
| 35 | + | # Resolve the version selected by this checkout, then obtain its immutable VCS | |
| 36 | + | # origin from Go's cached module metadata. Do not infer a revision from a tag, | |
| 37 | + | # a branch, or a truncated pseudo-version suffix. | |
| 38 | + | resolve_upstream_provenance() { | |
| 39 | + | local selected_metadata selected_version downloaded_metadata | |
| 40 | + | ||
| 41 | + | selected_metadata="$(go list -m -json "$upstream_module" 2>/dev/null)" || { | |
| 42 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |
| 43 | + | exit 2 | |
| 44 | + | } | |
| 45 | + | selected_version="$(python3 - "$upstream_module" "$selected_metadata" <<'PY' | |
| 46 | + | import json, sys | |
| 47 | + | try: | |
| 48 | + | metadata = json.loads(sys.argv[2]) | |
| 49 | + | if metadata.get("Path") != sys.argv[1] or not isinstance(metadata.get("Version"), str): | |
| 50 | + | raise ValueError | |
| 51 | + | print(metadata["Version"]) | |
| 52 | + | except (AttributeError, TypeError, ValueError, json.JSONDecodeError): | |
| 53 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |
| 54 | + | PY | |
| 55 | + | )" || exit $? | |
| 56 | + | downloaded_metadata="$(go mod download -json "$upstream_module@$selected_version" 2>/dev/null)" || { | |
| 57 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |
| 58 | + | exit 2 | |
| 59 | + | } | |
| 60 | + | ||
| 61 | + | python3 - "$upstream_module" "$selected_metadata" "$downloaded_metadata" <<'PY' | |
| 62 | + | import json, re, sys | |
| 63 | + | ||
| 64 | + | module, selected_raw, downloaded_raw = sys.argv[1:] | |
| 65 | + | ||
| 66 | + | def fail(): | |
| 67 | + | # Do not expose Go cache locations or other machine-local values. | |
| 68 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |
| 69 | + | ||
| 70 | + | try: | |
| 71 | + | selected = json.loads(selected_raw) | |
| 72 | + | downloaded = json.loads(downloaded_raw) | |
| 73 | + | version = selected["Version"] | |
| 74 | + | if selected.get("Path") != module or downloaded.get("Path") != module: | |
| 75 | + | fail() | |
| 76 | + | if downloaded.get("Version") != version: | |
| 77 | + | fail() | |
| 78 | + | # A selected pseudo-version is an exact immutable selector, never a branch. | |
| 79 | + | match = re.fullmatch(r"(v\d+\.\d+\.\d+)-0\.\d{14}-([0-9a-f]{12})", version) | |
| 80 | + | if not match: | |
| 81 | + | fail() | |
| 82 | + | info_path = downloaded.get("Info") | |
| 83 | + | if not isinstance(info_path, str) or not info_path: | |
| 84 | + | fail() | |
| 85 | + | with open(info_path, encoding="utf-8") as info_file: | |
| 86 | + | info = json.load(info_file) | |
| 87 | + | origin = info.get("Origin") or downloaded.get("Origin") | |
| 88 | + | if info.get("Version") != version or not isinstance(origin, dict): | |
| 89 | + | fail() | |
| 90 | + | revision = origin.get("Hash") | |
| 91 | + | if origin.get("VCS") != "git" or origin.get("URL") != "https://github.com/bnema/purego-cef2gtk": | |
| 92 | + | fail() | |
| 93 | + | if not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision): | |
| 94 | + | fail() | |
| 95 | + | if not revision.startswith(match.group(2)): | |
| 96 | + | fail() | |
| 97 | + | # A named ref can move. Only the immutable hash itself is acceptable. | |
| 98 | + | if origin.get("Ref") not in (None, "", revision): | |
| 99 | + | fail() | |
| 100 | + | except (AttributeError, KeyError, OSError, TypeError, ValueError, json.JSONDecodeError): | |
| 101 | + | fail() | |
| 102 | + | ||
| 103 | + | print("\t".join((version, match.group(1), revision))) | |
| 104 | + | PY | |
| 105 | + | } | |
| 36 | 106 | ||
| 37 | 107 | # The artifact destination is caller-controlled. Never empty or recursively | |
| 38 | 108 | # clear it: collection only writes to a newly-created directory whose parent is | |
| @@ -66,10 +136,9 @@ prepare_output | |||
| 66 | 136 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | |
| 67 | 137 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | |
| 68 | 138 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | |
| 69 | - | [[ "$(go list -m -f '{{.Version}}' "$upstream_module")" == "$upstream_tag" ]] || { | |
| 70 | - | echo "first-presentation: expected $upstream_module@$upstream_tag" >&2 | |
| 71 | - | exit 2 | |
| 72 | - | } | |
| 139 | + | upstream_provenance="$(resolve_upstream_provenance)" || exit $? | |
| 140 | + | IFS=$'\t' read -r upstream_version upstream_tag upstream_revision <<<"$upstream_provenance" | |
| 141 | + | readonly upstream_version upstream_tag upstream_revision | |
| 73 | 142 | ||
| 74 | 143 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | |
| 75 | 144 | # outside the committed artifact directory and always remove them. | |
| @@ -80,9 +149,9 @@ cleanup_work_root() { | |||
| 80 | 149 | rm -rf -- "$work_root" | |
| 81 | 150 | } | |
| 82 | 151 | trap cleanup_work_root EXIT | |
| 83 | - | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_tag" "$upstream_revision" <<'PY' | |
| 152 | + | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_version" "$upstream_tag" "$upstream_revision" <<'PY' | |
| 84 | 153 | import hashlib, json, os, platform, subprocess, sys | |
| 85 | - | path, binary, timeout, upstream_module, upstream_tag, upstream_revision = sys.argv[1:] | |
| 154 | + | path, binary, timeout, upstream_module, upstream_version, upstream_tag, upstream_revision = sys.argv[1:] | |
| 86 | 155 | with open(binary, "rb") as candidate: | |
| 87 | 156 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | |
| 88 | 157 | ||
| @@ -102,7 +171,7 @@ json.dump({ | |||
| 102 | 171 | "binary": {"label": "dumber", "sha256": binary_sha256}, | |
| 103 | 172 | "timeout_seconds": int(timeout), | |
| 104 | 173 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | |
| 105 | - | "upstream": {"module": upstream_module, "tag": upstream_tag, "revision": upstream_revision}, | |
| 174 | + | "upstream": {"module": upstream_module, "version": upstream_version, "tag": upstream_tag, "revision": upstream_revision}, | |
| 106 | 175 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | |
| 107 | 176 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | |
| 108 | 177 | }, open(path, "w"), indent=2, sort_keys=True) | |
| @@ -31,8 +31,78 @@ else | |||||
| 31 | fi | 31 | fi | ||
| 32 | readonly output | 32 | readonly output | ||
| 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | ||
| 34 | - | readonly upstream_tag="v0.8.4" | 34 | + | |
| 35 | - | readonly upstream_revision="f217ece342dea3ef2a3f98671fcd16a39ad0037d" | 35 | + | # Resolve the version selected by this checkout, then obtain its immutable VCS |
| 36 | + | # origin from Go's cached module metadata. Do not infer a revision from a tag, | |||
| 37 | + | # a branch, or a truncated pseudo-version suffix. | |||
| 38 | + | resolve_upstream_provenance() { | |||
| 39 | + | local selected_metadata selected_version downloaded_metadata | |||
| 40 | + | ||||
| 41 | + | selected_metadata="$(go list -m -json "$upstream_module" 2>/dev/null)" || { | |||
| 42 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |||
| 43 | + | exit 2 | |||
| 44 | + | } | |||
| 45 | + | selected_version="$(python3 - "$upstream_module" "$selected_metadata" <<'PY' | |||
| 46 | + | import json, sys | |||
| 47 | + | try: | |||
| 48 | + | metadata = json.loads(sys.argv[2]) | |||
| 49 | + | if metadata.get("Path") != sys.argv[1] or not isinstance(metadata.get("Version"), str): | |||
| 50 | + | raise ValueError | |||
| 51 | + | print(metadata["Version"]) | |||
| 52 | + | except (AttributeError, TypeError, ValueError, json.JSONDecodeError): | |||
| 53 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |||
| 54 | + | PY | |||
| 55 | + | )" || exit $? | |||
| 56 | + | downloaded_metadata="$(go mod download -json "$upstream_module@$selected_version" 2>/dev/null)" || { | |||
| 57 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |||
| 58 | + | exit 2 | |||
| 59 | + | } | |||
| 60 | + | ||||
| 61 | + | python3 - "$upstream_module" "$selected_metadata" "$downloaded_metadata" <<'PY' | |||
| 62 | + | import json, re, sys | |||
| 63 | + | ||||
| 64 | + | module, selected_raw, downloaded_raw = sys.argv[1:] | |||
| 65 | + | ||||
| 66 | + | def fail(): | |||
| 67 | + | # Do not expose Go cache locations or other machine-local values. | |||
| 68 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |||
| 69 | + | ||||
| 70 | + | try: | |||
| 71 | + | selected = json.loads(selected_raw) | |||
| 72 | + | downloaded = json.loads(downloaded_raw) | |||
| 73 | + | version = selected["Version"] | |||
| 74 | + | if selected.get("Path") != module or downloaded.get("Path") != module: | |||
| 75 | + | fail() | |||
| 76 | + | if downloaded.get("Version") != version: | |||
| 77 | + | fail() | |||
| 78 | + | # A selected pseudo-version is an exact immutable selector, never a branch. | |||
| 79 | + | match = re.fullmatch(r"(v\d+\.\d+\.\d+)-0\.\d{14}-([0-9a-f]{12})", version) | |||
| 80 | + | if not match: | |||
| 81 | + | fail() | |||
| 82 | + | info_path = downloaded.get("Info") | |||
| 83 | + | if not isinstance(info_path, str) or not info_path: | |||
| 84 | + | fail() | |||
| 85 | + | with open(info_path, encoding="utf-8") as info_file: | |||
| 86 | + | info = json.load(info_file) | |||
| 87 | + | origin = info.get("Origin") or downloaded.get("Origin") | |||
| 88 | + | if info.get("Version") != version or not isinstance(origin, dict): | |||
| 89 | + | fail() | |||
| 90 | + | revision = origin.get("Hash") | |||
| 91 | + | if origin.get("VCS") != "git" or origin.get("URL") != "https://github.com/bnema/purego-cef2gtk": | |||
| 92 | + | fail() | |||
| 93 | + | if not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision): | |||
| 94 | + | fail() | |||
| 95 | + | if not revision.startswith(match.group(2)): | |||
| 96 | + | fail() | |||
| 97 | + | # A named ref can move. Only the immutable hash itself is acceptable. | |||
| 98 | + | if origin.get("Ref") not in (None, "", revision): | |||
| 99 | + | fail() | |||
| 100 | + | except (AttributeError, KeyError, OSError, TypeError, ValueError, json.JSONDecodeError): | |||
| 101 | + | fail() | |||
| 102 | + | ||||
| 103 | + | print("\t".join((version, match.group(1), revision))) | |||
| 104 | + | PY | |||
| 105 | + | } | |||
| 36 | 106 | ||||
| 37 | # The artifact destination is caller-controlled. Never empty or recursively | 107 | # The artifact destination is caller-controlled. Never empty or recursively | ||
| 38 | # clear it: collection only writes to a newly-created directory whose parent is | 108 | # clear it: collection only writes to a newly-created directory whose parent is | ||
| @@ -66,10 +136,9 @@ prepare_output | |||||
| 66 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | 136 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | ||
| 67 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | 137 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | ||
| 68 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | 138 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | ||
| 69 | - | [[ "$(go list -m -f '{{.Version}}' "$upstream_module")" == "$upstream_tag" ]] || { | 139 | + | upstream_provenance="$(resolve_upstream_provenance)" || exit $? |
| 70 | - | echo "first-presentation: expected $upstream_module@$upstream_tag" >&2 | 140 | + | IFS=$'\t' read -r upstream_version upstream_tag upstream_revision <<<"$upstream_provenance" |
| 71 | - | exit 2 | 141 | + | readonly upstream_version upstream_tag upstream_revision |
| 72 | - | } | |||
| 73 | 142 | ||||
| 74 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | 143 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | ||
| 75 | # outside the committed artifact directory and always remove them. | 144 | # outside the committed artifact directory and always remove them. | ||
| @@ -80,9 +149,9 @@ cleanup_work_root() { | |||||
| 80 | rm -rf -- "$work_root" | 149 | rm -rf -- "$work_root" | ||
| 81 | } | 150 | } | ||
| 82 | trap cleanup_work_root EXIT | 151 | trap cleanup_work_root EXIT | ||
| 83 | - | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_tag" "$upstream_revision" <<'PY' | 152 | + | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_version" "$upstream_tag" "$upstream_revision" <<'PY' |
| 84 | import hashlib, json, os, platform, subprocess, sys | 153 | import hashlib, json, os, platform, subprocess, sys | ||
| 85 | - | path, binary, timeout, upstream_module, upstream_tag, upstream_revision = sys.argv[1:] | 154 | + | path, binary, timeout, upstream_module, upstream_version, upstream_tag, upstream_revision = sys.argv[1:] |
| 86 | with open(binary, "rb") as candidate: | 155 | with open(binary, "rb") as candidate: | ||
| 87 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | 156 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | ||
| 88 | 157 | ||||
| @@ -102,7 +171,7 @@ json.dump({ | |||||
| 102 | "binary": {"label": "dumber", "sha256": binary_sha256}, | 171 | "binary": {"label": "dumber", "sha256": binary_sha256}, | ||
| 103 | "timeout_seconds": int(timeout), | 172 | "timeout_seconds": int(timeout), | ||
| 104 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | 173 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | ||
| 105 | - | "upstream": {"module": upstream_module, "tag": upstream_tag, "revision": upstream_revision}, | 174 | + | "upstream": {"module": upstream_module, "version": upstream_version, "tag": upstream_tag, "revision": upstream_revision}, |
| 106 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | 175 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | ||
| 107 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | 176 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | ||
| 108 | }, open(path, "w"), indent=2, sort_keys=True) | 177 | }, open(path, "w"), indent=2, sort_keys=True) | ||
M vendor/github.com/bnema/purego-cef/cef/bridge.go +8 -13 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/cefadapter/accelerated_paint.go +34 -37 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/dmabuf/frame.go +38 -19 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/gtkgdk/renderer.go +89 -69 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/player.go +5 -0 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/player_rt.go +10 -6 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/pwbuffer.go +66 -32 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/driver/driver.go +268 -63 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/core/db.go +8 -0 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/core/rows.go +13 -0 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/loader/loader.go +23 -5 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/ports/in/ports_gen.go +3 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +24 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +41 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +39 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +34 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +17 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +49 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +20 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +25 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +33 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +35 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +123 -87 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +30 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +41 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +64 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +40 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +78 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +15 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +66 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +57 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +36 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +20 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +34 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +28 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +23 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevice.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicepad.go +27 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicetool.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplay.go +51 -43 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplaymanager.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexture.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder.go +53 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrag.go +20 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurface.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurfacesize.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrawcontext.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrop.go +19 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkenums.go +21 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkevents.go +120 -118 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframeclock.go +22 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframetimings.go +17 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkglcontext.go +40 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexture.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexturebuilder.go +41 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkkeys.go +19 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexture.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexturebuilder.go +42 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmonitor.go +27 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpaintable.go +63 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpango.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpixbuf.go +2 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopup.go +47 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopuplayout.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkrgba.go +19 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkseat.go +11 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksnapshot.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksurface.go +46 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktexture.go +27 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevel.go +157 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevellayout.go +24 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevelsize.go +9 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktypes.go +95 -72 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkvulkancontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-animation.go +26 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-core.go +9 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-io.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-loader.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-simple-anim.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-transform.go +11 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf.go +102 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/main.go +5 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gaction.go +59 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gactiongroup.go +96 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gactionmap.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gappinfo.go +244 -116 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gapplication.go +79 -55 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gapplicationcommandline.go +31 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gasyncinitable.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gasyncresult.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbufferedinputstream.go +26 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbufferedoutputstream.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbytesicon.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcancellable.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcharsetconverter.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcontenttype.go +30 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverter.go +23 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverterinputstream.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverteroutputstream.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcredentials.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdatagrambased.go +45 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdatainputstream.go +31 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdataoutputstream.go +14 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusactiongroup.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusaddress.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusauthobserver.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusconnection.go +77 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbuserror.go +16 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusinterface.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusinterfaceskeleton.go +25 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusintrospection.go +54 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmenumodel.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmessage.go +88 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmethodinvocation.go +35 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusnameowning.go +10 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusnamewatching.go +10 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobject.go +19 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanager.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanagerclient.go +16 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanagerserver.go +13 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectproxy.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectskeleton.go +12 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusproxy.go +42 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusserver.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusutils.go +24 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdebugcontroller.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdebugcontrollerdbus.go +4 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdrive.go +214 -82 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsclientconnection.go +34 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsconnection.go +207 -80 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsserverconnection.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gemblem.go +6 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gemblemedicon.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfile.go +1148 -450 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileattribute.go +13 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileenumerator.go +34 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileicon.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileinfo.go +138 -84 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileinputstream.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileiostream.go +23 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilemonitor.go +9 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilenamecompleter.go +8 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileoutputstream.go +23 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilterinputstream.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilteroutputstream.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gicon.go +32 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetaddress.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetaddressmask.go +14 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetsocketaddress.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginitable.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginputstream.go +52 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioenums.go +90 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioerror.go +6 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giomodule.go +26 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioscheduler.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giostream.go +25 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giotypes.go +70 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giptosmessage.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gipv6tclassmessage.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/glistmodel.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gliststore.go +22 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gloadableicon.go +27 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemoryinputstream.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemorymonitor.go +2 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemoryoutputstream.go +13 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmenu.go +62 -50 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmenumodel.go +31 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmount.go +215 -86 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmountoperation.go +40 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnativesocketaddress.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnativevolumemonitor.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkaddress.go +11 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworking.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkmonitor.go +49 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkservice.go +12 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnotification.go +26 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/goutputstream.go +86 -72 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpermission.go +33 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableinputstream.go +30 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableoutputstream.go +41 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableutils.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpowerprofilemonitor.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpropertyaction.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxy.go +35 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyaddress.go +16 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyaddressenumerator.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyresolver.go +35 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gremoteactiongroup.go +12 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gresolver.go +75 -67 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gresource.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gseekable.go +41 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettings.go +99 -67 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettingsbackend.go +19 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettingsschema.go +48 -43 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleaction.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleactiongroup.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleasyncresult.go +46 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleiostream.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimplepermission.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleproxyresolver.go +8 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocket.go +87 -72 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketaddress.go +11 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketaddressenumerator.go +13 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketclient.go +54 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketconnectable.go +19 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketconnection.go +14 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketcontrolmessage.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketlistener.go +18 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketservice.go +8 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsrvtarget.go +2 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsubprocess.go +40 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsubprocesslauncher.go +34 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtask.go +70 -52 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtcpconnection.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtcpwrapperconnection.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtestdbus.go +16 -22 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gthemedicon.go +10 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gthreadedresolver.go +7 -0 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gthreadedsocketservice.go +2 -12 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsbackend.go +69 -33 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlscertificate.go +25 -29 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsclientconnection.go +55 -29 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsconnection.go +56 -46 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsdatabase.go +51 -48 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsfiledatabase.go +2 -13 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsinteraction.go +27 -31 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlspassword.go +20 -22 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gtlsserverconnection.go +2 -13 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gunixconnection.go +11 -20 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gunixcredentialsmessage.go +6 -17 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gunixfdlist.go +11 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gunixsocketaddress.go +14 -22 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gvfs.go +18 -24 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gvolume.go +143 -58 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gvolumemonitor.go +11 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gzlibcompressor.go +9 -18 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gzlibdecompressor.go +3 -15 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/main.go +2 -11 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gallocator.go +32 -28 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/garray.go +82 -59 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gasyncqueue.go +56 -39 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gatomic.go +43 -34 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbacktrace.go +5 -15 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbase64.go +13 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbitlock.go +23 -24 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbookmarkfile.go +69 -61 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gcache.go +10 -15 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gcharset.go +13 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gchecksum.go +23 -25 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gcompletion.go +14 -17 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gconvert.go +25 -28 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gdataset.go +36 -28 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gdate.go +103 -65 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gdatetime.go +107 -66 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gdir.go +12 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/genviron.go +17 -21 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gerror.go +30 -29 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gfileutils.go +45 -38 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/ggettext.go +13 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/ghash.go +81 -53 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/ghmac.go +21 -24 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/ghook.go +28 -26 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/ghostutils.go +11 -18 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/giochannel.go +83 -67 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gkeyfile.go +72 -62 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/glib-types.go +4 -12 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/glist.go +2 -11 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gmain.go +181 -117
| @@ -105,6 +105,7 @@ type MainContext struct { | |||
| 105 | 105 | var xMainContextGLibType func() types.GType | |
| 106 | 106 | ||
| 107 | 107 | func MainContextGLibType() types.GType { | |
| 108 | + | core.LazyRegister(&xMainContextGLibType, "GLIB", "g_main_context_get_type", false) | |
| 108 | 109 | return xMainContextGLibType() | |
| 109 | 110 | } | |
| 110 | 111 | ||
| @@ -124,6 +125,8 @@ var xNewMainContext func() uintptr | |||
| 124 | 125 | ||
| 125 | 126 | // Creates a new [struct@GLib.MainContext] structure. | |
| 126 | 127 | func NewMainContext() *MainContext { | |
| 128 | + | core.LazyRegister(&xNewMainContext, "GLIB", "g_main_context_new", false) | |
| 129 | + | ||
| 127 | 130 | cret := xNewMainContext() | |
| 128 | 131 | if cret == 0 { | |
| 129 | 132 | return nil | |
| @@ -135,6 +138,8 @@ var xNewMainContextWithFlags func(MainContextFlags) uintptr | |||
| 135 | 138 | ||
| 136 | 139 | // Creates a new [struct@GLib.MainContext] structure. | |
| 137 | 140 | func NewMainContextWithFlags(FlagsVar MainContextFlags) *MainContext { | |
| 141 | + | core.LazyRegister(&xNewMainContextWithFlags, "GLIB", "g_main_context_new_with_flags", false) | |
| 142 | + | ||
| 138 | 143 | cret := xNewMainContextWithFlags(FlagsVar) | |
| 139 | 144 | if cret == 0 { | |
| 140 | 145 | return nil | |
| @@ -160,6 +165,8 @@ var xMainContextAcquire func(uintptr) bool | |||
| 160 | 165 | // Since 2.76 @context can be `NULL` to use the global-default | |
| 161 | 166 | // main context. | |
| 162 | 167 | func (x *MainContext) Acquire() bool { | |
| 168 | + | core.LazyRegister(&xMainContextAcquire, "GLIB", "g_main_context_acquire", false) | |
| 169 | + | ||
| 163 | 170 | cret := xMainContextAcquire(x.GoPointer()) | |
| 164 | 171 | return cret | |
| 165 | 172 | } | |
| @@ -172,6 +179,8 @@ var xMainContextAddPoll func(uintptr, *PollFD, int) | |||
| 172 | 179 | // This will very seldom be used directly. Instead | |
| 173 | 180 | // a typical event source will use `g_source_add_unix_fd()` instead. | |
| 174 | 181 | func (x *MainContext) AddPoll(FdVar *PollFD, PriorityVar int) { | |
| 182 | + | core.LazyRegister(&xMainContextAddPoll, "GLIB", "g_main_context_add_poll", false) | |
| 183 | + | ||
| 175 | 184 | xMainContextAddPoll(x.GoPointer(), FdVar, PriorityVar) | |
| 176 | 185 | } | |
| 177 | 186 | ||
| @@ -190,6 +199,8 @@ var xMainContextCheck func(uintptr, int, []PollFD, int) bool | |||
| 190 | 199 | // Since 2.76 @context can be `NULL` to use the global-default | |
| 191 | 200 | // main context. | |
| 192 | 201 | func (x *MainContext) Check(MaxPriorityVar int, FdsVar []PollFD, NFdsVar int) bool { | |
| 202 | + | core.LazyRegister(&xMainContextCheck, "GLIB", "g_main_context_check", false) | |
| 203 | + | ||
| 193 | 204 | cret := xMainContextCheck(x.GoPointer(), MaxPriorityVar, FdsVar, NFdsVar) | |
| 194 | 205 | return cret | |
| 195 | 206 | } | |
| @@ -204,6 +215,8 @@ var xMainContextDispatch func(uintptr) | |||
| 204 | 215 | // Since 2.76 @context can be `NULL` to use the global-default | |
| 205 | 216 | // main context. | |
| 206 | 217 | func (x *MainContext) Dispatch() { | |
| 218 | + | core.LazyRegister(&xMainContextDispatch, "GLIB", "g_main_context_dispatch", false) | |
| 219 | + | ||
| 207 | 220 | xMainContextDispatch(x.GoPointer()) | |
| 208 | 221 | } | |
| 209 | 222 | ||
| @@ -214,6 +227,8 @@ var xMainContextFindSourceByFuncsUserData func(uintptr, *SourceFuncs, uintptr) u | |||
| 214 | 227 | // If multiple sources exist with the same source function and user data, | |
| 215 | 228 | // the first one found will be returned. | |
| 216 | 229 | func (x *MainContext) FindSourceByFuncsUserData(FuncsVar *SourceFuncs, UserDataVar uintptr) *Source { | |
| 230 | + | core.LazyRegister(&xMainContextFindSourceByFuncsUserData, "GLIB", "g_main_context_find_source_by_funcs_user_data", false) | |
| 231 | + | ||
| 217 | 232 | cret := xMainContextFindSourceByFuncsUserData(x.GoPointer(), FuncsVar, UserDataVar) | |
| 218 | 233 | if cret == 0 { | |
| 219 | 234 | return nil | |
| @@ -236,6 +251,8 @@ var xMainContextFindSourceById func(uintptr, uint) uintptr | |||
| 236 | 251 | // been reissued, leading to the operation being performed against the | |
| 237 | 252 | // wrong source. | |
| 238 | 253 | func (x *MainContext) FindSourceById(SourceIdVar uint) *Source { | |
| 254 | + | core.LazyRegister(&xMainContextFindSourceById, "GLIB", "g_main_context_find_source_by_id", false) | |
| 255 | + | ||
| 239 | 256 | cret := xMainContextFindSourceById(x.GoPointer(), SourceIdVar) | |
| 240 | 257 | if cret == 0 { | |
| 241 | 258 | return nil | |
| @@ -250,6 +267,8 @@ var xMainContextFindSourceByUserData func(uintptr, uintptr) uintptr | |||
| 250 | 267 | // If multiple sources exist with the same user data, the first | |
| 251 | 268 | // one found will be returned. | |
| 252 | 269 | func (x *MainContext) FindSourceByUserData(UserDataVar uintptr) *Source { | |
| 270 | + | core.LazyRegister(&xMainContextFindSourceByUserData, "GLIB", "g_main_context_find_source_by_user_data", false) | |
| 271 | + | ||
| 253 | 272 | cret := xMainContextFindSourceByUserData(x.GoPointer(), UserDataVar) | |
| 254 | 273 | if cret == 0 { | |
| 255 | 274 | return nil | |
| @@ -261,6 +280,8 @@ var xMainContextGetPollFunc func(uintptr) uintptr | |||
| 261 | 280 | ||
| 262 | 281 | // Gets the poll function set by [method@GLib.MainContext.set_poll_func]. | |
| 263 | 282 | func (x *MainContext) GetPollFunc() uintptr { | |
| 283 | + | core.LazyRegister(&xMainContextGetPollFunc, "GLIB", "g_main_context_get_poll_func", false) | |
| 284 | + | ||
| 264 | 285 | cret := xMainContextGetPollFunc(x.GoPointer()) | |
| 265 | 286 | return cret | |
| 266 | 287 | } | |
| @@ -289,6 +310,8 @@ var xMainContextInvoke func(uintptr, uintptr, uintptr) | |||
| 289 | 310 | // [const@GLib.SOURCE_REMOVE]. If it returns [const@GLib.SOURCE_CONTINUE], it | |
| 290 | 311 | // will be continuously run in a loop (and may prevent this call from returning). | |
| 291 | 312 | func (x *MainContext) Invoke(FunctionVar *SourceFunc, DataVar uintptr) { | |
| 313 | + | core.LazyRegister(&xMainContextInvoke, "GLIB", "g_main_context_invoke", false) | |
| 314 | + | ||
| 292 | 315 | xMainContextInvoke(x.GoPointer(), NewCallback(FunctionVar), DataVar) | |
| 293 | 316 | } | |
| 294 | 317 | ||
| @@ -305,6 +328,8 @@ var xMainContextInvokeFull func(uintptr, int, uintptr, uintptr, uintptr) | |||
| 305 | 328 | // The @notify function should not assume that it is called from any particular | |
| 306 | 329 | // thread or with any particular context acquired. | |
| 307 | 330 | func (x *MainContext) InvokeFull(PriorityVar int, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) { | |
| 331 | + | core.LazyRegister(&xMainContextInvokeFull, "GLIB", "g_main_context_invoke_full", false) | |
| 332 | + | ||
| 308 | 333 | xMainContextInvokeFull(x.GoPointer(), PriorityVar, NewCallback(FunctionVar), DataVar, NewCallbackNullable(NotifyVar)) | |
| 309 | 334 | } | |
| 310 | 335 | ||
| @@ -317,6 +342,8 @@ var xMainContextIsOwner func(uintptr) bool | |||
| 317 | 342 | // know before waiting on another thread that may be | |
| 318 | 343 | // blocking to get ownership of @context. | |
| 319 | 344 | func (x *MainContext) IsOwner() bool { | |
| 345 | + | core.LazyRegister(&xMainContextIsOwner, "GLIB", "g_main_context_is_owner", false) | |
| 346 | + | ||
| 320 | 347 | cret := xMainContextIsOwner(x.GoPointer()) | |
| 321 | 348 | return cret | |
| 322 | 349 | } | |
| @@ -337,6 +364,8 @@ var xMainContextIteration func(uintptr, bool) bool | |||
| 337 | 364 | // [method@GLib.MainContext.iteration] to return false, since the wait may | |
| 338 | 365 | // be interrupted for other reasons than an event source becoming ready. | |
| 339 | 366 | func (x *MainContext) Iteration(MayBlockVar bool) bool { | |
| 367 | + | core.LazyRegister(&xMainContextIteration, "GLIB", "g_main_context_iteration", false) | |
| 368 | + | ||
| 340 | 369 | cret := xMainContextIteration(x.GoPointer(), MayBlockVar) | |
| 341 | 370 | return cret | |
| 342 | 371 | } | |
| @@ -345,6 +374,8 @@ var xMainContextPending func(uintptr) bool | |||
| 345 | 374 | ||
| 346 | 375 | // Checks if any sources have pending events for the given context. | |
| 347 | 376 | func (x *MainContext) Pending() bool { | |
| 377 | + | core.LazyRegister(&xMainContextPending, "GLIB", "g_main_context_pending", false) | |
| 378 | + | ||
| 348 | 379 | cret := xMainContextPending(x.GoPointer()) | |
| 349 | 380 | return cret | |
| 350 | 381 | } | |
| @@ -354,6 +385,8 @@ var xMainContextPopThreadDefault func(uintptr) | |||
| 354 | 385 | // Pops @context off the thread-default context stack (verifying that | |
| 355 | 386 | // it was on the top of the stack). | |
| 356 | 387 | func (x *MainContext) PopThreadDefault() { | |
| 388 | + | core.LazyRegister(&xMainContextPopThreadDefault, "GLIB", "g_main_context_pop_thread_default", false) | |
| 389 | + | ||
| 357 | 390 | xMainContextPopThreadDefault(x.GoPointer()) | |
| 358 | 391 | } | |
| 359 | 392 | ||
| @@ -367,6 +400,8 @@ var xMainContextPrepare func(uintptr, *int) bool | |||
| 367 | 400 | // You must have successfully acquired the context with | |
| 368 | 401 | // [method@GLib.MainContext.acquire] before you may call this function. | |
| 369 | 402 | func (x *MainContext) Prepare(PriorityVar *int) bool { | |
| 403 | + | core.LazyRegister(&xMainContextPrepare, "GLIB", "g_main_context_prepare", false) | |
| 404 | + | ||
| 370 | 405 | cret := xMainContextPrepare(x.GoPointer(), PriorityVar) | |
| 371 | 406 | return cret | |
| 372 | 407 | } | |
| @@ -413,6 +448,8 @@ var xMainContextPushThreadDefault func(uintptr) | |||
| 413 | 448 | // handle being used from a thread with a thread-default context. For example, | |
| 414 | 449 | // see `g_file_supports_thread_contexts()`. | |
| 415 | 450 | func (x *MainContext) PushThreadDefault() { | |
| 451 | + | core.LazyRegister(&xMainContextPushThreadDefault, "GLIB", "g_main_context_push_thread_default", false) | |
| 452 | + | ||
| 416 | 453 | xMainContextPushThreadDefault(x.GoPointer()) | |
| 417 | 454 | } | |
| 418 | 455 | ||
| @@ -459,6 +496,8 @@ var xMainContextPusherNew func(uintptr) *MainContextPusher | |||
| 459 | 496 | // | |
| 460 | 497 | // ]| | |
| 461 | 498 | func (x *MainContext) PusherNew() *MainContextPusher { | |
| 499 | + | core.LazyRegister(&xMainContextPusherNew, "GLIB", "g_main_context_pusher_new", false) | |
| 500 | + | ||
| 462 | 501 | cret := xMainContextPusherNew(x.GoPointer()) | |
| 463 | 502 | return cret | |
| 464 | 503 | } | |
| @@ -475,6 +514,8 @@ var xMainContextQuery func(uintptr, int, *int, *[]PollFD, int) int | |||
| 475 | 514 | // You must have successfully acquired the context with | |
| 476 | 515 | // [method@GLib.MainContext.acquire] before you may call this function. | |
| 477 | 516 | func (x *MainContext) Query(MaxPriorityVar int, TimeoutVar *int, FdsVar *[]PollFD, NFdsVar int) int { | |
| 517 | + | core.LazyRegister(&xMainContextQuery, "GLIB", "g_main_context_query", false) | |
| 518 | + | ||
| 478 | 519 | cret := xMainContextQuery(x.GoPointer(), MaxPriorityVar, TimeoutVar, FdsVar, NFdsVar) | |
| 479 | 520 | return cret | |
| 480 | 521 | } | |
| @@ -483,6 +524,8 @@ var xMainContextRef func(uintptr) uintptr | |||
| 483 | 524 | ||
| 484 | 525 | // Increases the reference count on a [struct@GLib.MainContext] object by one. | |
| 485 | 526 | func (x *MainContext) Ref() *MainContext { | |
| 527 | + | core.LazyRegister(&xMainContextRef, "GLIB", "g_main_context_ref", false) | |
| 528 | + | ||
| 486 | 529 | cret := xMainContextRef(x.GoPointer()) | |
| 487 | 530 | if cret == 0 { | |
| 488 | 531 | return nil | |
| @@ -502,6 +545,8 @@ var xMainContextRelease func(uintptr) | |||
| 502 | 545 | // You must have successfully acquired the context with | |
| 503 | 546 | // [method@GLib.MainContext.acquire] before you may call this function. | |
| 504 | 547 | func (x *MainContext) Release() { | |
| 548 | + | core.LazyRegister(&xMainContextRelease, "GLIB", "g_main_context_release", false) | |
| 549 | + | ||
| 505 | 550 | xMainContextRelease(x.GoPointer()) | |
| 506 | 551 | } | |
| 507 | 552 | ||
| @@ -510,6 +555,8 @@ var xMainContextRemovePoll func(uintptr, *PollFD) | |||
| 510 | 555 | // Removes file descriptor from the set of file descriptors to be | |
| 511 | 556 | // polled for a particular context. | |
| 512 | 557 | func (x *MainContext) RemovePoll(FdVar *PollFD) { | |
| 558 | + | core.LazyRegister(&xMainContextRemovePoll, "GLIB", "g_main_context_remove_poll", false) | |
| 559 | + | ||
| 513 | 560 | xMainContextRemovePoll(x.GoPointer(), FdVar) | |
| 514 | 561 | } | |
| 515 | 562 | ||
| @@ -524,6 +571,8 @@ var xMainContextSetPollFunc func(uintptr, uintptr) | |||
| 524 | 571 | // This function could possibly be used to integrate the GLib event | |
| 525 | 572 | // loop with an external event loop. | |
| 526 | 573 | func (x *MainContext) SetPollFunc(FuncVar *PollFunc) { | |
| 574 | + | core.LazyRegister(&xMainContextSetPollFunc, "GLIB", "g_main_context_set_poll_func", false) | |
| 575 | + | ||
| 527 | 576 | xMainContextSetPollFunc(x.GoPointer(), NewCallback(FuncVar)) | |
| 528 | 577 | } | |
| 529 | 578 | ||
| @@ -533,6 +582,8 @@ var xMainContextUnref func(uintptr) | |||
| 533 | 582 | // If | |
| 534 | 583 | // the result is zero, free the context and free all associated memory. | |
| 535 | 584 | func (x *MainContext) Unref() { | |
| 585 | + | core.LazyRegister(&xMainContextUnref, "GLIB", "g_main_context_unref", false) | |
| 586 | + | ||
| 536 | 587 | xMainContextUnref(x.GoPointer()) | |
| 537 | 588 | } | |
| 538 | 589 | ||
| @@ -546,6 +597,8 @@ var xMainContextWait func(uintptr, *Cond, *Mutex) bool | |||
| 546 | 597 | // that owner releases ownership or until @cond is signaled, then | |
| 547 | 598 | // try again (once) to become the owner. | |
| 548 | 599 | func (x *MainContext) Wait(CondVar *Cond, MutexVar *Mutex) bool { | |
| 600 | + | core.LazyRegister(&xMainContextWait, "GLIB", "g_main_context_wait", false) | |
| 601 | + | ||
| 549 | 602 | cret := xMainContextWait(x.GoPointer(), CondVar, MutexVar) | |
| 550 | 603 | return cret | |
| 551 | 604 | } | |
| @@ -588,6 +641,8 @@ var xMainContextWakeup func(uintptr) | |||
| 588 | 641 | // | |
| 589 | 642 | // ``` | |
| 590 | 643 | func (x *MainContext) Wakeup() { | |
| 644 | + | core.LazyRegister(&xMainContextWakeup, "GLIB", "g_main_context_wakeup", false) | |
| 645 | + | ||
| 591 | 646 | xMainContextWakeup(x.GoPointer()) | |
| 592 | 647 | } | |
| 593 | 648 | ||
| @@ -600,6 +655,7 @@ type MainLoop struct { | |||
| 600 | 655 | var xMainLoopGLibType func() types.GType | |
| 601 | 656 | ||
| 602 | 657 | func MainLoopGLibType() types.GType { | |
| 658 | + | core.LazyRegister(&xMainLoopGLibType, "GLIB", "g_main_loop_get_type", false) | |
| 603 | 659 | return xMainLoopGLibType() | |
| 604 | 660 | } | |
| 605 | 661 | ||
| @@ -619,6 +675,8 @@ var xNewMainLoop func(*MainContext, bool) uintptr | |||
| 619 | 675 | ||
| 620 | 676 | // Creates a new [struct@GLib.MainLoop] structure. | |
| 621 | 677 | func NewMainLoop(ContextVar *MainContext, IsRunningVar bool) *MainLoop { | |
| 678 | + | core.LazyRegister(&xNewMainLoop, "GLIB", "g_main_loop_new", false) | |
| 679 | + | ||
| 622 | 680 | cret := xNewMainLoop(ContextVar, IsRunningVar) | |
| 623 | 681 | if cret == 0 { | |
| 624 | 682 | return nil | |
| @@ -630,6 +688,8 @@ var xMainLoopGetContext func(uintptr) uintptr | |||
| 630 | 688 | ||
| 631 | 689 | // Returns the [struct@GLib.MainContext] of @loop. | |
| 632 | 690 | func (x *MainLoop) GetContext() *MainContext { | |
| 691 | + | core.LazyRegister(&xMainLoopGetContext, "GLIB", "g_main_loop_get_context", false) | |
| 692 | + | ||
| 633 | 693 | cret := xMainLoopGetContext(x.GoPointer()) | |
| 634 | 694 | if cret == 0 { | |
| 635 | 695 | return nil | |
| @@ -642,6 +702,8 @@ var xMainLoopIsRunning func(uintptr) bool | |||
| 642 | 702 | // Checks to see if the main loop is currently being run via | |
| 643 | 703 | // [method@GLib.MainLoop.run]. | |
| 644 | 704 | func (x *MainLoop) IsRunning() bool { | |
| 705 | + | core.LazyRegister(&xMainLoopIsRunning, "GLIB", "g_main_loop_is_running", false) | |
| 706 | + | ||
| 645 | 707 | cret := xMainLoopIsRunning(x.GoPointer()) | |
| 646 | 708 | return cret | |
| 647 | 709 | } | |
| @@ -654,6 +716,8 @@ var xMainLoopQuit func(uintptr) | |||
| 654 | 716 | // Note that sources that have already been dispatched when | |
| 655 | 717 | // [method@GLib.MainLoop.quit] is called will still be executed. | |
| 656 | 718 | func (x *MainLoop) Quit() { | |
| 719 | + | core.LazyRegister(&xMainLoopQuit, "GLIB", "g_main_loop_quit", false) | |
| 720 | + | ||
| 657 | 721 | xMainLoopQuit(x.GoPointer()) | |
| 658 | 722 | } | |
| 659 | 723 | ||
| @@ -661,6 +725,8 @@ var xMainLoopRef func(uintptr) uintptr | |||
| 661 | 725 | ||
| 662 | 726 | // Increases the reference count on a [struct@GLib.MainLoop] object by one. | |
| 663 | 727 | func (x *MainLoop) Ref() *MainLoop { | |
| 728 | + | core.LazyRegister(&xMainLoopRef, "GLIB", "g_main_loop_ref", false) | |
| 729 | + | ||
| 664 | 730 | cret := xMainLoopRef(x.GoPointer()) | |
| 665 | 731 | if cret == 0 { | |
| 666 | 732 | return nil | |
| @@ -676,6 +742,8 @@ var xMainLoopRun func(uintptr) | |||
| 676 | 742 | // it will process events from the loop, otherwise it will | |
| 677 | 743 | // simply wait. | |
| 678 | 744 | func (x *MainLoop) Run() { | |
| 745 | + | core.LazyRegister(&xMainLoopRun, "GLIB", "g_main_loop_run", false) | |
| 746 | + | ||
| 679 | 747 | xMainLoopRun(x.GoPointer()) | |
| 680 | 748 | } | |
| 681 | 749 | ||
| @@ -685,6 +753,8 @@ var xMainLoopUnref func(uintptr) | |||
| 685 | 753 | // | |
| 686 | 754 | // If the result is zero, the loop and all associated memory are freed. | |
| 687 | 755 | func (x *MainLoop) Unref() { | |
| 756 | + | core.LazyRegister(&xMainLoopUnref, "GLIB", "g_main_loop_unref", false) | |
| 757 | + | ||
| 688 | 758 | xMainLoopUnref(x.GoPointer()) | |
| 689 | 759 | } | |
| 690 | 760 | ||
| @@ -723,6 +793,7 @@ type Source struct { | |||
| 723 | 793 | var xSourceGLibType func() types.GType | |
| 724 | 794 | ||
| 725 | 795 | func SourceGLibType() types.GType { | |
| 796 | + | core.LazyRegister(&xSourceGLibType, "GLIB", "g_source_get_type", false) | |
| 726 | 797 | return xSourceGLibType() | |
| 727 | 798 | } | |
| 728 | 799 | ||
| @@ -751,6 +822,8 @@ var xNewSource func(*SourceFuncs, uint) uintptr | |||
| 751 | 822 | // and must be added to one with [method@GLib.Source.attach] before it will be | |
| 752 | 823 | // executed. | |
| 753 | 824 | func NewSource(SourceFuncsVar *SourceFuncs, StructSizeVar uint) *Source { | |
| 825 | + | core.LazyRegister(&xNewSource, "GLIB", "g_source_new", false) | |
| 826 | + | ||
| 754 | 827 | cret := xNewSource(SourceFuncsVar, StructSizeVar) | |
| 755 | 828 | if cret == 0 { | |
| 756 | 829 | return nil | |
| @@ -780,6 +853,8 @@ var xSourceAddChildSource func(uintptr, *Source) | |||
| 780 | 853 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | |
| 781 | 854 | // Do not call this API on a [struct@GLib.Source] that you did not create. | |
| 782 | 855 | func (x *Source) AddChildSource(ChildSourceVar *Source) { | |
| 856 | + | core.LazyRegister(&xSourceAddChildSource, "GLIB", "g_source_add_child_source", false) | |
| 857 | + | ||
| 783 | 858 | xSourceAddChildSource(x.GoPointer(), ChildSourceVar) | |
| 784 | 859 | } | |
| 785 | 860 | ||
| @@ -800,6 +875,8 @@ var xSourceAddPoll func(uintptr, *PollFD) | |||
| 800 | 875 | // main loop iteration. Newly-written event sources should try to use | |
| 801 | 876 | // `g_source_add_unix_fd()` instead of this API. | |
| 802 | 877 | func (x *Source) AddPoll(FdVar *PollFD) { | |
| 878 | + | core.LazyRegister(&xSourceAddPoll, "GLIB", "g_source_add_poll", false) | |
| 879 | + | ||
| 803 | 880 | xSourceAddPoll(x.GoPointer(), FdVar) | |
| 804 | 881 | } | |
| 805 | 882 | ||
| @@ -819,6 +896,8 @@ var xSourceAddUnixFd func(uintptr, int, IOCondition) uintptr | |||
| 819 | 896 | // | |
| 820 | 897 | // As the name suggests, this function is not available on Windows. | |
| 821 | 898 | func (x *Source) AddUnixFd(FdVar int, EventsVar IOCondition) uintptr { | |
| 899 | + | core.LazyRegister(&xSourceAddUnixFd, "GLIB", "g_source_add_unix_fd", false) | |
| 900 | + | ||
| 822 | 901 | cret := xSourceAddUnixFd(x.GoPointer(), FdVar, EventsVar) | |
| 823 | 902 | return cret | |
| 824 | 903 | } | |
| @@ -833,6 +912,8 @@ var xSourceAttach func(uintptr, *MainContext) uint | |||
| 833 | 912 | // This function is safe to call from any thread, regardless of which thread | |
| 834 | 913 | // the @context is running in. | |
| 835 | 914 | func (x *Source) Attach(ContextVar *MainContext) uint { | |
| 915 | + | core.LazyRegister(&xSourceAttach, "GLIB", "g_source_attach", false) | |
| 916 | + | ||
| 836 | 917 | cret := xSourceAttach(x.GoPointer(), ContextVar) | |
| 837 | 918 | return cret | |
| 838 | 919 | } | |
| @@ -857,6 +938,8 @@ var xSourceDestroy func(uintptr) | |||
| 857 | 938 | // [method@GLib.Source.set_callback]. This can mean, that the data’s | |
| 858 | 939 | // [callback@GLib.DestroyNotify] gets called right away. | |
| 859 | 940 | func (x *Source) Destroy() { | |
| 941 | + | core.LazyRegister(&xSourceDestroy, "GLIB", "g_source_destroy", false) | |
| 942 | + | ||
| 860 | 943 | xSourceDestroy(x.GoPointer()) | |
| 861 | 944 | } | |
| 862 | 945 | ||
| @@ -869,6 +952,8 @@ var xSourceDupContext func(uintptr) uintptr | |||
| 869 | 952 | // always call this function on the source returned from | |
| 870 | 953 | // [func@GLib.main_current_source]. | |
| 871 | 954 | func (x *Source) DupContext() *MainContext { | |
| 955 | + | core.LazyRegister(&xSourceDupContext, "GLIB", "g_source_dup_context", false) | |
| 956 | + | ||
| 872 | 957 | cret := xSourceDupContext(x.GoPointer()) | |
| 873 | 958 | if cret == 0 { | |
| 874 | 959 | return nil | |
| @@ -882,6 +967,8 @@ var xSourceGetCanRecurse func(uintptr) bool | |||
| 882 | 967 | // | |
| 883 | 968 | // See [method@GLib.Source.set_can_recurse]. | |
| 884 | 969 | func (x *Source) GetCanRecurse() bool { | |
| 970 | + | core.LazyRegister(&xSourceGetCanRecurse, "GLIB", "g_source_get_can_recurse", false) | |
| 971 | + | ||
| 885 | 972 | cret := xSourceGetCanRecurse(x.GoPointer()) | |
| 886 | 973 | return cret | |
| 887 | 974 | } | |
| @@ -901,6 +988,8 @@ var xSourceGetContext func(uintptr) uintptr | |||
| 901 | 988 | // a different thread, then this function is not safe to call and | |
| 902 | 989 | // [method@GLib.Source.dup_context] should be used instead. | |
| 903 | 990 | func (x *Source) GetContext() *MainContext { | |
| 991 | + | core.LazyRegister(&xSourceGetContext, "GLIB", "g_source_get_context", false) | |
| 992 | + | ||
| 904 | 993 | cret := xSourceGetContext(x.GoPointer()) | |
| 905 | 994 | if cret == 0 { | |
| 906 | 995 | return nil | |
| @@ -913,6 +1002,8 @@ var xSourceGetCurrentTime func(uintptr, *TimeVal) | |||
| 913 | 1002 | // This function ignores @source and is otherwise the same as | |
| 914 | 1003 | // [func@GLib.get_current_time]. | |
| 915 | 1004 | func (x *Source) GetCurrentTime(TimevalVar *TimeVal) { | |
| 1005 | + | core.LazyRegister(&xSourceGetCurrentTime, "GLIB", "g_source_get_current_time", false) | |
| 1006 | + | ||
| 916 | 1007 | xSourceGetCurrentTime(x.GoPointer(), TimevalVar) | |
| 917 | 1008 | } | |
| 918 | 1009 | ||
| @@ -931,6 +1022,8 @@ var xSourceGetId func(uintptr) uint | |||
| 931 | 1022 | // undefined behavior. The ID returned is unique within the | |
| 932 | 1023 | // [struct@GLib.MainContext] instance passed to [method@GLib.Source.attach]. | |
| 933 | 1024 | func (x *Source) GetId() uint { | |
| 1025 | + | core.LazyRegister(&xSourceGetId, "GLIB", "g_source_get_id", false) | |
| 1026 | + | ||
| 934 | 1027 | cret := xSourceGetId(x.GoPointer()) | |
| 935 | 1028 | return cret | |
| 936 | 1029 | } | |
| @@ -942,6 +1035,8 @@ var xSourceGetName func(uintptr) string | |||
| 942 | 1035 | // The | |
| 943 | 1036 | // name may be `NULL` if it has never been set with [method@GLib.Source.set_name]. | |
| 944 | 1037 | func (x *Source) GetName() string { | |
| 1038 | + | core.LazyRegister(&xSourceGetName, "GLIB", "g_source_get_name", false) | |
| 1039 | + | ||
| 945 | 1040 | cret := xSourceGetName(x.GoPointer()) | |
| 946 | 1041 | return cret | |
| 947 | 1042 | } | |
| @@ -950,6 +1045,8 @@ var xSourceGetPriority func(uintptr) int | |||
| 950 | 1045 | ||
| 951 | 1046 | // Gets the priority of a source. | |
| 952 | 1047 | func (x *Source) GetPriority() int { | |
| 1048 | + | core.LazyRegister(&xSourceGetPriority, "GLIB", "g_source_get_priority", false) | |
| 1049 | + | ||
| 953 | 1050 | cret := xSourceGetPriority(x.GoPointer()) | |
| 954 | 1051 | return cret | |
| 955 | 1052 | } | |
| @@ -962,6 +1059,8 @@ var xSourceGetReadyTime func(uintptr) int64 | |||
| 962 | 1059 | // Any time before or equal to the current monotonic time (including zero) | |
| 963 | 1060 | // is an indication that the source will fire immediately. | |
| 964 | 1061 | func (x *Source) GetReadyTime() int64 { | |
| 1062 | + | core.LazyRegister(&xSourceGetReadyTime, "GLIB", "g_source_get_ready_time", false) | |
| 1063 | + | ||
| 965 | 1064 | cret := xSourceGetReadyTime(x.GoPointer()) | |
| 966 | 1065 | return cret | |
| 967 | 1066 | } | |
| @@ -978,6 +1077,8 @@ var xSourceGetTime func(uintptr) int64 | |||
| 978 | 1077 | // The time here is the system monotonic time, if available, or some | |
| 979 | 1078 | // other reasonable alternative otherwise. See [func@GLib.get_monotonic_time]. | |
| 980 | 1079 | func (x *Source) GetTime() int64 { | |
| 1080 | + | core.LazyRegister(&xSourceGetTime, "GLIB", "g_source_get_time", false) | |
| 1081 | + | ||
| 981 | 1082 | cret := xSourceGetTime(x.GoPointer()) | |
| 982 | 1083 | return cret | |
| 983 | 1084 | } | |
| @@ -1070,6 +1171,8 @@ var xSourceIsDestroyed func(uintptr) bool | |||
| 1070 | 1171 | // returns. However, once a source is destroyed it cannot be un-destroyed, so | |
| 1071 | 1172 | // this function can be used for opportunistic checks from any thread. | |
| 1072 | 1173 | func (x *Source) IsDestroyed() bool { | |
| 1174 | + | core.LazyRegister(&xSourceIsDestroyed, "GLIB", "g_source_is_destroyed", false) | |
| 1175 | + | ||
| 1073 | 1176 | cret := xSourceIsDestroyed(x.GoPointer()) | |
| 1074 | 1177 | return cret | |
| 1075 | 1178 | } | |
| @@ -1088,6 +1191,8 @@ var xSourceModifyUnixFd func(uintptr, uintptr, IOCondition) | |||
| 1088 | 1191 | // | |
| 1089 | 1192 | // As the name suggests, this function is not available on Windows. | |
| 1090 | 1193 | func (x *Source) ModifyUnixFd(TagVar uintptr, NewEventsVar IOCondition) { | |
| 1194 | + | core.LazyRegister(&xSourceModifyUnixFd, "GLIB", "g_source_modify_unix_fd", false) | |
| 1195 | + | ||
| 1091 | 1196 | xSourceModifyUnixFd(x.GoPointer(), TagVar, NewEventsVar) | |
| 1092 | 1197 | } | |
| 1093 | 1198 | ||
| @@ -1104,6 +1209,8 @@ var xSourceQueryUnixFd func(uintptr, uintptr) IOCondition | |||
| 1104 | 1209 | // | |
| 1105 | 1210 | // As the name suggests, this function is not available on Windows. | |
| 1106 | 1211 | func (x *Source) QueryUnixFd(TagVar uintptr) IOCondition { | |
| 1212 | + | core.LazyRegister(&xSourceQueryUnixFd, "GLIB", "g_source_query_unix_fd", false) | |
| 1213 | + | ||
| 1107 | 1214 | cret := xSourceQueryUnixFd(x.GoPointer(), TagVar) | |
| 1108 | 1215 | return cret | |
| 1109 | 1216 | } | |
| @@ -1112,6 +1219,8 @@ var xSourceRef func(uintptr) uintptr | |||
| 1112 | 1219 | ||
| 1113 | 1220 | // Increases the reference count on a source by one. | |
| 1114 | 1221 | func (x *Source) Ref() *Source { | |
| 1222 | + | core.LazyRegister(&xSourceRef, "GLIB", "g_source_ref", false) | |
| 1223 | + | ||
| 1115 | 1224 | cret := xSourceRef(x.GoPointer()) | |
| 1116 | 1225 | if cret == 0 { | |
| 1117 | 1226 | return nil | |
| @@ -1126,6 +1235,8 @@ var xSourceRemoveChildSource func(uintptr, *Source) | |||
| 1126 | 1235 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | |
| 1127 | 1236 | // Do not call this API on a [struct@GLib.Source] that you did not create. | |
| 1128 | 1237 | func (x *Source) RemoveChildSource(ChildSourceVar *Source) { | |
| 1238 | + | core.LazyRegister(&xSourceRemoveChildSource, "GLIB", "g_source_remove_child_source", false) | |
| 1239 | + | ||
| 1129 | 1240 | xSourceRemoveChildSource(x.GoPointer(), ChildSourceVar) | |
| 1130 | 1241 | } | |
| 1131 | 1242 | ||
| @@ -1137,6 +1248,8 @@ var xSourceRemovePoll func(uintptr, *PollFD) | |||
| 1137 | 1248 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | |
| 1138 | 1249 | // Do not call this API on a [struct@GLib.Source] that you did not create. | |
| 1139 | 1250 | func (x *Source) RemovePoll(FdVar *PollFD) { | |
| 1251 | + | core.LazyRegister(&xSourceRemovePoll, "GLIB", "g_source_remove_poll", false) | |
| 1252 | + | ||
| 1140 | 1253 | xSourceRemovePoll(x.GoPointer(), FdVar) | |
| 1141 | 1254 | } | |
| 1142 | 1255 | ||
| @@ -1153,6 +1266,8 @@ var xSourceRemoveUnixFd func(uintptr, uintptr) | |||
| 1153 | 1266 | // | |
| 1154 | 1267 | // As the name suggests, this function is not available on Windows. | |
| 1155 | 1268 | func (x *Source) RemoveUnixFd(TagVar uintptr) { | |
| 1269 | + | core.LazyRegister(&xSourceRemoveUnixFd, "GLIB", "g_source_remove_unix_fd", false) | |
| 1270 | + | ||
| 1156 | 1271 | xSourceRemoveUnixFd(x.GoPointer(), TagVar) | |
| 1157 | 1272 | } | |
| 1158 | 1273 | ||
| @@ -1180,6 +1295,8 @@ var xSourceSetCallback func(uintptr, uintptr, uintptr, uintptr) | |||
| 1180 | 1295 | // Note that [method@GLib.Source.destroy] for a currently attached source has the effect | |
| 1181 | 1296 | // of also unsetting the callback. | |
| 1182 | 1297 | func (x *Source) SetCallback(FuncVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) { | |
| 1298 | + | core.LazyRegister(&xSourceSetCallback, "GLIB", "g_source_set_callback", false) | |
| 1299 | + | ||
| 1183 | 1300 | xSourceSetCallback(x.GoPointer(), NewCallback(FuncVar), DataVar, NewCallbackNullable(NotifyVar)) | |
| 1184 | 1301 | } | |
| 1185 | 1302 | ||
| @@ -1198,6 +1315,8 @@ var xSourceSetCallbackIndirect func(uintptr, uintptr, *SourceCallbackFuncs) | |||
| 1198 | 1315 | // been attached to a context. The changes will take effect for the next time | |
| 1199 | 1316 | // the source is dispatched after this call returns. | |
| 1200 | 1317 | func (x *Source) SetCallbackIndirect(CallbackDataVar uintptr, CallbackFuncsVar *SourceCallbackFuncs) { | |
| 1318 | + | core.LazyRegister(&xSourceSetCallbackIndirect, "GLIB", "g_source_set_callback_indirect", false) | |
| 1319 | + | ||
| 1201 | 1320 | xSourceSetCallbackIndirect(x.GoPointer(), CallbackDataVar, CallbackFuncsVar) | |
| 1202 | 1321 | } | |
| 1203 | 1322 | ||
| @@ -1209,6 +1328,8 @@ var xSourceSetCanRecurse func(uintptr, bool) | |||
| 1209 | 1328 | // source will be processed normally. Otherwise, all processing of this | |
| 1210 | 1329 | // source is blocked until the dispatch function returns. | |
| 1211 | 1330 | func (x *Source) SetCanRecurse(CanRecurseVar bool) { | |
| 1331 | + | core.LazyRegister(&xSourceSetCanRecurse, "GLIB", "g_source_set_can_recurse", false) | |
| 1332 | + | ||
| 1212 | 1333 | xSourceSetCanRecurse(x.GoPointer(), CanRecurseVar) | |
| 1213 | 1334 | } | |
| 1214 | 1335 | ||
| @@ -1235,6 +1356,8 @@ var xSourceSetDisposeFunction func(uintptr, uintptr) | |||
| 1235 | 1356 | // | |
| 1236 | 1357 | // This should only ever be called from [struct@GLib.Source] implementations. | |
| 1237 | 1358 | func (x *Source) SetDisposeFunction(DisposeVar *SourceDisposeFunc) { | |
| 1359 | + | core.LazyRegister(&xSourceSetDisposeFunction, "GLIB", "g_source_set_dispose_function", false) | |
| 1360 | + | ||
| 1238 | 1361 | xSourceSetDisposeFunction(x.GoPointer(), NewCallback(DisposeVar)) | |
| 1239 | 1362 | } | |
| 1240 | 1363 | ||
| @@ -1245,6 +1368,8 @@ var xSourceSetFuncs func(uintptr, *SourceFuncs) | |||
| 1245 | 1368 | // These can be used to override the default implementations for the type | |
| 1246 | 1369 | // of @source. | |
| 1247 | 1370 | func (x *Source) SetFuncs(FuncsVar *SourceFuncs) { | |
| 1371 | + | core.LazyRegister(&xSourceSetFuncs, "GLIB", "g_source_set_funcs", false) | |
| 1372 | + | ||
| 1248 | 1373 | xSourceSetFuncs(x.GoPointer(), FuncsVar) | |
| 1249 | 1374 | } | |
| 1250 | 1375 | ||
| @@ -1271,6 +1396,8 @@ var xSourceSetName func(uintptr, string) | |||
| 1271 | 1396 | // | |
| 1272 | 1397 | // Also see [method@GLib.Source.set_static_name]. | |
| 1273 | 1398 | func (x *Source) SetName(NameVar string) { | |
| 1399 | + | core.LazyRegister(&xSourceSetName, "GLIB", "g_source_set_name", false) | |
| 1400 | + | ||
| 1274 | 1401 | xSourceSetName(x.GoPointer(), NameVar) | |
| 1275 | 1402 | } | |
| 1276 | 1403 | ||
| @@ -1287,6 +1414,8 @@ var xSourceSetPriority func(uintptr, int) | |||
| 1287 | 1414 | // permitted to change the priority of a source once it has been added | |
| 1288 | 1415 | // as a child of another source. | |
| 1289 | 1416 | func (x *Source) SetPriority(PriorityVar int) { | |
| 1417 | + | core.LazyRegister(&xSourceSetPriority, "GLIB", "g_source_set_priority", false) | |
| 1418 | + | ||
| 1290 | 1419 | xSourceSetPriority(x.GoPointer(), PriorityVar) | |
| 1291 | 1420 | } | |
| 1292 | 1421 | ||
| @@ -1317,6 +1446,8 @@ var xSourceSetReadyTime func(uintptr, int64) | |||
| 1317 | 1446 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | |
| 1318 | 1447 | // Do not call this API on a [struct@GLib.Source] that you did not create. | |
| 1319 | 1448 | func (x *Source) SetReadyTime(ReadyTimeVar int64) { | |
| 1449 | + | core.LazyRegister(&xSourceSetReadyTime, "GLIB", "g_source_set_ready_time", false) | |
| 1450 | + | ||
| 1320 | 1451 | xSourceSetReadyTime(x.GoPointer(), ReadyTimeVar) | |
| 1321 | 1452 | } | |
| 1322 | 1453 | ||
| @@ -1326,6 +1457,8 @@ var xSourceSetStaticName func(uintptr, string) | |||
| 1326 | 1457 | // duplicate the @name, and can only be used with | |
| 1327 | 1458 | // string literals. | |
| 1328 | 1459 | func (x *Source) SetStaticName(NameVar string) { | |
| 1460 | + | core.LazyRegister(&xSourceSetStaticName, "GLIB", "g_source_set_static_name", false) | |
| 1461 | + | ||
| 1329 | 1462 | xSourceSetStaticName(x.GoPointer(), NameVar) | |
| 1330 | 1463 | } | |
| 1331 | 1464 | ||
| @@ -1336,6 +1469,8 @@ var xSourceUnref func(uintptr) | |||
| 1336 | 1469 | // If the resulting reference count is zero the source and associated | |
| 1337 | 1470 | // memory will be destroyed. | |
| 1338 | 1471 | func (x *Source) Unref() { | |
| 1472 | + | core.LazyRegister(&xSourceUnref, "GLIB", "g_source_unref", false) | |
| 1473 | + | ||
| 1339 | 1474 | xSourceUnref(x.GoPointer()) | |
| 1340 | 1475 | } | |
| 1341 | 1476 | ||
| @@ -1583,6 +1718,7 @@ var xChildWatchAdd func(Pid, uintptr, uintptr) uint | |||
| 1583 | 1718 | // using [method@GLib.Source.attach]. You can do these steps manually if you | |
| 1584 | 1719 | // need greater control. | |
| 1585 | 1720 | func ChildWatchAdd(PidVar Pid, FunctionVar *ChildWatchFunc, DataVar uintptr) uint { | |
| 1721 | + | core.LazyRegister(&xChildWatchAdd, "GLIB", "g_child_watch_add", false) | |
| 1586 | 1722 | var functionRef uintptr | |
| 1587 | 1723 | if FunctionVar != nil { | |
| 1588 | 1724 | functionRef = childWatchFuncTrampolineCb | |
| @@ -1620,6 +1756,7 @@ var xChildWatchAddFull func(int, Pid, uintptr, uintptr, uintptr) uint | |||
| 1620 | 1756 | // using [method@GLib.Source.attach]. You can do these steps manually if you | |
| 1621 | 1757 | // need greater control. | |
| 1622 | 1758 | func ChildWatchAddFull(PriorityVar int, PidVar Pid, FunctionVar *ChildWatchFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | |
| 1759 | + | core.LazyRegister(&xChildWatchAddFull, "GLIB", "g_child_watch_add_full", false) | |
| 1623 | 1760 | var functionRef uintptr | |
| 1624 | 1761 | if FunctionVar != nil { | |
| 1625 | 1762 | functionRef = childWatchFuncTrampolineCb | |
| @@ -1672,6 +1809,8 @@ var xChildWatchSourceNew func(Pid) uintptr | |||
| 1672 | 1809 | // Calling [`waitpid()`](man:waitpid(2)) for specific processes other than @pid | |
| 1673 | 1810 | // remains a valid thing to do. | |
| 1674 | 1811 | func ChildWatchSourceNew(PidVar Pid) *Source { | |
| 1812 | + | core.LazyRegister(&xChildWatchSourceNew, "GLIB", "g_child_watch_source_new", false) | |
| 1813 | + | ||
| 1675 | 1814 | cret := xChildWatchSourceNew(PidVar) | |
| 1676 | 1815 | if cret == 0 { | |
| 1677 | 1816 | return nil | |
| @@ -1692,6 +1831,8 @@ var xClearHandleId func(uint, uintptr) | |||
| 1692 | 1831 | // A macro is also included that allows this function to be used without | |
| 1693 | 1832 | // pointer casts. | |
| 1694 | 1833 | func ClearHandleId(TagPtrVar uint, ClearFuncVar *ClearHandleFunc) { | |
| 1834 | + | core.LazyRegister(&xClearHandleId, "GLIB", "g_clear_handle_id", false) | |
| 1835 | + | ||
| 1695 | 1836 | xClearHandleId(TagPtrVar, NewCallback(ClearFuncVar)) | |
| 1696 | 1837 | } | |
| 1697 | 1838 | ||
| @@ -1704,6 +1845,8 @@ var xGetCurrentTime func(*TimeVal) | |||
| 1704 | 1845 | // | |
| 1705 | 1846 | // You may find [func@GLib.get_real_time] to be more convenient. | |
| 1706 | 1847 | func GetCurrentTime(ResultVar *TimeVal) { | |
| 1848 | + | core.LazyRegister(&xGetCurrentTime, "GLIB", "g_get_current_time", false) | |
| 1849 | + | ||
| 1707 | 1850 | xGetCurrentTime(ResultVar) | |
| 1708 | 1851 | } | |
| 1709 | 1852 | ||
| @@ -1724,6 +1867,8 @@ var xGetMonotonicTime func() int64 | |||
| 1724 | 1867 | // A more accurate version of this function exists. | |
| 1725 | 1868 | // [func@GLib.get_monotonic_time_ns] returns the time in nanoseconds. | |
| 1726 | 1869 | func GetMonotonicTime() int64 { | |
| 1870 | + | core.LazyRegister(&xGetMonotonicTime, "GLIB", "g_get_monotonic_time", false) | |
| 1871 | + | ||
| 1727 | 1872 | cret := xGetMonotonicTime() | |
| 1728 | 1873 | return cret | |
| 1729 | 1874 | } | |
| @@ -1746,6 +1891,8 @@ var xGetMonotonicTimeNs func() uint64 | |||
| 1746 | 1891 | // [func@GLib.get_monotonic_time] returns the time in microseconds. | |
| 1747 | 1892 | // If you want to support older GLib versions, it is an alternative. | |
| 1748 | 1893 | func GetMonotonicTimeNs() uint64 { | |
| 1894 | + | core.LazyRegister(&xGetMonotonicTimeNs, "GLIB", "g_get_monotonic_time_ns", false) | |
| 1895 | + | ||
| 1749 | 1896 | cret := xGetMonotonicTimeNs() | |
| 1750 | 1897 | return cret | |
| 1751 | 1898 | } | |
| @@ -1761,6 +1908,8 @@ var xGetRealTime func() int64 | |||
| 1761 | 1908 | // wall-clock time. [func@GLib.get_monotonic_time] is probably more useful for | |
| 1762 | 1909 | // measuring intervals. | |
| 1763 | 1910 | func GetRealTime() int64 { | |
| 1911 | + | core.LazyRegister(&xGetRealTime, "GLIB", "g_get_real_time", false) | |
| 1912 | + | ||
| 1764 | 1913 | cret := xGetRealTime() | |
| 1765 | 1914 | return cret | |
| 1766 | 1915 | } | |
| @@ -1784,6 +1933,7 @@ var xIdleAdd func(uintptr, uintptr) uint | |||
| 1784 | 1933 | // thread is running that main context. You can do these steps manually if you | |
| 1785 | 1934 | // need greater control or to use a custom main context. | |
| 1786 | 1935 | func IdleAdd(FunctionVar *SourceFunc, DataVar uintptr) uint { | |
| 1936 | + | core.LazyRegister(&xIdleAdd, "GLIB", "g_idle_add", false) | |
| 1787 | 1937 | var functionRef uintptr | |
| 1788 | 1938 | if FunctionVar != nil { | |
| 1789 | 1939 | functionRef = sourceFuncTrampolineCb | |
| @@ -1810,6 +1960,7 @@ var xIdleAddFull func(int, uintptr, uintptr, uintptr) uint | |||
| 1810 | 1960 | // thread is running that main context. You can do these steps manually if you | |
| 1811 | 1961 | // need greater control or to use a custom main context. | |
| 1812 | 1962 | func IdleAddFull(PriorityVar int, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | |
| 1963 | + | core.LazyRegister(&xIdleAddFull, "GLIB", "g_idle_add_full", false) | |
| 1813 | 1964 | var functionRef uintptr | |
| 1814 | 1965 | if FunctionVar != nil { | |
| 1815 | 1966 | functionRef = sourceFuncTrampolineCb | |
| @@ -1832,6 +1983,7 @@ var xIdleAddOnce func(uintptr, uintptr) uint | |||
| 1832 | 1983 | // | |
| 1833 | 1984 | // This function otherwise behaves like [func@GLib.idle_add]. | |
| 1834 | 1985 | func IdleAddOnce(FunctionVar *SourceOnceFunc, DataVar uintptr) uint { | |
| 1986 | + | core.LazyRegister(&xIdleAddOnce, "GLIB", "g_idle_add_once", false) | |
| 1835 | 1987 | var functionRef uintptr | |
| 1836 | 1988 | if FunctionVar != nil { | |
| 1837 | 1989 | functionRef = sourceOnceFuncTrampolineCb | |
| @@ -1845,6 +1997,7 @@ var xIdleRemoveByData func(uintptr) bool | |||
| 1845 | 1997 | ||
| 1846 | 1998 | // Removes the idle function with the given data. | |
| 1847 | 1999 | func IdleRemoveByData(DataVar uintptr) bool { | |
| 2000 | + | core.LazyRegister(&xIdleRemoveByData, "GLIB", "g_idle_remove_by_data", false) | |
| 1848 | 2001 | trackedSourceID := trackedSourceIDByUserData(DataVar) | |
| 1849 | 2002 | cret := xIdleRemoveByData(DataVar) | |
| 1850 | 2003 | if cret { | |
| @@ -1864,6 +2017,8 @@ var xIdleSourceNew func() uintptr | |||
| 1864 | 2017 | // compared to other sources which have a default priority of | |
| 1865 | 2018 | // [const@GLib.PRIORITY_DEFAULT]. | |
| 1866 | 2019 | func IdleSourceNew() *Source { | |
| 2020 | + | core.LazyRegister(&xIdleSourceNew, "GLIB", "g_idle_source_new", false) | |
| 2021 | + | ||
| 1867 | 2022 | cret := xIdleSourceNew() | |
| 1868 | 2023 | if cret == 0 { | |
| 1869 | 2024 | return nil | |
| @@ -1880,6 +2035,8 @@ var xMainContextDefault func() uintptr | |||
| 1880 | 2035 | // specified, and corresponds to the ‘main’ main loop. See also | |
| 1881 | 2036 | // [func@GLib.MainContext.get_thread_default]. | |
| 1882 | 2037 | func MainContextDefault() *MainContext { | |
| 2038 | + | core.LazyRegister(&xMainContextDefault, "GLIB", "g_main_context_default", false) | |
| 2039 | + | ||
| 1883 | 2040 | cret := xMainContextDefault() | |
| 1884 | 2041 | if cret == 0 { | |
| 1885 | 2042 | return nil | |
| @@ -1902,6 +2059,8 @@ var xMainContextGetThreadDefault func() uintptr | |||
| 1902 | 2059 | // If you need to hold a reference on the context, use | |
| 1903 | 2060 | // [func@GLib.MainContext.ref_thread_default] instead. | |
| 1904 | 2061 | func MainContextGetThreadDefault() *MainContext { | |
| 2062 | + | core.LazyRegister(&xMainContextGetThreadDefault, "GLIB", "g_main_context_get_thread_default", false) | |
| 2063 | + | ||
| 1905 | 2064 | cret := xMainContextGetThreadDefault() | |
| 1906 | 2065 | if cret == 0 { | |
| 1907 | 2066 | return nil | |
| @@ -1922,6 +2081,8 @@ var xMainContextRefThreadDefault func() uintptr | |||
| 1922 | 2081 | // [struct@GLib.MainContext] (with a ref added to it) rather than returning | |
| 1923 | 2082 | // `NULL`. | |
| 1924 | 2083 | func MainContextRefThreadDefault() *MainContext { | |
| 2084 | + | core.LazyRegister(&xMainContextRefThreadDefault, "GLIB", "g_main_context_ref_thread_default", false) | |
| 2085 | + | ||
| 1925 | 2086 | cret := xMainContextRefThreadDefault() | |
| 1926 | 2087 | if cret == 0 { | |
| 1927 | 2088 | return nil | |
| @@ -1933,6 +2094,8 @@ var xMainCurrentSource func() uintptr | |||
| 1933 | 2094 | ||
| 1934 | 2095 | // Returns the currently firing source for this thread. | |
| 1935 | 2096 | func MainCurrentSource() *Source { | |
| 2097 | + | core.LazyRegister(&xMainCurrentSource, "GLIB", "g_main_current_source", false) | |
| 2098 | + | ||
| 1936 | 2099 | cret := xMainCurrentSource() | |
| 1937 | 2100 | if cret == 0 { | |
| 1938 | 2101 | return nil | |
| @@ -2052,6 +2215,8 @@ var xMainDepth func() int | |||
| 2052 | 2215 | // simply return to the main loop and then get called again when | |
| 2053 | 2216 | // there is more work to do. | |
| 2054 | 2217 | func MainDepth() int { | |
| 2218 | + | core.LazyRegister(&xMainDepth, "GLIB", "g_main_depth", false) | |
| 2219 | + | ||
| 2055 | 2220 | cret := xMainDepth() | |
| 2056 | 2221 | return cret | |
| 2057 | 2222 | } | |
| @@ -2081,6 +2246,7 @@ var xSourceRemove func(uint) bool | |||
| 2081 | 2246 | // been reissued, leading to the operation being performed against the | |
| 2082 | 2247 | // wrong source. | |
| 2083 | 2248 | func SourceRemove(TagVar uint) bool { | |
| 2249 | + | core.LazyRegister(&xSourceRemove, "GLIB", "g_source_remove", false) | |
| 2084 | 2250 | cret := xSourceRemove(TagVar) | |
| 2085 | 2251 | if cret { | |
| 2086 | 2252 | removeTrackedSource(TagVar) | |
| @@ -2096,6 +2262,8 @@ var xSourceRemoveByFuncsUserData func(*SourceFuncs, uintptr) bool | |||
| 2096 | 2262 | // If multiple sources exist with the same source functions and user data, only | |
| 2097 | 2263 | // one will be destroyed. | |
| 2098 | 2264 | func SourceRemoveByFuncsUserData(FuncsVar *SourceFuncs, UserDataVar uintptr) bool { | |
| 2265 | + | core.LazyRegister(&xSourceRemoveByFuncsUserData, "GLIB", "g_source_remove_by_funcs_user_data", false) | |
| 2266 | + | ||
| 2099 | 2267 | cret := xSourceRemoveByFuncsUserData(FuncsVar, UserDataVar) | |
| 2100 | 2268 | return cret | |
| 2101 | 2269 | } | |
| @@ -2107,6 +2275,7 @@ var xSourceRemoveByUserData func(uintptr) bool | |||
| 2107 | 2275 | // | |
| 2108 | 2276 | // If multiple sources exist with the same user data, only one will be destroyed. | |
| 2109 | 2277 | func SourceRemoveByUserData(UserDataVar uintptr) bool { | |
| 2278 | + | core.LazyRegister(&xSourceRemoveByUserData, "GLIB", "g_source_remove_by_user_data", false) | |
| 2110 | 2279 | trackedSourceID := trackedSourceIDByUserData(UserDataVar) | |
| 2111 | 2280 | cret := xSourceRemoveByUserData(UserDataVar) | |
| 2112 | 2281 | if cret { | |
| @@ -2134,6 +2303,8 @@ var xSourceSetNameById func(uint, string) | |||
| 2134 | 2303 | // been reissued, leading to the operation being performed against the | |
| 2135 | 2304 | // wrong source. | |
| 2136 | 2305 | func SourceSetNameById(TagVar uint, NameVar string) { | |
| 2306 | + | core.LazyRegister(&xSourceSetNameById, "GLIB", "g_source_set_name_by_id", false) | |
| 2307 | + | ||
| 2137 | 2308 | xSourceSetNameById(TagVar, NameVar) | |
| 2138 | 2309 | } | |
| 2139 | 2310 | ||
| @@ -2173,6 +2344,7 @@ var xTimeoutAdd func(uint, uintptr, uintptr) uint | |||
| 2173 | 2344 | // The interval given is in terms of monotonic time, not wall clock | |
| 2174 | 2345 | // time. See [func@GLib.get_monotonic_time]. | |
| 2175 | 2346 | func TimeoutAdd(IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr) uint { | |
| 2347 | + | core.LazyRegister(&xTimeoutAdd, "GLIB", "g_timeout_add", false) | |
| 2176 | 2348 | var functionRef uintptr | |
| 2177 | 2349 | if FunctionVar != nil { | |
| 2178 | 2350 | functionRef = sourceFuncTrampolineCb | |
| @@ -2213,6 +2385,7 @@ var xTimeoutAddFull func(int, uint, uintptr, uintptr, uintptr) uint | |||
| 2213 | 2385 | // The interval given is in terms of monotonic time, not wall clock time. | |
| 2214 | 2386 | // See [func@GLib.get_monotonic_time]. | |
| 2215 | 2387 | func TimeoutAddFull(PriorityVar int, IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | |
| 2388 | + | core.LazyRegister(&xTimeoutAddFull, "GLIB", "g_timeout_add_full", false) | |
| 2216 | 2389 | var functionRef uintptr | |
| 2217 | 2390 | if FunctionVar != nil { | |
| 2218 | 2391 | functionRef = sourceFuncTrampolineCb | |
| @@ -2232,6 +2405,7 @@ var xTimeoutAddOnce func(uint, uintptr, uintptr) uint | |||
| 2232 | 2405 | // | |
| 2233 | 2406 | // This function otherwise behaves like [func@GLib.timeout_add]. | |
| 2234 | 2407 | func TimeoutAddOnce(IntervalVar uint, FunctionVar *SourceOnceFunc, DataVar uintptr) uint { | |
| 2408 | + | core.LazyRegister(&xTimeoutAddOnce, "GLIB", "g_timeout_add_once", false) | |
| 2235 | 2409 | var functionRef uintptr | |
| 2236 | 2410 | if FunctionVar != nil { | |
| 2237 | 2411 | functionRef = sourceOnceFuncTrampolineCb | |
| @@ -2267,6 +2441,7 @@ var xTimeoutAddSeconds func(uint, uintptr, uintptr) uint | |||
| 2267 | 2441 | // The interval given is in terms of monotonic time, not wall clock | |
| 2268 | 2442 | // time. See [func@GLib.get_monotonic_time]. | |
| 2269 | 2443 | func TimeoutAddSeconds(IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr) uint { | |
| 2444 | + | core.LazyRegister(&xTimeoutAddSeconds, "GLIB", "g_timeout_add_seconds", false) | |
| 2270 | 2445 | var functionRef uintptr | |
| 2271 | 2446 | if FunctionVar != nil { | |
| 2272 | 2447 | functionRef = sourceFuncTrampolineCb | |
| @@ -2319,6 +2494,7 @@ var xTimeoutAddSecondsFull func(int, uint, uintptr, uintptr, uintptr) uint | |||
| 2319 | 2494 | // The interval given is in terms of monotonic time, not wall clock | |
| 2320 | 2495 | // time. See [func@GLib.get_monotonic_time]. | |
| 2321 | 2496 | func TimeoutAddSecondsFull(PriorityVar int, IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | |
| 2497 | + | core.LazyRegister(&xTimeoutAddSecondsFull, "GLIB", "g_timeout_add_seconds_full", false) | |
| 2322 | 2498 | var functionRef uintptr | |
| 2323 | 2499 | if FunctionVar != nil { | |
| 2324 | 2500 | functionRef = sourceFuncTrampolineCb | |
| @@ -2333,6 +2509,7 @@ var xTimeoutAddSecondsOnce func(uint, uintptr, uintptr) uint | |||
| 2333 | 2509 | // This function behaves like [func@GLib.timeout_add_once] but with a range in | |
| 2334 | 2510 | // seconds. | |
| 2335 | 2511 | func TimeoutAddSecondsOnce(IntervalVar uint, FunctionVar *SourceOnceFunc, DataVar uintptr) uint { | |
| 2512 | + | core.LazyRegister(&xTimeoutAddSecondsOnce, "GLIB", "g_timeout_add_seconds_once", false) | |
| 2336 | 2513 | var functionRef uintptr | |
| 2337 | 2514 | if FunctionVar != nil { | |
| 2338 | 2515 | functionRef = sourceOnceFuncTrampolineCb | |
| @@ -2353,6 +2530,8 @@ var xTimeoutSourceNew func(uint) uintptr | |||
| 2353 | 2530 | // The interval given is in terms of monotonic time, not wall clock | |
| 2354 | 2531 | // time. See [func@GLib.get_monotonic_time]. | |
| 2355 | 2532 | func TimeoutSourceNew(IntervalVar uint) *Source { | |
| 2533 | + | core.LazyRegister(&xTimeoutSourceNew, "GLIB", "g_timeout_source_new", false) | |
| 2534 | + | ||
| 2356 | 2535 | cret := xTimeoutSourceNew(IntervalVar) | |
| 2357 | 2536 | if cret == 0 { | |
| 2358 | 2537 | return nil | |
| @@ -2374,6 +2553,8 @@ var xTimeoutSourceNewSeconds func(uint) uintptr | |||
| 2374 | 2553 | // The interval given is in terms of monotonic time, not wall clock time. | |
| 2375 | 2554 | // See [func@GLib.get_monotonic_time]. | |
| 2376 | 2555 | func TimeoutSourceNewSeconds(IntervalVar uint) *Source { | |
| 2556 | + | core.LazyRegister(&xTimeoutSourceNewSeconds, "GLIB", "g_timeout_source_new_seconds", false) | |
| 2557 | + | ||
| 2377 | 2558 | cret := xTimeoutSourceNewSeconds(IntervalVar) | |
| 2378 | 2559 | if cret == 0 { | |
| 2379 | 2560 | return nil | |
| @@ -2384,121 +2565,4 @@ func TimeoutSourceNewSeconds(IntervalVar uint) *Source { | |||
| 2384 | 2565 | func init() { | |
| 2385 | 2566 | core.SetPackageName("GLIB", "glib-2.0") | |
| 2386 | 2567 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | |
| 2387 | - | var libs []uintptr | |
| 2388 | - | for _, libPath := range core.GetPaths("GLIB") { | |
| 2389 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 2390 | - | if err != nil { | |
| 2391 | - | panic(err) | |
| 2392 | - | } | |
| 2393 | - | libs = append(libs, lib) | |
| 2394 | - | } | |
| 2395 | - | ||
| 2396 | - | core.PuregoSafeRegister(&xChildWatchAdd, libs, "g_child_watch_add") | |
| 2397 | - | core.PuregoSafeRegister(&xChildWatchAddFull, libs, "g_child_watch_add_full") | |
| 2398 | - | core.PuregoSafeRegister(&xChildWatchSourceNew, libs, "g_child_watch_source_new") | |
| 2399 | - | core.PuregoSafeRegister(&xClearHandleId, libs, "g_clear_handle_id") | |
| 2400 | - | core.PuregoSafeRegister(&xGetCurrentTime, libs, "g_get_current_time") | |
| 2401 | - | core.PuregoSafeRegister(&xGetMonotonicTime, libs, "g_get_monotonic_time") | |
| 2402 | - | core.PuregoSafeRegister(&xGetMonotonicTimeNs, libs, "g_get_monotonic_time_ns") | |
| 2403 | - | core.PuregoSafeRegister(&xGetRealTime, libs, "g_get_real_time") | |
| 2404 | - | core.PuregoSafeRegister(&xIdleAdd, libs, "g_idle_add") | |
| 2405 | - | core.PuregoSafeRegister(&xIdleAddFull, libs, "g_idle_add_full") | |
| 2406 | - | core.PuregoSafeRegister(&xIdleAddOnce, libs, "g_idle_add_once") | |
| 2407 | - | core.PuregoSafeRegister(&xIdleRemoveByData, libs, "g_idle_remove_by_data") | |
| 2408 | - | core.PuregoSafeRegister(&xIdleSourceNew, libs, "g_idle_source_new") | |
| 2409 | - | core.PuregoSafeRegister(&xMainContextDefault, libs, "g_main_context_default") | |
| 2410 | - | core.PuregoSafeRegister(&xMainContextGetThreadDefault, libs, "g_main_context_get_thread_default") | |
| 2411 | - | core.PuregoSafeRegister(&xMainContextRefThreadDefault, libs, "g_main_context_ref_thread_default") | |
| 2412 | - | core.PuregoSafeRegister(&xMainCurrentSource, libs, "g_main_current_source") | |
| 2413 | - | core.PuregoSafeRegister(&xMainDepth, libs, "g_main_depth") | |
| 2414 | - | core.PuregoSafeRegister(&xSourceRemove, libs, "g_source_remove") | |
| 2415 | - | core.PuregoSafeRegister(&xSourceRemoveByFuncsUserData, libs, "g_source_remove_by_funcs_user_data") | |
| 2416 | - | core.PuregoSafeRegister(&xSourceRemoveByUserData, libs, "g_source_remove_by_user_data") | |
| 2417 | - | core.PuregoSafeRegister(&xSourceSetNameById, libs, "g_source_set_name_by_id") | |
| 2418 | - | core.PuregoSafeRegister(&xTimeoutAdd, libs, "g_timeout_add") | |
| 2419 | - | core.PuregoSafeRegister(&xTimeoutAddFull, libs, "g_timeout_add_full") | |
| 2420 | - | core.PuregoSafeRegister(&xTimeoutAddOnce, libs, "g_timeout_add_once") | |
| 2421 | - | core.PuregoSafeRegister(&xTimeoutAddSeconds, libs, "g_timeout_add_seconds") | |
| 2422 | - | core.PuregoSafeRegister(&xTimeoutAddSecondsFull, libs, "g_timeout_add_seconds_full") | |
| 2423 | - | core.PuregoSafeRegister(&xTimeoutAddSecondsOnce, libs, "g_timeout_add_seconds_once") | |
| 2424 | - | core.PuregoSafeRegister(&xTimeoutSourceNew, libs, "g_timeout_source_new") | |
| 2425 | - | core.PuregoSafeRegister(&xTimeoutSourceNewSeconds, libs, "g_timeout_source_new_seconds") | |
| 2426 | - | ||
| 2427 | - | core.PuregoSafeRegister(&xMainContextGLibType, libs, "g_main_context_get_type") | |
| 2428 | - | ||
| 2429 | - | core.PuregoSafeRegister(&xNewMainContext, libs, "g_main_context_new") | |
| 2430 | - | core.PuregoSafeRegister(&xNewMainContextWithFlags, libs, "g_main_context_new_with_flags") | |
| 2431 | - | ||
| 2432 | - | core.PuregoSafeRegister(&xMainContextAcquire, libs, "g_main_context_acquire") | |
| 2433 | - | core.PuregoSafeRegister(&xMainContextAddPoll, libs, "g_main_context_add_poll") | |
| 2434 | - | core.PuregoSafeRegister(&xMainContextCheck, libs, "g_main_context_check") | |
| 2435 | - | core.PuregoSafeRegister(&xMainContextDispatch, libs, "g_main_context_dispatch") | |
| 2436 | - | core.PuregoSafeRegister(&xMainContextFindSourceByFuncsUserData, libs, "g_main_context_find_source_by_funcs_user_data") | |
| 2437 | - | core.PuregoSafeRegister(&xMainContextFindSourceById, libs, "g_main_context_find_source_by_id") | |
| 2438 | - | core.PuregoSafeRegister(&xMainContextFindSourceByUserData, libs, "g_main_context_find_source_by_user_data") | |
| 2439 | - | core.PuregoSafeRegister(&xMainContextGetPollFunc, libs, "g_main_context_get_poll_func") | |
| 2440 | - | core.PuregoSafeRegister(&xMainContextInvoke, libs, "g_main_context_invoke") | |
| 2441 | - | core.PuregoSafeRegister(&xMainContextInvokeFull, libs, "g_main_context_invoke_full") | |
| 2442 | - | core.PuregoSafeRegister(&xMainContextIsOwner, libs, "g_main_context_is_owner") | |
| 2443 | - | core.PuregoSafeRegister(&xMainContextIteration, libs, "g_main_context_iteration") | |
| 2444 | - | core.PuregoSafeRegister(&xMainContextPending, libs, "g_main_context_pending") | |
| 2445 | - | core.PuregoSafeRegister(&xMainContextPopThreadDefault, libs, "g_main_context_pop_thread_default") | |
| 2446 | - | core.PuregoSafeRegister(&xMainContextPrepare, libs, "g_main_context_prepare") | |
| 2447 | - | core.PuregoSafeRegister(&xMainContextPushThreadDefault, libs, "g_main_context_push_thread_default") | |
| 2448 | - | core.PuregoSafeRegister(&xMainContextPusherNew, libs, "g_main_context_pusher_new") | |
| 2449 | - | core.PuregoSafeRegister(&xMainContextQuery, libs, "g_main_context_query") | |
| 2450 | - | core.PuregoSafeRegister(&xMainContextRef, libs, "g_main_context_ref") | |
| 2451 | - | core.PuregoSafeRegister(&xMainContextRelease, libs, "g_main_context_release") | |
| 2452 | - | core.PuregoSafeRegister(&xMainContextRemovePoll, libs, "g_main_context_remove_poll") | |
| 2453 | - | core.PuregoSafeRegister(&xMainContextSetPollFunc, libs, "g_main_context_set_poll_func") | |
| 2454 | - | core.PuregoSafeRegister(&xMainContextUnref, libs, "g_main_context_unref") | |
| 2455 | - | core.PuregoSafeRegister(&xMainContextWait, libs, "g_main_context_wait") | |
| 2456 | - | core.PuregoSafeRegister(&xMainContextWakeup, libs, "g_main_context_wakeup") | |
| 2457 | - | ||
| 2458 | - | core.PuregoSafeRegister(&xMainLoopGLibType, libs, "g_main_loop_get_type") | |
| 2459 | - | ||
| 2460 | - | core.PuregoSafeRegister(&xNewMainLoop, libs, "g_main_loop_new") | |
| 2461 | - | ||
| 2462 | - | core.PuregoSafeRegister(&xMainLoopGetContext, libs, "g_main_loop_get_context") | |
| 2463 | - | core.PuregoSafeRegister(&xMainLoopIsRunning, libs, "g_main_loop_is_running") | |
| 2464 | - | core.PuregoSafeRegister(&xMainLoopQuit, libs, "g_main_loop_quit") | |
| 2465 | - | core.PuregoSafeRegister(&xMainLoopRef, libs, "g_main_loop_ref") | |
| 2466 | - | core.PuregoSafeRegister(&xMainLoopRun, libs, "g_main_loop_run") | |
| 2467 | - | core.PuregoSafeRegister(&xMainLoopUnref, libs, "g_main_loop_unref") | |
| 2468 | - | ||
| 2469 | - | core.PuregoSafeRegister(&xSourceGLibType, libs, "g_source_get_type") | |
| 2470 | - | ||
| 2471 | - | core.PuregoSafeRegister(&xNewSource, libs, "g_source_new") | |
| 2472 | - | ||
| 2473 | - | core.PuregoSafeRegister(&xSourceAddChildSource, libs, "g_source_add_child_source") | |
| 2474 | - | core.PuregoSafeRegister(&xSourceAddPoll, libs, "g_source_add_poll") | |
| 2475 | - | core.PuregoSafeRegister(&xSourceAddUnixFd, libs, "g_source_add_unix_fd") | |
| 2476 | - | core.PuregoSafeRegister(&xSourceAttach, libs, "g_source_attach") | |
| 2477 | - | core.PuregoSafeRegister(&xSourceDestroy, libs, "g_source_destroy") | |
| 2478 | - | core.PuregoSafeRegister(&xSourceDupContext, libs, "g_source_dup_context") | |
| 2479 | - | core.PuregoSafeRegister(&xSourceGetCanRecurse, libs, "g_source_get_can_recurse") | |
| 2480 | - | core.PuregoSafeRegister(&xSourceGetContext, libs, "g_source_get_context") | |
| 2481 | - | core.PuregoSafeRegister(&xSourceGetCurrentTime, libs, "g_source_get_current_time") | |
| 2482 | - | core.PuregoSafeRegister(&xSourceGetId, libs, "g_source_get_id") | |
| 2483 | - | core.PuregoSafeRegister(&xSourceGetName, libs, "g_source_get_name") | |
| 2484 | - | core.PuregoSafeRegister(&xSourceGetPriority, libs, "g_source_get_priority") | |
| 2485 | - | core.PuregoSafeRegister(&xSourceGetReadyTime, libs, "g_source_get_ready_time") | |
| 2486 | - | core.PuregoSafeRegister(&xSourceGetTime, libs, "g_source_get_time") | |
| 2487 | - | core.PuregoSafeRegister(&xSourceIsDestroyed, libs, "g_source_is_destroyed") | |
| 2488 | - | core.PuregoSafeRegister(&xSourceModifyUnixFd, libs, "g_source_modify_unix_fd") | |
| 2489 | - | core.PuregoSafeRegister(&xSourceQueryUnixFd, libs, "g_source_query_unix_fd") | |
| 2490 | - | core.PuregoSafeRegister(&xSourceRef, libs, "g_source_ref") | |
| 2491 | - | core.PuregoSafeRegister(&xSourceRemoveChildSource, libs, "g_source_remove_child_source") | |
| 2492 | - | core.PuregoSafeRegister(&xSourceRemovePoll, libs, "g_source_remove_poll") | |
| 2493 | - | core.PuregoSafeRegister(&xSourceRemoveUnixFd, libs, "g_source_remove_unix_fd") | |
| 2494 | - | core.PuregoSafeRegister(&xSourceSetCallback, libs, "g_source_set_callback") | |
| 2495 | - | core.PuregoSafeRegister(&xSourceSetCallbackIndirect, libs, "g_source_set_callback_indirect") | |
| 2496 | - | core.PuregoSafeRegister(&xSourceSetCanRecurse, libs, "g_source_set_can_recurse") | |
| 2497 | - | core.PuregoSafeRegister(&xSourceSetDisposeFunction, libs, "g_source_set_dispose_function") | |
| 2498 | - | core.PuregoSafeRegister(&xSourceSetFuncs, libs, "g_source_set_funcs") | |
| 2499 | - | core.PuregoSafeRegister(&xSourceSetName, libs, "g_source_set_name") | |
| 2500 | - | core.PuregoSafeRegister(&xSourceSetPriority, libs, "g_source_set_priority") | |
| 2501 | - | core.PuregoSafeRegister(&xSourceSetReadyTime, libs, "g_source_set_ready_time") | |
| 2502 | - | core.PuregoSafeRegister(&xSourceSetStaticName, libs, "g_source_set_static_name") | |
| 2503 | - | core.PuregoSafeRegister(&xSourceUnref, libs, "g_source_unref") | |
| 2504 | 2568 | } | |
| @@ -105,6 +105,7 @@ type MainContext struct { | |||||
| 105 | var xMainContextGLibType func() types.GType | 105 | var xMainContextGLibType func() types.GType | ||
| 106 | 106 | ||||
| 107 | func MainContextGLibType() types.GType { | 107 | func MainContextGLibType() types.GType { | ||
| 108 | + | core.LazyRegister(&xMainContextGLibType, "GLIB", "g_main_context_get_type", false) | |||
| 108 | return xMainContextGLibType() | 109 | return xMainContextGLibType() | ||
| 109 | } | 110 | } | ||
| 110 | 111 | ||||
| @@ -124,6 +125,8 @@ var xNewMainContext func() uintptr | |||||
| 124 | 125 | ||||
| 125 | // Creates a new [struct@GLib.MainContext] structure. | 126 | // Creates a new [struct@GLib.MainContext] structure. | ||
| 126 | func NewMainContext() *MainContext { | 127 | func NewMainContext() *MainContext { | ||
| 128 | + | core.LazyRegister(&xNewMainContext, "GLIB", "g_main_context_new", false) | |||
| 129 | + | ||||
| 127 | cret := xNewMainContext() | 130 | cret := xNewMainContext() | ||
| 128 | if cret == 0 { | 131 | if cret == 0 { | ||
| 129 | return nil | 132 | return nil | ||
| @@ -135,6 +138,8 @@ var xNewMainContextWithFlags func(MainContextFlags) uintptr | |||||
| 135 | 138 | ||||
| 136 | // Creates a new [struct@GLib.MainContext] structure. | 139 | // Creates a new [struct@GLib.MainContext] structure. | ||
| 137 | func NewMainContextWithFlags(FlagsVar MainContextFlags) *MainContext { | 140 | func NewMainContextWithFlags(FlagsVar MainContextFlags) *MainContext { | ||
| 141 | + | core.LazyRegister(&xNewMainContextWithFlags, "GLIB", "g_main_context_new_with_flags", false) | |||
| 142 | + | ||||
| 138 | cret := xNewMainContextWithFlags(FlagsVar) | 143 | cret := xNewMainContextWithFlags(FlagsVar) | ||
| 139 | if cret == 0 { | 144 | if cret == 0 { | ||
| 140 | return nil | 145 | return nil | ||
| @@ -160,6 +165,8 @@ var xMainContextAcquire func(uintptr) bool | |||||
| 160 | // Since 2.76 @context can be `NULL` to use the global-default | 165 | // Since 2.76 @context can be `NULL` to use the global-default | ||
| 161 | // main context. | 166 | // main context. | ||
| 162 | func (x *MainContext) Acquire() bool { | 167 | func (x *MainContext) Acquire() bool { | ||
| 168 | + | core.LazyRegister(&xMainContextAcquire, "GLIB", "g_main_context_acquire", false) | |||
| 169 | + | ||||
| 163 | cret := xMainContextAcquire(x.GoPointer()) | 170 | cret := xMainContextAcquire(x.GoPointer()) | ||
| 164 | return cret | 171 | return cret | ||
| 165 | } | 172 | } | ||
| @@ -172,6 +179,8 @@ var xMainContextAddPoll func(uintptr, *PollFD, int) | |||||
| 172 | // This will very seldom be used directly. Instead | 179 | // This will very seldom be used directly. Instead | ||
| 173 | // a typical event source will use `g_source_add_unix_fd()` instead. | 180 | // a typical event source will use `g_source_add_unix_fd()` instead. | ||
| 174 | func (x *MainContext) AddPoll(FdVar *PollFD, PriorityVar int) { | 181 | func (x *MainContext) AddPoll(FdVar *PollFD, PriorityVar int) { | ||
| 182 | + | core.LazyRegister(&xMainContextAddPoll, "GLIB", "g_main_context_add_poll", false) | |||
| 183 | + | ||||
| 175 | xMainContextAddPoll(x.GoPointer(), FdVar, PriorityVar) | 184 | xMainContextAddPoll(x.GoPointer(), FdVar, PriorityVar) | ||
| 176 | } | 185 | } | ||
| 177 | 186 | ||||
| @@ -190,6 +199,8 @@ var xMainContextCheck func(uintptr, int, []PollFD, int) bool | |||||
| 190 | // Since 2.76 @context can be `NULL` to use the global-default | 199 | // Since 2.76 @context can be `NULL` to use the global-default | ||
| 191 | // main context. | 200 | // main context. | ||
| 192 | func (x *MainContext) Check(MaxPriorityVar int, FdsVar []PollFD, NFdsVar int) bool { | 201 | func (x *MainContext) Check(MaxPriorityVar int, FdsVar []PollFD, NFdsVar int) bool { | ||
| 202 | + | core.LazyRegister(&xMainContextCheck, "GLIB", "g_main_context_check", false) | |||
| 203 | + | ||||
| 193 | cret := xMainContextCheck(x.GoPointer(), MaxPriorityVar, FdsVar, NFdsVar) | 204 | cret := xMainContextCheck(x.GoPointer(), MaxPriorityVar, FdsVar, NFdsVar) | ||
| 194 | return cret | 205 | return cret | ||
| 195 | } | 206 | } | ||
| @@ -204,6 +215,8 @@ var xMainContextDispatch func(uintptr) | |||||
| 204 | // Since 2.76 @context can be `NULL` to use the global-default | 215 | // Since 2.76 @context can be `NULL` to use the global-default | ||
| 205 | // main context. | 216 | // main context. | ||
| 206 | func (x *MainContext) Dispatch() { | 217 | func (x *MainContext) Dispatch() { | ||
| 218 | + | core.LazyRegister(&xMainContextDispatch, "GLIB", "g_main_context_dispatch", false) | |||
| 219 | + | ||||
| 207 | xMainContextDispatch(x.GoPointer()) | 220 | xMainContextDispatch(x.GoPointer()) | ||
| 208 | } | 221 | } | ||
| 209 | 222 | ||||
| @@ -214,6 +227,8 @@ var xMainContextFindSourceByFuncsUserData func(uintptr, *SourceFuncs, uintptr) u | |||||
| 214 | // If multiple sources exist with the same source function and user data, | 227 | // If multiple sources exist with the same source function and user data, | ||
| 215 | // the first one found will be returned. | 228 | // the first one found will be returned. | ||
| 216 | func (x *MainContext) FindSourceByFuncsUserData(FuncsVar *SourceFuncs, UserDataVar uintptr) *Source { | 229 | func (x *MainContext) FindSourceByFuncsUserData(FuncsVar *SourceFuncs, UserDataVar uintptr) *Source { | ||
| 230 | + | core.LazyRegister(&xMainContextFindSourceByFuncsUserData, "GLIB", "g_main_context_find_source_by_funcs_user_data", false) | |||
| 231 | + | ||||
| 217 | cret := xMainContextFindSourceByFuncsUserData(x.GoPointer(), FuncsVar, UserDataVar) | 232 | cret := xMainContextFindSourceByFuncsUserData(x.GoPointer(), FuncsVar, UserDataVar) | ||
| 218 | if cret == 0 { | 233 | if cret == 0 { | ||
| 219 | return nil | 234 | return nil | ||
| @@ -236,6 +251,8 @@ var xMainContextFindSourceById func(uintptr, uint) uintptr | |||||
| 236 | // been reissued, leading to the operation being performed against the | 251 | // been reissued, leading to the operation being performed against the | ||
| 237 | // wrong source. | 252 | // wrong source. | ||
| 238 | func (x *MainContext) FindSourceById(SourceIdVar uint) *Source { | 253 | func (x *MainContext) FindSourceById(SourceIdVar uint) *Source { | ||
| 254 | + | core.LazyRegister(&xMainContextFindSourceById, "GLIB", "g_main_context_find_source_by_id", false) | |||
| 255 | + | ||||
| 239 | cret := xMainContextFindSourceById(x.GoPointer(), SourceIdVar) | 256 | cret := xMainContextFindSourceById(x.GoPointer(), SourceIdVar) | ||
| 240 | if cret == 0 { | 257 | if cret == 0 { | ||
| 241 | return nil | 258 | return nil | ||
| @@ -250,6 +267,8 @@ var xMainContextFindSourceByUserData func(uintptr, uintptr) uintptr | |||||
| 250 | // If multiple sources exist with the same user data, the first | 267 | // If multiple sources exist with the same user data, the first | ||
| 251 | // one found will be returned. | 268 | // one found will be returned. | ||
| 252 | func (x *MainContext) FindSourceByUserData(UserDataVar uintptr) *Source { | 269 | func (x *MainContext) FindSourceByUserData(UserDataVar uintptr) *Source { | ||
| 270 | + | core.LazyRegister(&xMainContextFindSourceByUserData, "GLIB", "g_main_context_find_source_by_user_data", false) | |||
| 271 | + | ||||
| 253 | cret := xMainContextFindSourceByUserData(x.GoPointer(), UserDataVar) | 272 | cret := xMainContextFindSourceByUserData(x.GoPointer(), UserDataVar) | ||
| 254 | if cret == 0 { | 273 | if cret == 0 { | ||
| 255 | return nil | 274 | return nil | ||
| @@ -261,6 +280,8 @@ var xMainContextGetPollFunc func(uintptr) uintptr | |||||
| 261 | 280 | ||||
| 262 | // Gets the poll function set by [method@GLib.MainContext.set_poll_func]. | 281 | // Gets the poll function set by [method@GLib.MainContext.set_poll_func]. | ||
| 263 | func (x *MainContext) GetPollFunc() uintptr { | 282 | func (x *MainContext) GetPollFunc() uintptr { | ||
| 283 | + | core.LazyRegister(&xMainContextGetPollFunc, "GLIB", "g_main_context_get_poll_func", false) | |||
| 284 | + | ||||
| 264 | cret := xMainContextGetPollFunc(x.GoPointer()) | 285 | cret := xMainContextGetPollFunc(x.GoPointer()) | ||
| 265 | return cret | 286 | return cret | ||
| 266 | } | 287 | } | ||
| @@ -289,6 +310,8 @@ var xMainContextInvoke func(uintptr, uintptr, uintptr) | |||||
| 289 | // [const@GLib.SOURCE_REMOVE]. If it returns [const@GLib.SOURCE_CONTINUE], it | 310 | // [const@GLib.SOURCE_REMOVE]. If it returns [const@GLib.SOURCE_CONTINUE], it | ||
| 290 | // will be continuously run in a loop (and may prevent this call from returning). | 311 | // will be continuously run in a loop (and may prevent this call from returning). | ||
| 291 | func (x *MainContext) Invoke(FunctionVar *SourceFunc, DataVar uintptr) { | 312 | func (x *MainContext) Invoke(FunctionVar *SourceFunc, DataVar uintptr) { | ||
| 313 | + | core.LazyRegister(&xMainContextInvoke, "GLIB", "g_main_context_invoke", false) | |||
| 314 | + | ||||
| 292 | xMainContextInvoke(x.GoPointer(), NewCallback(FunctionVar), DataVar) | 315 | xMainContextInvoke(x.GoPointer(), NewCallback(FunctionVar), DataVar) | ||
| 293 | } | 316 | } | ||
| 294 | 317 | ||||
| @@ -305,6 +328,8 @@ var xMainContextInvokeFull func(uintptr, int, uintptr, uintptr, uintptr) | |||||
| 305 | // The @notify function should not assume that it is called from any particular | 328 | // The @notify function should not assume that it is called from any particular | ||
| 306 | // thread or with any particular context acquired. | 329 | // thread or with any particular context acquired. | ||
| 307 | func (x *MainContext) InvokeFull(PriorityVar int, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) { | 330 | func (x *MainContext) InvokeFull(PriorityVar int, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) { | ||
| 331 | + | core.LazyRegister(&xMainContextInvokeFull, "GLIB", "g_main_context_invoke_full", false) | |||
| 332 | + | ||||
| 308 | xMainContextInvokeFull(x.GoPointer(), PriorityVar, NewCallback(FunctionVar), DataVar, NewCallbackNullable(NotifyVar)) | 333 | xMainContextInvokeFull(x.GoPointer(), PriorityVar, NewCallback(FunctionVar), DataVar, NewCallbackNullable(NotifyVar)) | ||
| 309 | } | 334 | } | ||
| 310 | 335 | ||||
| @@ -317,6 +342,8 @@ var xMainContextIsOwner func(uintptr) bool | |||||
| 317 | // know before waiting on another thread that may be | 342 | // know before waiting on another thread that may be | ||
| 318 | // blocking to get ownership of @context. | 343 | // blocking to get ownership of @context. | ||
| 319 | func (x *MainContext) IsOwner() bool { | 344 | func (x *MainContext) IsOwner() bool { | ||
| 345 | + | core.LazyRegister(&xMainContextIsOwner, "GLIB", "g_main_context_is_owner", false) | |||
| 346 | + | ||||
| 320 | cret := xMainContextIsOwner(x.GoPointer()) | 347 | cret := xMainContextIsOwner(x.GoPointer()) | ||
| 321 | return cret | 348 | return cret | ||
| 322 | } | 349 | } | ||
| @@ -337,6 +364,8 @@ var xMainContextIteration func(uintptr, bool) bool | |||||
| 337 | // [method@GLib.MainContext.iteration] to return false, since the wait may | 364 | // [method@GLib.MainContext.iteration] to return false, since the wait may | ||
| 338 | // be interrupted for other reasons than an event source becoming ready. | 365 | // be interrupted for other reasons than an event source becoming ready. | ||
| 339 | func (x *MainContext) Iteration(MayBlockVar bool) bool { | 366 | func (x *MainContext) Iteration(MayBlockVar bool) bool { | ||
| 367 | + | core.LazyRegister(&xMainContextIteration, "GLIB", "g_main_context_iteration", false) | |||
| 368 | + | ||||
| 340 | cret := xMainContextIteration(x.GoPointer(), MayBlockVar) | 369 | cret := xMainContextIteration(x.GoPointer(), MayBlockVar) | ||
| 341 | return cret | 370 | return cret | ||
| 342 | } | 371 | } | ||
| @@ -345,6 +374,8 @@ var xMainContextPending func(uintptr) bool | |||||
| 345 | 374 | ||||
| 346 | // Checks if any sources have pending events for the given context. | 375 | // Checks if any sources have pending events for the given context. | ||
| 347 | func (x *MainContext) Pending() bool { | 376 | func (x *MainContext) Pending() bool { | ||
| 377 | + | core.LazyRegister(&xMainContextPending, "GLIB", "g_main_context_pending", false) | |||
| 378 | + | ||||
| 348 | cret := xMainContextPending(x.GoPointer()) | 379 | cret := xMainContextPending(x.GoPointer()) | ||
| 349 | return cret | 380 | return cret | ||
| 350 | } | 381 | } | ||
| @@ -354,6 +385,8 @@ var xMainContextPopThreadDefault func(uintptr) | |||||
| 354 | // Pops @context off the thread-default context stack (verifying that | 385 | // Pops @context off the thread-default context stack (verifying that | ||
| 355 | // it was on the top of the stack). | 386 | // it was on the top of the stack). | ||
| 356 | func (x *MainContext) PopThreadDefault() { | 387 | func (x *MainContext) PopThreadDefault() { | ||
| 388 | + | core.LazyRegister(&xMainContextPopThreadDefault, "GLIB", "g_main_context_pop_thread_default", false) | |||
| 389 | + | ||||
| 357 | xMainContextPopThreadDefault(x.GoPointer()) | 390 | xMainContextPopThreadDefault(x.GoPointer()) | ||
| 358 | } | 391 | } | ||
| 359 | 392 | ||||
| @@ -367,6 +400,8 @@ var xMainContextPrepare func(uintptr, *int) bool | |||||
| 367 | // You must have successfully acquired the context with | 400 | // You must have successfully acquired the context with | ||
| 368 | // [method@GLib.MainContext.acquire] before you may call this function. | 401 | // [method@GLib.MainContext.acquire] before you may call this function. | ||
| 369 | func (x *MainContext) Prepare(PriorityVar *int) bool { | 402 | func (x *MainContext) Prepare(PriorityVar *int) bool { | ||
| 403 | + | core.LazyRegister(&xMainContextPrepare, "GLIB", "g_main_context_prepare", false) | |||
| 404 | + | ||||
| 370 | cret := xMainContextPrepare(x.GoPointer(), PriorityVar) | 405 | cret := xMainContextPrepare(x.GoPointer(), PriorityVar) | ||
| 371 | return cret | 406 | return cret | ||
| 372 | } | 407 | } | ||
| @@ -413,6 +448,8 @@ var xMainContextPushThreadDefault func(uintptr) | |||||
| 413 | // handle being used from a thread with a thread-default context. For example, | 448 | // handle being used from a thread with a thread-default context. For example, | ||
| 414 | // see `g_file_supports_thread_contexts()`. | 449 | // see `g_file_supports_thread_contexts()`. | ||
| 415 | func (x *MainContext) PushThreadDefault() { | 450 | func (x *MainContext) PushThreadDefault() { | ||
| 451 | + | core.LazyRegister(&xMainContextPushThreadDefault, "GLIB", "g_main_context_push_thread_default", false) | |||
| 452 | + | ||||
| 416 | xMainContextPushThreadDefault(x.GoPointer()) | 453 | xMainContextPushThreadDefault(x.GoPointer()) | ||
| 417 | } | 454 | } | ||
| 418 | 455 | ||||
| @@ -459,6 +496,8 @@ var xMainContextPusherNew func(uintptr) *MainContextPusher | |||||
| 459 | // | 496 | // | ||
| 460 | // ]| | 497 | // ]| | ||
| 461 | func (x *MainContext) PusherNew() *MainContextPusher { | 498 | func (x *MainContext) PusherNew() *MainContextPusher { | ||
| 499 | + | core.LazyRegister(&xMainContextPusherNew, "GLIB", "g_main_context_pusher_new", false) | |||
| 500 | + | ||||
| 462 | cret := xMainContextPusherNew(x.GoPointer()) | 501 | cret := xMainContextPusherNew(x.GoPointer()) | ||
| 463 | return cret | 502 | return cret | ||
| 464 | } | 503 | } | ||
| @@ -475,6 +514,8 @@ var xMainContextQuery func(uintptr, int, *int, *[]PollFD, int) int | |||||
| 475 | // You must have successfully acquired the context with | 514 | // You must have successfully acquired the context with | ||
| 476 | // [method@GLib.MainContext.acquire] before you may call this function. | 515 | // [method@GLib.MainContext.acquire] before you may call this function. | ||
| 477 | func (x *MainContext) Query(MaxPriorityVar int, TimeoutVar *int, FdsVar *[]PollFD, NFdsVar int) int { | 516 | func (x *MainContext) Query(MaxPriorityVar int, TimeoutVar *int, FdsVar *[]PollFD, NFdsVar int) int { | ||
| 517 | + | core.LazyRegister(&xMainContextQuery, "GLIB", "g_main_context_query", false) | |||
| 518 | + | ||||
| 478 | cret := xMainContextQuery(x.GoPointer(), MaxPriorityVar, TimeoutVar, FdsVar, NFdsVar) | 519 | cret := xMainContextQuery(x.GoPointer(), MaxPriorityVar, TimeoutVar, FdsVar, NFdsVar) | ||
| 479 | return cret | 520 | return cret | ||
| 480 | } | 521 | } | ||
| @@ -483,6 +524,8 @@ var xMainContextRef func(uintptr) uintptr | |||||
| 483 | 524 | ||||
| 484 | // Increases the reference count on a [struct@GLib.MainContext] object by one. | 525 | // Increases the reference count on a [struct@GLib.MainContext] object by one. | ||
| 485 | func (x *MainContext) Ref() *MainContext { | 526 | func (x *MainContext) Ref() *MainContext { | ||
| 527 | + | core.LazyRegister(&xMainContextRef, "GLIB", "g_main_context_ref", false) | |||
| 528 | + | ||||
| 486 | cret := xMainContextRef(x.GoPointer()) | 529 | cret := xMainContextRef(x.GoPointer()) | ||
| 487 | if cret == 0 { | 530 | if cret == 0 { | ||
| 488 | return nil | 531 | return nil | ||
| @@ -502,6 +545,8 @@ var xMainContextRelease func(uintptr) | |||||
| 502 | // You must have successfully acquired the context with | 545 | // You must have successfully acquired the context with | ||
| 503 | // [method@GLib.MainContext.acquire] before you may call this function. | 546 | // [method@GLib.MainContext.acquire] before you may call this function. | ||
| 504 | func (x *MainContext) Release() { | 547 | func (x *MainContext) Release() { | ||
| 548 | + | core.LazyRegister(&xMainContextRelease, "GLIB", "g_main_context_release", false) | |||
| 549 | + | ||||
| 505 | xMainContextRelease(x.GoPointer()) | 550 | xMainContextRelease(x.GoPointer()) | ||
| 506 | } | 551 | } | ||
| 507 | 552 | ||||
| @@ -510,6 +555,8 @@ var xMainContextRemovePoll func(uintptr, *PollFD) | |||||
| 510 | // Removes file descriptor from the set of file descriptors to be | 555 | // Removes file descriptor from the set of file descriptors to be | ||
| 511 | // polled for a particular context. | 556 | // polled for a particular context. | ||
| 512 | func (x *MainContext) RemovePoll(FdVar *PollFD) { | 557 | func (x *MainContext) RemovePoll(FdVar *PollFD) { | ||
| 558 | + | core.LazyRegister(&xMainContextRemovePoll, "GLIB", "g_main_context_remove_poll", false) | |||
| 559 | + | ||||
| 513 | xMainContextRemovePoll(x.GoPointer(), FdVar) | 560 | xMainContextRemovePoll(x.GoPointer(), FdVar) | ||
| 514 | } | 561 | } | ||
| 515 | 562 | ||||
| @@ -524,6 +571,8 @@ var xMainContextSetPollFunc func(uintptr, uintptr) | |||||
| 524 | // This function could possibly be used to integrate the GLib event | 571 | // This function could possibly be used to integrate the GLib event | ||
| 525 | // loop with an external event loop. | 572 | // loop with an external event loop. | ||
| 526 | func (x *MainContext) SetPollFunc(FuncVar *PollFunc) { | 573 | func (x *MainContext) SetPollFunc(FuncVar *PollFunc) { | ||
| 574 | + | core.LazyRegister(&xMainContextSetPollFunc, "GLIB", "g_main_context_set_poll_func", false) | |||
| 575 | + | ||||
| 527 | xMainContextSetPollFunc(x.GoPointer(), NewCallback(FuncVar)) | 576 | xMainContextSetPollFunc(x.GoPointer(), NewCallback(FuncVar)) | ||
| 528 | } | 577 | } | ||
| 529 | 578 | ||||
| @@ -533,6 +582,8 @@ var xMainContextUnref func(uintptr) | |||||
| 533 | // If | 582 | // If | ||
| 534 | // the result is zero, free the context and free all associated memory. | 583 | // the result is zero, free the context and free all associated memory. | ||
| 535 | func (x *MainContext) Unref() { | 584 | func (x *MainContext) Unref() { | ||
| 585 | + | core.LazyRegister(&xMainContextUnref, "GLIB", "g_main_context_unref", false) | |||
| 586 | + | ||||
| 536 | xMainContextUnref(x.GoPointer()) | 587 | xMainContextUnref(x.GoPointer()) | ||
| 537 | } | 588 | } | ||
| 538 | 589 | ||||
| @@ -546,6 +597,8 @@ var xMainContextWait func(uintptr, *Cond, *Mutex) bool | |||||
| 546 | // that owner releases ownership or until @cond is signaled, then | 597 | // that owner releases ownership or until @cond is signaled, then | ||
| 547 | // try again (once) to become the owner. | 598 | // try again (once) to become the owner. | ||
| 548 | func (x *MainContext) Wait(CondVar *Cond, MutexVar *Mutex) bool { | 599 | func (x *MainContext) Wait(CondVar *Cond, MutexVar *Mutex) bool { | ||
| 600 | + | core.LazyRegister(&xMainContextWait, "GLIB", "g_main_context_wait", false) | |||
| 601 | + | ||||
| 549 | cret := xMainContextWait(x.GoPointer(), CondVar, MutexVar) | 602 | cret := xMainContextWait(x.GoPointer(), CondVar, MutexVar) | ||
| 550 | return cret | 603 | return cret | ||
| 551 | } | 604 | } | ||
| @@ -588,6 +641,8 @@ var xMainContextWakeup func(uintptr) | |||||
| 588 | // | 641 | // | ||
| 589 | // ``` | 642 | // ``` | ||
| 590 | func (x *MainContext) Wakeup() { | 643 | func (x *MainContext) Wakeup() { | ||
| 644 | + | core.LazyRegister(&xMainContextWakeup, "GLIB", "g_main_context_wakeup", false) | |||
| 645 | + | ||||
| 591 | xMainContextWakeup(x.GoPointer()) | 646 | xMainContextWakeup(x.GoPointer()) | ||
| 592 | } | 647 | } | ||
| 593 | 648 | ||||
| @@ -600,6 +655,7 @@ type MainLoop struct { | |||||
| 600 | var xMainLoopGLibType func() types.GType | 655 | var xMainLoopGLibType func() types.GType | ||
| 601 | 656 | ||||
| 602 | func MainLoopGLibType() types.GType { | 657 | func MainLoopGLibType() types.GType { | ||
| 658 | + | core.LazyRegister(&xMainLoopGLibType, "GLIB", "g_main_loop_get_type", false) | |||
| 603 | return xMainLoopGLibType() | 659 | return xMainLoopGLibType() | ||
| 604 | } | 660 | } | ||
| 605 | 661 | ||||
| @@ -619,6 +675,8 @@ var xNewMainLoop func(*MainContext, bool) uintptr | |||||
| 619 | 675 | ||||
| 620 | // Creates a new [struct@GLib.MainLoop] structure. | 676 | // Creates a new [struct@GLib.MainLoop] structure. | ||
| 621 | func NewMainLoop(ContextVar *MainContext, IsRunningVar bool) *MainLoop { | 677 | func NewMainLoop(ContextVar *MainContext, IsRunningVar bool) *MainLoop { | ||
| 678 | + | core.LazyRegister(&xNewMainLoop, "GLIB", "g_main_loop_new", false) | |||
| 679 | + | ||||
| 622 | cret := xNewMainLoop(ContextVar, IsRunningVar) | 680 | cret := xNewMainLoop(ContextVar, IsRunningVar) | ||
| 623 | if cret == 0 { | 681 | if cret == 0 { | ||
| 624 | return nil | 682 | return nil | ||
| @@ -630,6 +688,8 @@ var xMainLoopGetContext func(uintptr) uintptr | |||||
| 630 | 688 | ||||
| 631 | // Returns the [struct@GLib.MainContext] of @loop. | 689 | // Returns the [struct@GLib.MainContext] of @loop. | ||
| 632 | func (x *MainLoop) GetContext() *MainContext { | 690 | func (x *MainLoop) GetContext() *MainContext { | ||
| 691 | + | core.LazyRegister(&xMainLoopGetContext, "GLIB", "g_main_loop_get_context", false) | |||
| 692 | + | ||||
| 633 | cret := xMainLoopGetContext(x.GoPointer()) | 693 | cret := xMainLoopGetContext(x.GoPointer()) | ||
| 634 | if cret == 0 { | 694 | if cret == 0 { | ||
| 635 | return nil | 695 | return nil | ||
| @@ -642,6 +702,8 @@ var xMainLoopIsRunning func(uintptr) bool | |||||
| 642 | // Checks to see if the main loop is currently being run via | 702 | // Checks to see if the main loop is currently being run via | ||
| 643 | // [method@GLib.MainLoop.run]. | 703 | // [method@GLib.MainLoop.run]. | ||
| 644 | func (x *MainLoop) IsRunning() bool { | 704 | func (x *MainLoop) IsRunning() bool { | ||
| 705 | + | core.LazyRegister(&xMainLoopIsRunning, "GLIB", "g_main_loop_is_running", false) | |||
| 706 | + | ||||
| 645 | cret := xMainLoopIsRunning(x.GoPointer()) | 707 | cret := xMainLoopIsRunning(x.GoPointer()) | ||
| 646 | return cret | 708 | return cret | ||
| 647 | } | 709 | } | ||
| @@ -654,6 +716,8 @@ var xMainLoopQuit func(uintptr) | |||||
| 654 | // Note that sources that have already been dispatched when | 716 | // Note that sources that have already been dispatched when | ||
| 655 | // [method@GLib.MainLoop.quit] is called will still be executed. | 717 | // [method@GLib.MainLoop.quit] is called will still be executed. | ||
| 656 | func (x *MainLoop) Quit() { | 718 | func (x *MainLoop) Quit() { | ||
| 719 | + | core.LazyRegister(&xMainLoopQuit, "GLIB", "g_main_loop_quit", false) | |||
| 720 | + | ||||
| 657 | xMainLoopQuit(x.GoPointer()) | 721 | xMainLoopQuit(x.GoPointer()) | ||
| 658 | } | 722 | } | ||
| 659 | 723 | ||||
| @@ -661,6 +725,8 @@ var xMainLoopRef func(uintptr) uintptr | |||||
| 661 | 725 | ||||
| 662 | // Increases the reference count on a [struct@GLib.MainLoop] object by one. | 726 | // Increases the reference count on a [struct@GLib.MainLoop] object by one. | ||
| 663 | func (x *MainLoop) Ref() *MainLoop { | 727 | func (x *MainLoop) Ref() *MainLoop { | ||
| 728 | + | core.LazyRegister(&xMainLoopRef, "GLIB", "g_main_loop_ref", false) | |||
| 729 | + | ||||
| 664 | cret := xMainLoopRef(x.GoPointer()) | 730 | cret := xMainLoopRef(x.GoPointer()) | ||
| 665 | if cret == 0 { | 731 | if cret == 0 { | ||
| 666 | return nil | 732 | return nil | ||
| @@ -676,6 +742,8 @@ var xMainLoopRun func(uintptr) | |||||
| 676 | // it will process events from the loop, otherwise it will | 742 | // it will process events from the loop, otherwise it will | ||
| 677 | // simply wait. | 743 | // simply wait. | ||
| 678 | func (x *MainLoop) Run() { | 744 | func (x *MainLoop) Run() { | ||
| 745 | + | core.LazyRegister(&xMainLoopRun, "GLIB", "g_main_loop_run", false) | |||
| 746 | + | ||||
| 679 | xMainLoopRun(x.GoPointer()) | 747 | xMainLoopRun(x.GoPointer()) | ||
| 680 | } | 748 | } | ||
| 681 | 749 | ||||
| @@ -685,6 +753,8 @@ var xMainLoopUnref func(uintptr) | |||||
| 685 | // | 753 | // | ||
| 686 | // If the result is zero, the loop and all associated memory are freed. | 754 | // If the result is zero, the loop and all associated memory are freed. | ||
| 687 | func (x *MainLoop) Unref() { | 755 | func (x *MainLoop) Unref() { | ||
| 756 | + | core.LazyRegister(&xMainLoopUnref, "GLIB", "g_main_loop_unref", false) | |||
| 757 | + | ||||
| 688 | xMainLoopUnref(x.GoPointer()) | 758 | xMainLoopUnref(x.GoPointer()) | ||
| 689 | } | 759 | } | ||
| 690 | 760 | ||||
| @@ -723,6 +793,7 @@ type Source struct { | |||||
| 723 | var xSourceGLibType func() types.GType | 793 | var xSourceGLibType func() types.GType | ||
| 724 | 794 | ||||
| 725 | func SourceGLibType() types.GType { | 795 | func SourceGLibType() types.GType { | ||
| 796 | + | core.LazyRegister(&xSourceGLibType, "GLIB", "g_source_get_type", false) | |||
| 726 | return xSourceGLibType() | 797 | return xSourceGLibType() | ||
| 727 | } | 798 | } | ||
| 728 | 799 | ||||
| @@ -751,6 +822,8 @@ var xNewSource func(*SourceFuncs, uint) uintptr | |||||
| 751 | // and must be added to one with [method@GLib.Source.attach] before it will be | 822 | // and must be added to one with [method@GLib.Source.attach] before it will be | ||
| 752 | // executed. | 823 | // executed. | ||
| 753 | func NewSource(SourceFuncsVar *SourceFuncs, StructSizeVar uint) *Source { | 824 | func NewSource(SourceFuncsVar *SourceFuncs, StructSizeVar uint) *Source { | ||
| 825 | + | core.LazyRegister(&xNewSource, "GLIB", "g_source_new", false) | |||
| 826 | + | ||||
| 754 | cret := xNewSource(SourceFuncsVar, StructSizeVar) | 827 | cret := xNewSource(SourceFuncsVar, StructSizeVar) | ||
| 755 | if cret == 0 { | 828 | if cret == 0 { | ||
| 756 | return nil | 829 | return nil | ||
| @@ -780,6 +853,8 @@ var xSourceAddChildSource func(uintptr, *Source) | |||||
| 780 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | 853 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | ||
| 781 | // Do not call this API on a [struct@GLib.Source] that you did not create. | 854 | // Do not call this API on a [struct@GLib.Source] that you did not create. | ||
| 782 | func (x *Source) AddChildSource(ChildSourceVar *Source) { | 855 | func (x *Source) AddChildSource(ChildSourceVar *Source) { | ||
| 856 | + | core.LazyRegister(&xSourceAddChildSource, "GLIB", "g_source_add_child_source", false) | |||
| 857 | + | ||||
| 783 | xSourceAddChildSource(x.GoPointer(), ChildSourceVar) | 858 | xSourceAddChildSource(x.GoPointer(), ChildSourceVar) | ||
| 784 | } | 859 | } | ||
| 785 | 860 | ||||
| @@ -800,6 +875,8 @@ var xSourceAddPoll func(uintptr, *PollFD) | |||||
| 800 | // main loop iteration. Newly-written event sources should try to use | 875 | // main loop iteration. Newly-written event sources should try to use | ||
| 801 | // `g_source_add_unix_fd()` instead of this API. | 876 | // `g_source_add_unix_fd()` instead of this API. | ||
| 802 | func (x *Source) AddPoll(FdVar *PollFD) { | 877 | func (x *Source) AddPoll(FdVar *PollFD) { | ||
| 878 | + | core.LazyRegister(&xSourceAddPoll, "GLIB", "g_source_add_poll", false) | |||
| 879 | + | ||||
| 803 | xSourceAddPoll(x.GoPointer(), FdVar) | 880 | xSourceAddPoll(x.GoPointer(), FdVar) | ||
| 804 | } | 881 | } | ||
| 805 | 882 | ||||
| @@ -819,6 +896,8 @@ var xSourceAddUnixFd func(uintptr, int, IOCondition) uintptr | |||||
| 819 | // | 896 | // | ||
| 820 | // As the name suggests, this function is not available on Windows. | 897 | // As the name suggests, this function is not available on Windows. | ||
| 821 | func (x *Source) AddUnixFd(FdVar int, EventsVar IOCondition) uintptr { | 898 | func (x *Source) AddUnixFd(FdVar int, EventsVar IOCondition) uintptr { | ||
| 899 | + | core.LazyRegister(&xSourceAddUnixFd, "GLIB", "g_source_add_unix_fd", false) | |||
| 900 | + | ||||
| 822 | cret := xSourceAddUnixFd(x.GoPointer(), FdVar, EventsVar) | 901 | cret := xSourceAddUnixFd(x.GoPointer(), FdVar, EventsVar) | ||
| 823 | return cret | 902 | return cret | ||
| 824 | } | 903 | } | ||
| @@ -833,6 +912,8 @@ var xSourceAttach func(uintptr, *MainContext) uint | |||||
| 833 | // This function is safe to call from any thread, regardless of which thread | 912 | // This function is safe to call from any thread, regardless of which thread | ||
| 834 | // the @context is running in. | 913 | // the @context is running in. | ||
| 835 | func (x *Source) Attach(ContextVar *MainContext) uint { | 914 | func (x *Source) Attach(ContextVar *MainContext) uint { | ||
| 915 | + | core.LazyRegister(&xSourceAttach, "GLIB", "g_source_attach", false) | |||
| 916 | + | ||||
| 836 | cret := xSourceAttach(x.GoPointer(), ContextVar) | 917 | cret := xSourceAttach(x.GoPointer(), ContextVar) | ||
| 837 | return cret | 918 | return cret | ||
| 838 | } | 919 | } | ||
| @@ -857,6 +938,8 @@ var xSourceDestroy func(uintptr) | |||||
| 857 | // [method@GLib.Source.set_callback]. This can mean, that the data’s | 938 | // [method@GLib.Source.set_callback]. This can mean, that the data’s | ||
| 858 | // [callback@GLib.DestroyNotify] gets called right away. | 939 | // [callback@GLib.DestroyNotify] gets called right away. | ||
| 859 | func (x *Source) Destroy() { | 940 | func (x *Source) Destroy() { | ||
| 941 | + | core.LazyRegister(&xSourceDestroy, "GLIB", "g_source_destroy", false) | |||
| 942 | + | ||||
| 860 | xSourceDestroy(x.GoPointer()) | 943 | xSourceDestroy(x.GoPointer()) | ||
| 861 | } | 944 | } | ||
| 862 | 945 | ||||
| @@ -869,6 +952,8 @@ var xSourceDupContext func(uintptr) uintptr | |||||
| 869 | // always call this function on the source returned from | 952 | // always call this function on the source returned from | ||
| 870 | // [func@GLib.main_current_source]. | 953 | // [func@GLib.main_current_source]. | ||
| 871 | func (x *Source) DupContext() *MainContext { | 954 | func (x *Source) DupContext() *MainContext { | ||
| 955 | + | core.LazyRegister(&xSourceDupContext, "GLIB", "g_source_dup_context", false) | |||
| 956 | + | ||||
| 872 | cret := xSourceDupContext(x.GoPointer()) | 957 | cret := xSourceDupContext(x.GoPointer()) | ||
| 873 | if cret == 0 { | 958 | if cret == 0 { | ||
| 874 | return nil | 959 | return nil | ||
| @@ -882,6 +967,8 @@ var xSourceGetCanRecurse func(uintptr) bool | |||||
| 882 | // | 967 | // | ||
| 883 | // See [method@GLib.Source.set_can_recurse]. | 968 | // See [method@GLib.Source.set_can_recurse]. | ||
| 884 | func (x *Source) GetCanRecurse() bool { | 969 | func (x *Source) GetCanRecurse() bool { | ||
| 970 | + | core.LazyRegister(&xSourceGetCanRecurse, "GLIB", "g_source_get_can_recurse", false) | |||
| 971 | + | ||||
| 885 | cret := xSourceGetCanRecurse(x.GoPointer()) | 972 | cret := xSourceGetCanRecurse(x.GoPointer()) | ||
| 886 | return cret | 973 | return cret | ||
| 887 | } | 974 | } | ||
| @@ -901,6 +988,8 @@ var xSourceGetContext func(uintptr) uintptr | |||||
| 901 | // a different thread, then this function is not safe to call and | 988 | // a different thread, then this function is not safe to call and | ||
| 902 | // [method@GLib.Source.dup_context] should be used instead. | 989 | // [method@GLib.Source.dup_context] should be used instead. | ||
| 903 | func (x *Source) GetContext() *MainContext { | 990 | func (x *Source) GetContext() *MainContext { | ||
| 991 | + | core.LazyRegister(&xSourceGetContext, "GLIB", "g_source_get_context", false) | |||
| 992 | + | ||||
| 904 | cret := xSourceGetContext(x.GoPointer()) | 993 | cret := xSourceGetContext(x.GoPointer()) | ||
| 905 | if cret == 0 { | 994 | if cret == 0 { | ||
| 906 | return nil | 995 | return nil | ||
| @@ -913,6 +1002,8 @@ var xSourceGetCurrentTime func(uintptr, *TimeVal) | |||||
| 913 | // This function ignores @source and is otherwise the same as | 1002 | // This function ignores @source and is otherwise the same as | ||
| 914 | // [func@GLib.get_current_time]. | 1003 | // [func@GLib.get_current_time]. | ||
| 915 | func (x *Source) GetCurrentTime(TimevalVar *TimeVal) { | 1004 | func (x *Source) GetCurrentTime(TimevalVar *TimeVal) { | ||
| 1005 | + | core.LazyRegister(&xSourceGetCurrentTime, "GLIB", "g_source_get_current_time", false) | |||
| 1006 | + | ||||
| 916 | xSourceGetCurrentTime(x.GoPointer(), TimevalVar) | 1007 | xSourceGetCurrentTime(x.GoPointer(), TimevalVar) | ||
| 917 | } | 1008 | } | ||
| 918 | 1009 | ||||
| @@ -931,6 +1022,8 @@ var xSourceGetId func(uintptr) uint | |||||
| 931 | // undefined behavior. The ID returned is unique within the | 1022 | // undefined behavior. The ID returned is unique within the | ||
| 932 | // [struct@GLib.MainContext] instance passed to [method@GLib.Source.attach]. | 1023 | // [struct@GLib.MainContext] instance passed to [method@GLib.Source.attach]. | ||
| 933 | func (x *Source) GetId() uint { | 1024 | func (x *Source) GetId() uint { | ||
| 1025 | + | core.LazyRegister(&xSourceGetId, "GLIB", "g_source_get_id", false) | |||
| 1026 | + | ||||
| 934 | cret := xSourceGetId(x.GoPointer()) | 1027 | cret := xSourceGetId(x.GoPointer()) | ||
| 935 | return cret | 1028 | return cret | ||
| 936 | } | 1029 | } | ||
| @@ -942,6 +1035,8 @@ var xSourceGetName func(uintptr) string | |||||
| 942 | // The | 1035 | // The | ||
| 943 | // name may be `NULL` if it has never been set with [method@GLib.Source.set_name]. | 1036 | // name may be `NULL` if it has never been set with [method@GLib.Source.set_name]. | ||
| 944 | func (x *Source) GetName() string { | 1037 | func (x *Source) GetName() string { | ||
| 1038 | + | core.LazyRegister(&xSourceGetName, "GLIB", "g_source_get_name", false) | |||
| 1039 | + | ||||
| 945 | cret := xSourceGetName(x.GoPointer()) | 1040 | cret := xSourceGetName(x.GoPointer()) | ||
| 946 | return cret | 1041 | return cret | ||
| 947 | } | 1042 | } | ||
| @@ -950,6 +1045,8 @@ var xSourceGetPriority func(uintptr) int | |||||
| 950 | 1045 | ||||
| 951 | // Gets the priority of a source. | 1046 | // Gets the priority of a source. | ||
| 952 | func (x *Source) GetPriority() int { | 1047 | func (x *Source) GetPriority() int { | ||
| 1048 | + | core.LazyRegister(&xSourceGetPriority, "GLIB", "g_source_get_priority", false) | |||
| 1049 | + | ||||
| 953 | cret := xSourceGetPriority(x.GoPointer()) | 1050 | cret := xSourceGetPriority(x.GoPointer()) | ||
| 954 | return cret | 1051 | return cret | ||
| 955 | } | 1052 | } | ||
| @@ -962,6 +1059,8 @@ var xSourceGetReadyTime func(uintptr) int64 | |||||
| 962 | // Any time before or equal to the current monotonic time (including zero) | 1059 | // Any time before or equal to the current monotonic time (including zero) | ||
| 963 | // is an indication that the source will fire immediately. | 1060 | // is an indication that the source will fire immediately. | ||
| 964 | func (x *Source) GetReadyTime() int64 { | 1061 | func (x *Source) GetReadyTime() int64 { | ||
| 1062 | + | core.LazyRegister(&xSourceGetReadyTime, "GLIB", "g_source_get_ready_time", false) | |||
| 1063 | + | ||||
| 965 | cret := xSourceGetReadyTime(x.GoPointer()) | 1064 | cret := xSourceGetReadyTime(x.GoPointer()) | ||
| 966 | return cret | 1065 | return cret | ||
| 967 | } | 1066 | } | ||
| @@ -978,6 +1077,8 @@ var xSourceGetTime func(uintptr) int64 | |||||
| 978 | // The time here is the system monotonic time, if available, or some | 1077 | // The time here is the system monotonic time, if available, or some | ||
| 979 | // other reasonable alternative otherwise. See [func@GLib.get_monotonic_time]. | 1078 | // other reasonable alternative otherwise. See [func@GLib.get_monotonic_time]. | ||
| 980 | func (x *Source) GetTime() int64 { | 1079 | func (x *Source) GetTime() int64 { | ||
| 1080 | + | core.LazyRegister(&xSourceGetTime, "GLIB", "g_source_get_time", false) | |||
| 1081 | + | ||||
| 981 | cret := xSourceGetTime(x.GoPointer()) | 1082 | cret := xSourceGetTime(x.GoPointer()) | ||
| 982 | return cret | 1083 | return cret | ||
| 983 | } | 1084 | } | ||
| @@ -1070,6 +1171,8 @@ var xSourceIsDestroyed func(uintptr) bool | |||||
| 1070 | // returns. However, once a source is destroyed it cannot be un-destroyed, so | 1171 | // returns. However, once a source is destroyed it cannot be un-destroyed, so | ||
| 1071 | // this function can be used for opportunistic checks from any thread. | 1172 | // this function can be used for opportunistic checks from any thread. | ||
| 1072 | func (x *Source) IsDestroyed() bool { | 1173 | func (x *Source) IsDestroyed() bool { | ||
| 1174 | + | core.LazyRegister(&xSourceIsDestroyed, "GLIB", "g_source_is_destroyed", false) | |||
| 1175 | + | ||||
| 1073 | cret := xSourceIsDestroyed(x.GoPointer()) | 1176 | cret := xSourceIsDestroyed(x.GoPointer()) | ||
| 1074 | return cret | 1177 | return cret | ||
| 1075 | } | 1178 | } | ||
| @@ -1088,6 +1191,8 @@ var xSourceModifyUnixFd func(uintptr, uintptr, IOCondition) | |||||
| 1088 | // | 1191 | // | ||
| 1089 | // As the name suggests, this function is not available on Windows. | 1192 | // As the name suggests, this function is not available on Windows. | ||
| 1090 | func (x *Source) ModifyUnixFd(TagVar uintptr, NewEventsVar IOCondition) { | 1193 | func (x *Source) ModifyUnixFd(TagVar uintptr, NewEventsVar IOCondition) { | ||
| 1194 | + | core.LazyRegister(&xSourceModifyUnixFd, "GLIB", "g_source_modify_unix_fd", false) | |||
| 1195 | + | ||||
| 1091 | xSourceModifyUnixFd(x.GoPointer(), TagVar, NewEventsVar) | 1196 | xSourceModifyUnixFd(x.GoPointer(), TagVar, NewEventsVar) | ||
| 1092 | } | 1197 | } | ||
| 1093 | 1198 | ||||
| @@ -1104,6 +1209,8 @@ var xSourceQueryUnixFd func(uintptr, uintptr) IOCondition | |||||
| 1104 | // | 1209 | // | ||
| 1105 | // As the name suggests, this function is not available on Windows. | 1210 | // As the name suggests, this function is not available on Windows. | ||
| 1106 | func (x *Source) QueryUnixFd(TagVar uintptr) IOCondition { | 1211 | func (x *Source) QueryUnixFd(TagVar uintptr) IOCondition { | ||
| 1212 | + | core.LazyRegister(&xSourceQueryUnixFd, "GLIB", "g_source_query_unix_fd", false) | |||
| 1213 | + | ||||
| 1107 | cret := xSourceQueryUnixFd(x.GoPointer(), TagVar) | 1214 | cret := xSourceQueryUnixFd(x.GoPointer(), TagVar) | ||
| 1108 | return cret | 1215 | return cret | ||
| 1109 | } | 1216 | } | ||
| @@ -1112,6 +1219,8 @@ var xSourceRef func(uintptr) uintptr | |||||
| 1112 | 1219 | ||||
| 1113 | // Increases the reference count on a source by one. | 1220 | // Increases the reference count on a source by one. | ||
| 1114 | func (x *Source) Ref() *Source { | 1221 | func (x *Source) Ref() *Source { | ||
| 1222 | + | core.LazyRegister(&xSourceRef, "GLIB", "g_source_ref", false) | |||
| 1223 | + | ||||
| 1115 | cret := xSourceRef(x.GoPointer()) | 1224 | cret := xSourceRef(x.GoPointer()) | ||
| 1116 | if cret == 0 { | 1225 | if cret == 0 { | ||
| 1117 | return nil | 1226 | return nil | ||
| @@ -1126,6 +1235,8 @@ var xSourceRemoveChildSource func(uintptr, *Source) | |||||
| 1126 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | 1235 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | ||
| 1127 | // Do not call this API on a [struct@GLib.Source] that you did not create. | 1236 | // Do not call this API on a [struct@GLib.Source] that you did not create. | ||
| 1128 | func (x *Source) RemoveChildSource(ChildSourceVar *Source) { | 1237 | func (x *Source) RemoveChildSource(ChildSourceVar *Source) { | ||
| 1238 | + | core.LazyRegister(&xSourceRemoveChildSource, "GLIB", "g_source_remove_child_source", false) | |||
| 1239 | + | ||||
| 1129 | xSourceRemoveChildSource(x.GoPointer(), ChildSourceVar) | 1240 | xSourceRemoveChildSource(x.GoPointer(), ChildSourceVar) | ||
| 1130 | } | 1241 | } | ||
| 1131 | 1242 | ||||
| @@ -1137,6 +1248,8 @@ var xSourceRemovePoll func(uintptr, *PollFD) | |||||
| 1137 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | 1248 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | ||
| 1138 | // Do not call this API on a [struct@GLib.Source] that you did not create. | 1249 | // Do not call this API on a [struct@GLib.Source] that you did not create. | ||
| 1139 | func (x *Source) RemovePoll(FdVar *PollFD) { | 1250 | func (x *Source) RemovePoll(FdVar *PollFD) { | ||
| 1251 | + | core.LazyRegister(&xSourceRemovePoll, "GLIB", "g_source_remove_poll", false) | |||
| 1252 | + | ||||
| 1140 | xSourceRemovePoll(x.GoPointer(), FdVar) | 1253 | xSourceRemovePoll(x.GoPointer(), FdVar) | ||
| 1141 | } | 1254 | } | ||
| 1142 | 1255 | ||||
| @@ -1153,6 +1266,8 @@ var xSourceRemoveUnixFd func(uintptr, uintptr) | |||||
| 1153 | // | 1266 | // | ||
| 1154 | // As the name suggests, this function is not available on Windows. | 1267 | // As the name suggests, this function is not available on Windows. | ||
| 1155 | func (x *Source) RemoveUnixFd(TagVar uintptr) { | 1268 | func (x *Source) RemoveUnixFd(TagVar uintptr) { | ||
| 1269 | + | core.LazyRegister(&xSourceRemoveUnixFd, "GLIB", "g_source_remove_unix_fd", false) | |||
| 1270 | + | ||||
| 1156 | xSourceRemoveUnixFd(x.GoPointer(), TagVar) | 1271 | xSourceRemoveUnixFd(x.GoPointer(), TagVar) | ||
| 1157 | } | 1272 | } | ||
| 1158 | 1273 | ||||
| @@ -1180,6 +1295,8 @@ var xSourceSetCallback func(uintptr, uintptr, uintptr, uintptr) | |||||
| 1180 | // Note that [method@GLib.Source.destroy] for a currently attached source has the effect | 1295 | // Note that [method@GLib.Source.destroy] for a currently attached source has the effect | ||
| 1181 | // of also unsetting the callback. | 1296 | // of also unsetting the callback. | ||
| 1182 | func (x *Source) SetCallback(FuncVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) { | 1297 | func (x *Source) SetCallback(FuncVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) { | ||
| 1298 | + | core.LazyRegister(&xSourceSetCallback, "GLIB", "g_source_set_callback", false) | |||
| 1299 | + | ||||
| 1183 | xSourceSetCallback(x.GoPointer(), NewCallback(FuncVar), DataVar, NewCallbackNullable(NotifyVar)) | 1300 | xSourceSetCallback(x.GoPointer(), NewCallback(FuncVar), DataVar, NewCallbackNullable(NotifyVar)) | ||
| 1184 | } | 1301 | } | ||
| 1185 | 1302 | ||||
| @@ -1198,6 +1315,8 @@ var xSourceSetCallbackIndirect func(uintptr, uintptr, *SourceCallbackFuncs) | |||||
| 1198 | // been attached to a context. The changes will take effect for the next time | 1315 | // been attached to a context. The changes will take effect for the next time | ||
| 1199 | // the source is dispatched after this call returns. | 1316 | // the source is dispatched after this call returns. | ||
| 1200 | func (x *Source) SetCallbackIndirect(CallbackDataVar uintptr, CallbackFuncsVar *SourceCallbackFuncs) { | 1317 | func (x *Source) SetCallbackIndirect(CallbackDataVar uintptr, CallbackFuncsVar *SourceCallbackFuncs) { | ||
| 1318 | + | core.LazyRegister(&xSourceSetCallbackIndirect, "GLIB", "g_source_set_callback_indirect", false) | |||
| 1319 | + | ||||
| 1201 | xSourceSetCallbackIndirect(x.GoPointer(), CallbackDataVar, CallbackFuncsVar) | 1320 | xSourceSetCallbackIndirect(x.GoPointer(), CallbackDataVar, CallbackFuncsVar) | ||
| 1202 | } | 1321 | } | ||
| 1203 | 1322 | ||||
| @@ -1209,6 +1328,8 @@ var xSourceSetCanRecurse func(uintptr, bool) | |||||
| 1209 | // source will be processed normally. Otherwise, all processing of this | 1328 | // source will be processed normally. Otherwise, all processing of this | ||
| 1210 | // source is blocked until the dispatch function returns. | 1329 | // source is blocked until the dispatch function returns. | ||
| 1211 | func (x *Source) SetCanRecurse(CanRecurseVar bool) { | 1330 | func (x *Source) SetCanRecurse(CanRecurseVar bool) { | ||
| 1331 | + | core.LazyRegister(&xSourceSetCanRecurse, "GLIB", "g_source_set_can_recurse", false) | |||
| 1332 | + | ||||
| 1212 | xSourceSetCanRecurse(x.GoPointer(), CanRecurseVar) | 1333 | xSourceSetCanRecurse(x.GoPointer(), CanRecurseVar) | ||
| 1213 | } | 1334 | } | ||
| 1214 | 1335 | ||||
| @@ -1235,6 +1356,8 @@ var xSourceSetDisposeFunction func(uintptr, uintptr) | |||||
| 1235 | // | 1356 | // | ||
| 1236 | // This should only ever be called from [struct@GLib.Source] implementations. | 1357 | // This should only ever be called from [struct@GLib.Source] implementations. | ||
| 1237 | func (x *Source) SetDisposeFunction(DisposeVar *SourceDisposeFunc) { | 1358 | func (x *Source) SetDisposeFunction(DisposeVar *SourceDisposeFunc) { | ||
| 1359 | + | core.LazyRegister(&xSourceSetDisposeFunction, "GLIB", "g_source_set_dispose_function", false) | |||
| 1360 | + | ||||
| 1238 | xSourceSetDisposeFunction(x.GoPointer(), NewCallback(DisposeVar)) | 1361 | xSourceSetDisposeFunction(x.GoPointer(), NewCallback(DisposeVar)) | ||
| 1239 | } | 1362 | } | ||
| 1240 | 1363 | ||||
| @@ -1245,6 +1368,8 @@ var xSourceSetFuncs func(uintptr, *SourceFuncs) | |||||
| 1245 | // These can be used to override the default implementations for the type | 1368 | // These can be used to override the default implementations for the type | ||
| 1246 | // of @source. | 1369 | // of @source. | ||
| 1247 | func (x *Source) SetFuncs(FuncsVar *SourceFuncs) { | 1370 | func (x *Source) SetFuncs(FuncsVar *SourceFuncs) { | ||
| 1371 | + | core.LazyRegister(&xSourceSetFuncs, "GLIB", "g_source_set_funcs", false) | |||
| 1372 | + | ||||
| 1248 | xSourceSetFuncs(x.GoPointer(), FuncsVar) | 1373 | xSourceSetFuncs(x.GoPointer(), FuncsVar) | ||
| 1249 | } | 1374 | } | ||
| 1250 | 1375 | ||||
| @@ -1271,6 +1396,8 @@ var xSourceSetName func(uintptr, string) | |||||
| 1271 | // | 1396 | // | ||
| 1272 | // Also see [method@GLib.Source.set_static_name]. | 1397 | // Also see [method@GLib.Source.set_static_name]. | ||
| 1273 | func (x *Source) SetName(NameVar string) { | 1398 | func (x *Source) SetName(NameVar string) { | ||
| 1399 | + | core.LazyRegister(&xSourceSetName, "GLIB", "g_source_set_name", false) | |||
| 1400 | + | ||||
| 1274 | xSourceSetName(x.GoPointer(), NameVar) | 1401 | xSourceSetName(x.GoPointer(), NameVar) | ||
| 1275 | } | 1402 | } | ||
| 1276 | 1403 | ||||
| @@ -1287,6 +1414,8 @@ var xSourceSetPriority func(uintptr, int) | |||||
| 1287 | // permitted to change the priority of a source once it has been added | 1414 | // permitted to change the priority of a source once it has been added | ||
| 1288 | // as a child of another source. | 1415 | // as a child of another source. | ||
| 1289 | func (x *Source) SetPriority(PriorityVar int) { | 1416 | func (x *Source) SetPriority(PriorityVar int) { | ||
| 1417 | + | core.LazyRegister(&xSourceSetPriority, "GLIB", "g_source_set_priority", false) | |||
| 1418 | + | ||||
| 1290 | xSourceSetPriority(x.GoPointer(), PriorityVar) | 1419 | xSourceSetPriority(x.GoPointer(), PriorityVar) | ||
| 1291 | } | 1420 | } | ||
| 1292 | 1421 | ||||
| @@ -1317,6 +1446,8 @@ var xSourceSetReadyTime func(uintptr, int64) | |||||
| 1317 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | 1446 | // This API is only intended to be used by implementations of [struct@GLib.Source]. | ||
| 1318 | // Do not call this API on a [struct@GLib.Source] that you did not create. | 1447 | // Do not call this API on a [struct@GLib.Source] that you did not create. | ||
| 1319 | func (x *Source) SetReadyTime(ReadyTimeVar int64) { | 1448 | func (x *Source) SetReadyTime(ReadyTimeVar int64) { | ||
| 1449 | + | core.LazyRegister(&xSourceSetReadyTime, "GLIB", "g_source_set_ready_time", false) | |||
| 1450 | + | ||||
| 1320 | xSourceSetReadyTime(x.GoPointer(), ReadyTimeVar) | 1451 | xSourceSetReadyTime(x.GoPointer(), ReadyTimeVar) | ||
| 1321 | } | 1452 | } | ||
| 1322 | 1453 | ||||
| @@ -1326,6 +1457,8 @@ var xSourceSetStaticName func(uintptr, string) | |||||
| 1326 | // duplicate the @name, and can only be used with | 1457 | // duplicate the @name, and can only be used with | ||
| 1327 | // string literals. | 1458 | // string literals. | ||
| 1328 | func (x *Source) SetStaticName(NameVar string) { | 1459 | func (x *Source) SetStaticName(NameVar string) { | ||
| 1460 | + | core.LazyRegister(&xSourceSetStaticName, "GLIB", "g_source_set_static_name", false) | |||
| 1461 | + | ||||
| 1329 | xSourceSetStaticName(x.GoPointer(), NameVar) | 1462 | xSourceSetStaticName(x.GoPointer(), NameVar) | ||
| 1330 | } | 1463 | } | ||
| 1331 | 1464 | ||||
| @@ -1336,6 +1469,8 @@ var xSourceUnref func(uintptr) | |||||
| 1336 | // If the resulting reference count is zero the source and associated | 1469 | // If the resulting reference count is zero the source and associated | ||
| 1337 | // memory will be destroyed. | 1470 | // memory will be destroyed. | ||
| 1338 | func (x *Source) Unref() { | 1471 | func (x *Source) Unref() { | ||
| 1472 | + | core.LazyRegister(&xSourceUnref, "GLIB", "g_source_unref", false) | |||
| 1473 | + | ||||
| 1339 | xSourceUnref(x.GoPointer()) | 1474 | xSourceUnref(x.GoPointer()) | ||
| 1340 | } | 1475 | } | ||
| 1341 | 1476 | ||||
| @@ -1583,6 +1718,7 @@ var xChildWatchAdd func(Pid, uintptr, uintptr) uint | |||||
| 1583 | // using [method@GLib.Source.attach]. You can do these steps manually if you | 1718 | // using [method@GLib.Source.attach]. You can do these steps manually if you | ||
| 1584 | // need greater control. | 1719 | // need greater control. | ||
| 1585 | func ChildWatchAdd(PidVar Pid, FunctionVar *ChildWatchFunc, DataVar uintptr) uint { | 1720 | func ChildWatchAdd(PidVar Pid, FunctionVar *ChildWatchFunc, DataVar uintptr) uint { | ||
| 1721 | + | core.LazyRegister(&xChildWatchAdd, "GLIB", "g_child_watch_add", false) | |||
| 1586 | var functionRef uintptr | 1722 | var functionRef uintptr | ||
| 1587 | if FunctionVar != nil { | 1723 | if FunctionVar != nil { | ||
| 1588 | functionRef = childWatchFuncTrampolineCb | 1724 | functionRef = childWatchFuncTrampolineCb | ||
| @@ -1620,6 +1756,7 @@ var xChildWatchAddFull func(int, Pid, uintptr, uintptr, uintptr) uint | |||||
| 1620 | // using [method@GLib.Source.attach]. You can do these steps manually if you | 1756 | // using [method@GLib.Source.attach]. You can do these steps manually if you | ||
| 1621 | // need greater control. | 1757 | // need greater control. | ||
| 1622 | func ChildWatchAddFull(PriorityVar int, PidVar Pid, FunctionVar *ChildWatchFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | 1758 | func ChildWatchAddFull(PriorityVar int, PidVar Pid, FunctionVar *ChildWatchFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | ||
| 1759 | + | core.LazyRegister(&xChildWatchAddFull, "GLIB", "g_child_watch_add_full", false) | |||
| 1623 | var functionRef uintptr | 1760 | var functionRef uintptr | ||
| 1624 | if FunctionVar != nil { | 1761 | if FunctionVar != nil { | ||
| 1625 | functionRef = childWatchFuncTrampolineCb | 1762 | functionRef = childWatchFuncTrampolineCb | ||
| @@ -1672,6 +1809,8 @@ var xChildWatchSourceNew func(Pid) uintptr | |||||
| 1672 | // Calling [`waitpid()`](man:waitpid(2)) for specific processes other than @pid | 1809 | // Calling [`waitpid()`](man:waitpid(2)) for specific processes other than @pid | ||
| 1673 | // remains a valid thing to do. | 1810 | // remains a valid thing to do. | ||
| 1674 | func ChildWatchSourceNew(PidVar Pid) *Source { | 1811 | func ChildWatchSourceNew(PidVar Pid) *Source { | ||
| 1812 | + | core.LazyRegister(&xChildWatchSourceNew, "GLIB", "g_child_watch_source_new", false) | |||
| 1813 | + | ||||
| 1675 | cret := xChildWatchSourceNew(PidVar) | 1814 | cret := xChildWatchSourceNew(PidVar) | ||
| 1676 | if cret == 0 { | 1815 | if cret == 0 { | ||
| 1677 | return nil | 1816 | return nil | ||
| @@ -1692,6 +1831,8 @@ var xClearHandleId func(uint, uintptr) | |||||
| 1692 | // A macro is also included that allows this function to be used without | 1831 | // A macro is also included that allows this function to be used without | ||
| 1693 | // pointer casts. | 1832 | // pointer casts. | ||
| 1694 | func ClearHandleId(TagPtrVar uint, ClearFuncVar *ClearHandleFunc) { | 1833 | func ClearHandleId(TagPtrVar uint, ClearFuncVar *ClearHandleFunc) { | ||
| 1834 | + | core.LazyRegister(&xClearHandleId, "GLIB", "g_clear_handle_id", false) | |||
| 1835 | + | ||||
| 1695 | xClearHandleId(TagPtrVar, NewCallback(ClearFuncVar)) | 1836 | xClearHandleId(TagPtrVar, NewCallback(ClearFuncVar)) | ||
| 1696 | } | 1837 | } | ||
| 1697 | 1838 | ||||
| @@ -1704,6 +1845,8 @@ var xGetCurrentTime func(*TimeVal) | |||||
| 1704 | // | 1845 | // | ||
| 1705 | // You may find [func@GLib.get_real_time] to be more convenient. | 1846 | // You may find [func@GLib.get_real_time] to be more convenient. | ||
| 1706 | func GetCurrentTime(ResultVar *TimeVal) { | 1847 | func GetCurrentTime(ResultVar *TimeVal) { | ||
| 1848 | + | core.LazyRegister(&xGetCurrentTime, "GLIB", "g_get_current_time", false) | |||
| 1849 | + | ||||
| 1707 | xGetCurrentTime(ResultVar) | 1850 | xGetCurrentTime(ResultVar) | ||
| 1708 | } | 1851 | } | ||
| 1709 | 1852 | ||||
| @@ -1724,6 +1867,8 @@ var xGetMonotonicTime func() int64 | |||||
| 1724 | // A more accurate version of this function exists. | 1867 | // A more accurate version of this function exists. | ||
| 1725 | // [func@GLib.get_monotonic_time_ns] returns the time in nanoseconds. | 1868 | // [func@GLib.get_monotonic_time_ns] returns the time in nanoseconds. | ||
| 1726 | func GetMonotonicTime() int64 { | 1869 | func GetMonotonicTime() int64 { | ||
| 1870 | + | core.LazyRegister(&xGetMonotonicTime, "GLIB", "g_get_monotonic_time", false) | |||
| 1871 | + | ||||
| 1727 | cret := xGetMonotonicTime() | 1872 | cret := xGetMonotonicTime() | ||
| 1728 | return cret | 1873 | return cret | ||
| 1729 | } | 1874 | } | ||
| @@ -1746,6 +1891,8 @@ var xGetMonotonicTimeNs func() uint64 | |||||
| 1746 | // [func@GLib.get_monotonic_time] returns the time in microseconds. | 1891 | // [func@GLib.get_monotonic_time] returns the time in microseconds. | ||
| 1747 | // If you want to support older GLib versions, it is an alternative. | 1892 | // If you want to support older GLib versions, it is an alternative. | ||
| 1748 | func GetMonotonicTimeNs() uint64 { | 1893 | func GetMonotonicTimeNs() uint64 { | ||
| 1894 | + | core.LazyRegister(&xGetMonotonicTimeNs, "GLIB", "g_get_monotonic_time_ns", false) | |||
| 1895 | + | ||||
| 1749 | cret := xGetMonotonicTimeNs() | 1896 | cret := xGetMonotonicTimeNs() | ||
| 1750 | return cret | 1897 | return cret | ||
| 1751 | } | 1898 | } | ||
| @@ -1761,6 +1908,8 @@ var xGetRealTime func() int64 | |||||
| 1761 | // wall-clock time. [func@GLib.get_monotonic_time] is probably more useful for | 1908 | // wall-clock time. [func@GLib.get_monotonic_time] is probably more useful for | ||
| 1762 | // measuring intervals. | 1909 | // measuring intervals. | ||
| 1763 | func GetRealTime() int64 { | 1910 | func GetRealTime() int64 { | ||
| 1911 | + | core.LazyRegister(&xGetRealTime, "GLIB", "g_get_real_time", false) | |||
| 1912 | + | ||||
| 1764 | cret := xGetRealTime() | 1913 | cret := xGetRealTime() | ||
| 1765 | return cret | 1914 | return cret | ||
| 1766 | } | 1915 | } | ||
| @@ -1784,6 +1933,7 @@ var xIdleAdd func(uintptr, uintptr) uint | |||||
| 1784 | // thread is running that main context. You can do these steps manually if you | 1933 | // thread is running that main context. You can do these steps manually if you | ||
| 1785 | // need greater control or to use a custom main context. | 1934 | // need greater control or to use a custom main context. | ||
| 1786 | func IdleAdd(FunctionVar *SourceFunc, DataVar uintptr) uint { | 1935 | func IdleAdd(FunctionVar *SourceFunc, DataVar uintptr) uint { | ||
| 1936 | + | core.LazyRegister(&xIdleAdd, "GLIB", "g_idle_add", false) | |||
| 1787 | var functionRef uintptr | 1937 | var functionRef uintptr | ||
| 1788 | if FunctionVar != nil { | 1938 | if FunctionVar != nil { | ||
| 1789 | functionRef = sourceFuncTrampolineCb | 1939 | functionRef = sourceFuncTrampolineCb | ||
| @@ -1810,6 +1960,7 @@ var xIdleAddFull func(int, uintptr, uintptr, uintptr) uint | |||||
| 1810 | // thread is running that main context. You can do these steps manually if you | 1960 | // thread is running that main context. You can do these steps manually if you | ||
| 1811 | // need greater control or to use a custom main context. | 1961 | // need greater control or to use a custom main context. | ||
| 1812 | func IdleAddFull(PriorityVar int, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | 1962 | func IdleAddFull(PriorityVar int, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | ||
| 1963 | + | core.LazyRegister(&xIdleAddFull, "GLIB", "g_idle_add_full", false) | |||
| 1813 | var functionRef uintptr | 1964 | var functionRef uintptr | ||
| 1814 | if FunctionVar != nil { | 1965 | if FunctionVar != nil { | ||
| 1815 | functionRef = sourceFuncTrampolineCb | 1966 | functionRef = sourceFuncTrampolineCb | ||
| @@ -1832,6 +1983,7 @@ var xIdleAddOnce func(uintptr, uintptr) uint | |||||
| 1832 | // | 1983 | // | ||
| 1833 | // This function otherwise behaves like [func@GLib.idle_add]. | 1984 | // This function otherwise behaves like [func@GLib.idle_add]. | ||
| 1834 | func IdleAddOnce(FunctionVar *SourceOnceFunc, DataVar uintptr) uint { | 1985 | func IdleAddOnce(FunctionVar *SourceOnceFunc, DataVar uintptr) uint { | ||
| 1986 | + | core.LazyRegister(&xIdleAddOnce, "GLIB", "g_idle_add_once", false) | |||
| 1835 | var functionRef uintptr | 1987 | var functionRef uintptr | ||
| 1836 | if FunctionVar != nil { | 1988 | if FunctionVar != nil { | ||
| 1837 | functionRef = sourceOnceFuncTrampolineCb | 1989 | functionRef = sourceOnceFuncTrampolineCb | ||
| @@ -1845,6 +1997,7 @@ var xIdleRemoveByData func(uintptr) bool | |||||
| 1845 | 1997 | ||||
| 1846 | // Removes the idle function with the given data. | 1998 | // Removes the idle function with the given data. | ||
| 1847 | func IdleRemoveByData(DataVar uintptr) bool { | 1999 | func IdleRemoveByData(DataVar uintptr) bool { | ||
| 2000 | + | core.LazyRegister(&xIdleRemoveByData, "GLIB", "g_idle_remove_by_data", false) | |||
| 1848 | trackedSourceID := trackedSourceIDByUserData(DataVar) | 2001 | trackedSourceID := trackedSourceIDByUserData(DataVar) | ||
| 1849 | cret := xIdleRemoveByData(DataVar) | 2002 | cret := xIdleRemoveByData(DataVar) | ||
| 1850 | if cret { | 2003 | if cret { | ||
| @@ -1864,6 +2017,8 @@ var xIdleSourceNew func() uintptr | |||||
| 1864 | // compared to other sources which have a default priority of | 2017 | // compared to other sources which have a default priority of | ||
| 1865 | // [const@GLib.PRIORITY_DEFAULT]. | 2018 | // [const@GLib.PRIORITY_DEFAULT]. | ||
| 1866 | func IdleSourceNew() *Source { | 2019 | func IdleSourceNew() *Source { | ||
| 2020 | + | core.LazyRegister(&xIdleSourceNew, "GLIB", "g_idle_source_new", false) | |||
| 2021 | + | ||||
| 1867 | cret := xIdleSourceNew() | 2022 | cret := xIdleSourceNew() | ||
| 1868 | if cret == 0 { | 2023 | if cret == 0 { | ||
| 1869 | return nil | 2024 | return nil | ||
| @@ -1880,6 +2035,8 @@ var xMainContextDefault func() uintptr | |||||
| 1880 | // specified, and corresponds to the ‘main’ main loop. See also | 2035 | // specified, and corresponds to the ‘main’ main loop. See also | ||
| 1881 | // [func@GLib.MainContext.get_thread_default]. | 2036 | // [func@GLib.MainContext.get_thread_default]. | ||
| 1882 | func MainContextDefault() *MainContext { | 2037 | func MainContextDefault() *MainContext { | ||
| 2038 | + | core.LazyRegister(&xMainContextDefault, "GLIB", "g_main_context_default", false) | |||
| 2039 | + | ||||
| 1883 | cret := xMainContextDefault() | 2040 | cret := xMainContextDefault() | ||
| 1884 | if cret == 0 { | 2041 | if cret == 0 { | ||
| 1885 | return nil | 2042 | return nil | ||
| @@ -1902,6 +2059,8 @@ var xMainContextGetThreadDefault func() uintptr | |||||
| 1902 | // If you need to hold a reference on the context, use | 2059 | // If you need to hold a reference on the context, use | ||
| 1903 | // [func@GLib.MainContext.ref_thread_default] instead. | 2060 | // [func@GLib.MainContext.ref_thread_default] instead. | ||
| 1904 | func MainContextGetThreadDefault() *MainContext { | 2061 | func MainContextGetThreadDefault() *MainContext { | ||
| 2062 | + | core.LazyRegister(&xMainContextGetThreadDefault, "GLIB", "g_main_context_get_thread_default", false) | |||
| 2063 | + | ||||
| 1905 | cret := xMainContextGetThreadDefault() | 2064 | cret := xMainContextGetThreadDefault() | ||
| 1906 | if cret == 0 { | 2065 | if cret == 0 { | ||
| 1907 | return nil | 2066 | return nil | ||
| @@ -1922,6 +2081,8 @@ var xMainContextRefThreadDefault func() uintptr | |||||
| 1922 | // [struct@GLib.MainContext] (with a ref added to it) rather than returning | 2081 | // [struct@GLib.MainContext] (with a ref added to it) rather than returning | ||
| 1923 | // `NULL`. | 2082 | // `NULL`. | ||
| 1924 | func MainContextRefThreadDefault() *MainContext { | 2083 | func MainContextRefThreadDefault() *MainContext { | ||
| 2084 | + | core.LazyRegister(&xMainContextRefThreadDefault, "GLIB", "g_main_context_ref_thread_default", false) | |||
| 2085 | + | ||||
| 1925 | cret := xMainContextRefThreadDefault() | 2086 | cret := xMainContextRefThreadDefault() | ||
| 1926 | if cret == 0 { | 2087 | if cret == 0 { | ||
| 1927 | return nil | 2088 | return nil | ||
| @@ -1933,6 +2094,8 @@ var xMainCurrentSource func() uintptr | |||||
| 1933 | 2094 | ||||
| 1934 | // Returns the currently firing source for this thread. | 2095 | // Returns the currently firing source for this thread. | ||
| 1935 | func MainCurrentSource() *Source { | 2096 | func MainCurrentSource() *Source { | ||
| 2097 | + | core.LazyRegister(&xMainCurrentSource, "GLIB", "g_main_current_source", false) | |||
| 2098 | + | ||||
| 1936 | cret := xMainCurrentSource() | 2099 | cret := xMainCurrentSource() | ||
| 1937 | if cret == 0 { | 2100 | if cret == 0 { | ||
| 1938 | return nil | 2101 | return nil | ||
| @@ -2052,6 +2215,8 @@ var xMainDepth func() int | |||||
| 2052 | // simply return to the main loop and then get called again when | 2215 | // simply return to the main loop and then get called again when | ||
| 2053 | // there is more work to do. | 2216 | // there is more work to do. | ||
| 2054 | func MainDepth() int { | 2217 | func MainDepth() int { | ||
| 2218 | + | core.LazyRegister(&xMainDepth, "GLIB", "g_main_depth", false) | |||
| 2219 | + | ||||
| 2055 | cret := xMainDepth() | 2220 | cret := xMainDepth() | ||
| 2056 | return cret | 2221 | return cret | ||
| 2057 | } | 2222 | } | ||
| @@ -2081,6 +2246,7 @@ var xSourceRemove func(uint) bool | |||||
| 2081 | // been reissued, leading to the operation being performed against the | 2246 | // been reissued, leading to the operation being performed against the | ||
| 2082 | // wrong source. | 2247 | // wrong source. | ||
| 2083 | func SourceRemove(TagVar uint) bool { | 2248 | func SourceRemove(TagVar uint) bool { | ||
| 2249 | + | core.LazyRegister(&xSourceRemove, "GLIB", "g_source_remove", false) | |||
| 2084 | cret := xSourceRemove(TagVar) | 2250 | cret := xSourceRemove(TagVar) | ||
| 2085 | if cret { | 2251 | if cret { | ||
| 2086 | removeTrackedSource(TagVar) | 2252 | removeTrackedSource(TagVar) | ||
| @@ -2096,6 +2262,8 @@ var xSourceRemoveByFuncsUserData func(*SourceFuncs, uintptr) bool | |||||
| 2096 | // If multiple sources exist with the same source functions and user data, only | 2262 | // If multiple sources exist with the same source functions and user data, only | ||
| 2097 | // one will be destroyed. | 2263 | // one will be destroyed. | ||
| 2098 | func SourceRemoveByFuncsUserData(FuncsVar *SourceFuncs, UserDataVar uintptr) bool { | 2264 | func SourceRemoveByFuncsUserData(FuncsVar *SourceFuncs, UserDataVar uintptr) bool { | ||
| 2265 | + | core.LazyRegister(&xSourceRemoveByFuncsUserData, "GLIB", "g_source_remove_by_funcs_user_data", false) | |||
| 2266 | + | ||||
| 2099 | cret := xSourceRemoveByFuncsUserData(FuncsVar, UserDataVar) | 2267 | cret := xSourceRemoveByFuncsUserData(FuncsVar, UserDataVar) | ||
| 2100 | return cret | 2268 | return cret | ||
| 2101 | } | 2269 | } | ||
| @@ -2107,6 +2275,7 @@ var xSourceRemoveByUserData func(uintptr) bool | |||||
| 2107 | // | 2275 | // | ||
| 2108 | // If multiple sources exist with the same user data, only one will be destroyed. | 2276 | // If multiple sources exist with the same user data, only one will be destroyed. | ||
| 2109 | func SourceRemoveByUserData(UserDataVar uintptr) bool { | 2277 | func SourceRemoveByUserData(UserDataVar uintptr) bool { | ||
| 2278 | + | core.LazyRegister(&xSourceRemoveByUserData, "GLIB", "g_source_remove_by_user_data", false) | |||
| 2110 | trackedSourceID := trackedSourceIDByUserData(UserDataVar) | 2279 | trackedSourceID := trackedSourceIDByUserData(UserDataVar) | ||
| 2111 | cret := xSourceRemoveByUserData(UserDataVar) | 2280 | cret := xSourceRemoveByUserData(UserDataVar) | ||
| 2112 | if cret { | 2281 | if cret { | ||
| @@ -2134,6 +2303,8 @@ var xSourceSetNameById func(uint, string) | |||||
| 2134 | // been reissued, leading to the operation being performed against the | 2303 | // been reissued, leading to the operation being performed against the | ||
| 2135 | // wrong source. | 2304 | // wrong source. | ||
| 2136 | func SourceSetNameById(TagVar uint, NameVar string) { | 2305 | func SourceSetNameById(TagVar uint, NameVar string) { | ||
| 2306 | + | core.LazyRegister(&xSourceSetNameById, "GLIB", "g_source_set_name_by_id", false) | |||
| 2307 | + | ||||
| 2137 | xSourceSetNameById(TagVar, NameVar) | 2308 | xSourceSetNameById(TagVar, NameVar) | ||
| 2138 | } | 2309 | } | ||
| 2139 | 2310 | ||||
| @@ -2173,6 +2344,7 @@ var xTimeoutAdd func(uint, uintptr, uintptr) uint | |||||
| 2173 | // The interval given is in terms of monotonic time, not wall clock | 2344 | // The interval given is in terms of monotonic time, not wall clock | ||
| 2174 | // time. See [func@GLib.get_monotonic_time]. | 2345 | // time. See [func@GLib.get_monotonic_time]. | ||
| 2175 | func TimeoutAdd(IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr) uint { | 2346 | func TimeoutAdd(IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr) uint { | ||
| 2347 | + | core.LazyRegister(&xTimeoutAdd, "GLIB", "g_timeout_add", false) | |||
| 2176 | var functionRef uintptr | 2348 | var functionRef uintptr | ||
| 2177 | if FunctionVar != nil { | 2349 | if FunctionVar != nil { | ||
| 2178 | functionRef = sourceFuncTrampolineCb | 2350 | functionRef = sourceFuncTrampolineCb | ||
| @@ -2213,6 +2385,7 @@ var xTimeoutAddFull func(int, uint, uintptr, uintptr, uintptr) uint | |||||
| 2213 | // The interval given is in terms of monotonic time, not wall clock time. | 2385 | // The interval given is in terms of monotonic time, not wall clock time. | ||
| 2214 | // See [func@GLib.get_monotonic_time]. | 2386 | // See [func@GLib.get_monotonic_time]. | ||
| 2215 | func TimeoutAddFull(PriorityVar int, IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | 2387 | func TimeoutAddFull(PriorityVar int, IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | ||
| 2388 | + | core.LazyRegister(&xTimeoutAddFull, "GLIB", "g_timeout_add_full", false) | |||
| 2216 | var functionRef uintptr | 2389 | var functionRef uintptr | ||
| 2217 | if FunctionVar != nil { | 2390 | if FunctionVar != nil { | ||
| 2218 | functionRef = sourceFuncTrampolineCb | 2391 | functionRef = sourceFuncTrampolineCb | ||
| @@ -2232,6 +2405,7 @@ var xTimeoutAddOnce func(uint, uintptr, uintptr) uint | |||||
| 2232 | // | 2405 | // | ||
| 2233 | // This function otherwise behaves like [func@GLib.timeout_add]. | 2406 | // This function otherwise behaves like [func@GLib.timeout_add]. | ||
| 2234 | func TimeoutAddOnce(IntervalVar uint, FunctionVar *SourceOnceFunc, DataVar uintptr) uint { | 2407 | func TimeoutAddOnce(IntervalVar uint, FunctionVar *SourceOnceFunc, DataVar uintptr) uint { | ||
| 2408 | + | core.LazyRegister(&xTimeoutAddOnce, "GLIB", "g_timeout_add_once", false) | |||
| 2235 | var functionRef uintptr | 2409 | var functionRef uintptr | ||
| 2236 | if FunctionVar != nil { | 2410 | if FunctionVar != nil { | ||
| 2237 | functionRef = sourceOnceFuncTrampolineCb | 2411 | functionRef = sourceOnceFuncTrampolineCb | ||
| @@ -2267,6 +2441,7 @@ var xTimeoutAddSeconds func(uint, uintptr, uintptr) uint | |||||
| 2267 | // The interval given is in terms of monotonic time, not wall clock | 2441 | // The interval given is in terms of monotonic time, not wall clock | ||
| 2268 | // time. See [func@GLib.get_monotonic_time]. | 2442 | // time. See [func@GLib.get_monotonic_time]. | ||
| 2269 | func TimeoutAddSeconds(IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr) uint { | 2443 | func TimeoutAddSeconds(IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr) uint { | ||
| 2444 | + | core.LazyRegister(&xTimeoutAddSeconds, "GLIB", "g_timeout_add_seconds", false) | |||
| 2270 | var functionRef uintptr | 2445 | var functionRef uintptr | ||
| 2271 | if FunctionVar != nil { | 2446 | if FunctionVar != nil { | ||
| 2272 | functionRef = sourceFuncTrampolineCb | 2447 | functionRef = sourceFuncTrampolineCb | ||
| @@ -2319,6 +2494,7 @@ var xTimeoutAddSecondsFull func(int, uint, uintptr, uintptr, uintptr) uint | |||||
| 2319 | // The interval given is in terms of monotonic time, not wall clock | 2494 | // The interval given is in terms of monotonic time, not wall clock | ||
| 2320 | // time. See [func@GLib.get_monotonic_time]. | 2495 | // time. See [func@GLib.get_monotonic_time]. | ||
| 2321 | func TimeoutAddSecondsFull(PriorityVar int, IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | 2496 | func TimeoutAddSecondsFull(PriorityVar int, IntervalVar uint, FunctionVar *SourceFunc, DataVar uintptr, NotifyVar *DestroyNotify) uint { | ||
| 2497 | + | core.LazyRegister(&xTimeoutAddSecondsFull, "GLIB", "g_timeout_add_seconds_full", false) | |||
| 2322 | var functionRef uintptr | 2498 | var functionRef uintptr | ||
| 2323 | if FunctionVar != nil { | 2499 | if FunctionVar != nil { | ||
| 2324 | functionRef = sourceFuncTrampolineCb | 2500 | functionRef = sourceFuncTrampolineCb | ||
| @@ -2333,6 +2509,7 @@ var xTimeoutAddSecondsOnce func(uint, uintptr, uintptr) uint | |||||
| 2333 | // This function behaves like [func@GLib.timeout_add_once] but with a range in | 2509 | // This function behaves like [func@GLib.timeout_add_once] but with a range in | ||
| 2334 | // seconds. | 2510 | // seconds. | ||
| 2335 | func TimeoutAddSecondsOnce(IntervalVar uint, FunctionVar *SourceOnceFunc, DataVar uintptr) uint { | 2511 | func TimeoutAddSecondsOnce(IntervalVar uint, FunctionVar *SourceOnceFunc, DataVar uintptr) uint { | ||
| 2512 | + | core.LazyRegister(&xTimeoutAddSecondsOnce, "GLIB", "g_timeout_add_seconds_once", false) | |||
| 2336 | var functionRef uintptr | 2513 | var functionRef uintptr | ||
| 2337 | if FunctionVar != nil { | 2514 | if FunctionVar != nil { | ||
| 2338 | functionRef = sourceOnceFuncTrampolineCb | 2515 | functionRef = sourceOnceFuncTrampolineCb | ||
| @@ -2353,6 +2530,8 @@ var xTimeoutSourceNew func(uint) uintptr | |||||
| 2353 | // The interval given is in terms of monotonic time, not wall clock | 2530 | // The interval given is in terms of monotonic time, not wall clock | ||
| 2354 | // time. See [func@GLib.get_monotonic_time]. | 2531 | // time. See [func@GLib.get_monotonic_time]. | ||
| 2355 | func TimeoutSourceNew(IntervalVar uint) *Source { | 2532 | func TimeoutSourceNew(IntervalVar uint) *Source { | ||
| 2533 | + | core.LazyRegister(&xTimeoutSourceNew, "GLIB", "g_timeout_source_new", false) | |||
| 2534 | + | ||||
| 2356 | cret := xTimeoutSourceNew(IntervalVar) | 2535 | cret := xTimeoutSourceNew(IntervalVar) | ||
| 2357 | if cret == 0 { | 2536 | if cret == 0 { | ||
| 2358 | return nil | 2537 | return nil | ||
| @@ -2374,6 +2553,8 @@ var xTimeoutSourceNewSeconds func(uint) uintptr | |||||
| 2374 | // The interval given is in terms of monotonic time, not wall clock time. | 2553 | // The interval given is in terms of monotonic time, not wall clock time. | ||
| 2375 | // See [func@GLib.get_monotonic_time]. | 2554 | // See [func@GLib.get_monotonic_time]. | ||
| 2376 | func TimeoutSourceNewSeconds(IntervalVar uint) *Source { | 2555 | func TimeoutSourceNewSeconds(IntervalVar uint) *Source { | ||
| 2556 | + | core.LazyRegister(&xTimeoutSourceNewSeconds, "GLIB", "g_timeout_source_new_seconds", false) | |||
| 2557 | + | ||||
| 2377 | cret := xTimeoutSourceNewSeconds(IntervalVar) | 2558 | cret := xTimeoutSourceNewSeconds(IntervalVar) | ||
| 2378 | if cret == 0 { | 2559 | if cret == 0 { | ||
| 2379 | return nil | 2560 | return nil | ||
| @@ -2384,121 +2565,4 @@ func TimeoutSourceNewSeconds(IntervalVar uint) *Source { | |||||
| 2384 | func init() { | 2565 | func init() { | ||
| 2385 | core.SetPackageName("GLIB", "glib-2.0") | 2566 | core.SetPackageName("GLIB", "glib-2.0") | ||
| 2386 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | 2567 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | ||
| 2387 | - | var libs []uintptr | |||
| 2388 | - | for _, libPath := range core.GetPaths("GLIB") { | |||
| 2389 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 2390 | - | if err != nil { | |||
| 2391 | - | panic(err) | |||
| 2392 | - | } | |||
| 2393 | - | libs = append(libs, lib) | |||
| 2394 | - | } | |||
| 2395 | - | ||||
| 2396 | - | core.PuregoSafeRegister(&xChildWatchAdd, libs, "g_child_watch_add") | |||
| 2397 | - | core.PuregoSafeRegister(&xChildWatchAddFull, libs, "g_child_watch_add_full") | |||
| 2398 | - | core.PuregoSafeRegister(&xChildWatchSourceNew, libs, "g_child_watch_source_new") | |||
| 2399 | - | core.PuregoSafeRegister(&xClearHandleId, libs, "g_clear_handle_id") | |||
| 2400 | - | core.PuregoSafeRegister(&xGetCurrentTime, libs, "g_get_current_time") | |||
| 2401 | - | core.PuregoSafeRegister(&xGetMonotonicTime, libs, "g_get_monotonic_time") | |||
| 2402 | - | core.PuregoSafeRegister(&xGetMonotonicTimeNs, libs, "g_get_monotonic_time_ns") | |||
| 2403 | - | core.PuregoSafeRegister(&xGetRealTime, libs, "g_get_real_time") | |||
| 2404 | - | core.PuregoSafeRegister(&xIdleAdd, libs, "g_idle_add") | |||
| 2405 | - | core.PuregoSafeRegister(&xIdleAddFull, libs, "g_idle_add_full") | |||
| 2406 | - | core.PuregoSafeRegister(&xIdleAddOnce, libs, "g_idle_add_once") | |||
| 2407 | - | core.PuregoSafeRegister(&xIdleRemoveByData, libs, "g_idle_remove_by_data") | |||
| 2408 | - | core.PuregoSafeRegister(&xIdleSourceNew, libs, "g_idle_source_new") | |||
| 2409 | - | core.PuregoSafeRegister(&xMainContextDefault, libs, "g_main_context_default") | |||
| 2410 | - | core.PuregoSafeRegister(&xMainContextGetThreadDefault, libs, "g_main_context_get_thread_default") | |||
| 2411 | - | core.PuregoSafeRegister(&xMainContextRefThreadDefault, libs, "g_main_context_ref_thread_default") | |||
| 2412 | - | core.PuregoSafeRegister(&xMainCurrentSource, libs, "g_main_current_source") | |||
| 2413 | - | core.PuregoSafeRegister(&xMainDepth, libs, "g_main_depth") | |||
| 2414 | - | core.PuregoSafeRegister(&xSourceRemove, libs, "g_source_remove") | |||
| 2415 | - | core.PuregoSafeRegister(&xSourceRemoveByFuncsUserData, libs, "g_source_remove_by_funcs_user_data") | |||
| 2416 | - | core.PuregoSafeRegister(&xSourceRemoveByUserData, libs, "g_source_remove_by_user_data") | |||
| 2417 | - | core.PuregoSafeRegister(&xSourceSetNameById, libs, "g_source_set_name_by_id") | |||
| 2418 | - | core.PuregoSafeRegister(&xTimeoutAdd, libs, "g_timeout_add") | |||
| 2419 | - | core.PuregoSafeRegister(&xTimeoutAddFull, libs, "g_timeout_add_full") | |||
| 2420 | - | core.PuregoSafeRegister(&xTimeoutAddOnce, libs, "g_timeout_add_once") | |||
| 2421 | - | core.PuregoSafeRegister(&xTimeoutAddSeconds, libs, "g_timeout_add_seconds") | |||
| 2422 | - | core.PuregoSafeRegister(&xTimeoutAddSecondsFull, libs, "g_timeout_add_seconds_full") | |||
| 2423 | - | core.PuregoSafeRegister(&xTimeoutAddSecondsOnce, libs, "g_timeout_add_seconds_once") | |||
| 2424 | - | core.PuregoSafeRegister(&xTimeoutSourceNew, libs, "g_timeout_source_new") | |||
| 2425 | - | core.PuregoSafeRegister(&xTimeoutSourceNewSeconds, libs, "g_timeout_source_new_seconds") | |||
| 2426 | - | ||||
| 2427 | - | core.PuregoSafeRegister(&xMainContextGLibType, libs, "g_main_context_get_type") | |||
| 2428 | - | ||||
| 2429 | - | core.PuregoSafeRegister(&xNewMainContext, libs, "g_main_context_new") | |||
| 2430 | - | core.PuregoSafeRegister(&xNewMainContextWithFlags, libs, "g_main_context_new_with_flags") | |||
| 2431 | - | ||||
| 2432 | - | core.PuregoSafeRegister(&xMainContextAcquire, libs, "g_main_context_acquire") | |||
| 2433 | - | core.PuregoSafeRegister(&xMainContextAddPoll, libs, "g_main_context_add_poll") | |||
| 2434 | - | core.PuregoSafeRegister(&xMainContextCheck, libs, "g_main_context_check") | |||
| 2435 | - | core.PuregoSafeRegister(&xMainContextDispatch, libs, "g_main_context_dispatch") | |||
| 2436 | - | core.PuregoSafeRegister(&xMainContextFindSourceByFuncsUserData, libs, "g_main_context_find_source_by_funcs_user_data") | |||
| 2437 | - | core.PuregoSafeRegister(&xMainContextFindSourceById, libs, "g_main_context_find_source_by_id") | |||
| 2438 | - | core.PuregoSafeRegister(&xMainContextFindSourceByUserData, libs, "g_main_context_find_source_by_user_data") | |||
| 2439 | - | core.PuregoSafeRegister(&xMainContextGetPollFunc, libs, "g_main_context_get_poll_func") | |||
| 2440 | - | core.PuregoSafeRegister(&xMainContextInvoke, libs, "g_main_context_invoke") | |||
| 2441 | - | core.PuregoSafeRegister(&xMainContextInvokeFull, libs, "g_main_context_invoke_full") | |||
| 2442 | - | core.PuregoSafeRegister(&xMainContextIsOwner, libs, "g_main_context_is_owner") | |||
| 2443 | - | core.PuregoSafeRegister(&xMainContextIteration, libs, "g_main_context_iteration") | |||
| 2444 | - | core.PuregoSafeRegister(&xMainContextPending, libs, "g_main_context_pending") | |||
| 2445 | - | core.PuregoSafeRegister(&xMainContextPopThreadDefault, libs, "g_main_context_pop_thread_default") | |||
| 2446 | - | core.PuregoSafeRegister(&xMainContextPrepare, libs, "g_main_context_prepare") | |||
| 2447 | - | core.PuregoSafeRegister(&xMainContextPushThreadDefault, libs, "g_main_context_push_thread_default") | |||
| 2448 | - | core.PuregoSafeRegister(&xMainContextPusherNew, libs, "g_main_context_pusher_new") | |||
| 2449 | - | core.PuregoSafeRegister(&xMainContextQuery, libs, "g_main_context_query") | |||
| 2450 | - | core.PuregoSafeRegister(&xMainContextRef, libs, "g_main_context_ref") | |||
| 2451 | - | core.PuregoSafeRegister(&xMainContextRelease, libs, "g_main_context_release") | |||
| 2452 | - | core.PuregoSafeRegister(&xMainContextRemovePoll, libs, "g_main_context_remove_poll") | |||
| 2453 | - | core.PuregoSafeRegister(&xMainContextSetPollFunc, libs, "g_main_context_set_poll_func") | |||
| 2454 | - | core.PuregoSafeRegister(&xMainContextUnref, libs, "g_main_context_unref") | |||
| 2455 | - | core.PuregoSafeRegister(&xMainContextWait, libs, "g_main_context_wait") | |||
| 2456 | - | core.PuregoSafeRegister(&xMainContextWakeup, libs, "g_main_context_wakeup") | |||
| 2457 | - | ||||
| 2458 | - | core.PuregoSafeRegister(&xMainLoopGLibType, libs, "g_main_loop_get_type") | |||
| 2459 | - | ||||
| 2460 | - | core.PuregoSafeRegister(&xNewMainLoop, libs, "g_main_loop_new") | |||
| 2461 | - | ||||
| 2462 | - | core.PuregoSafeRegister(&xMainLoopGetContext, libs, "g_main_loop_get_context") | |||
| 2463 | - | core.PuregoSafeRegister(&xMainLoopIsRunning, libs, "g_main_loop_is_running") | |||
| 2464 | - | core.PuregoSafeRegister(&xMainLoopQuit, libs, "g_main_loop_quit") | |||
| 2465 | - | core.PuregoSafeRegister(&xMainLoopRef, libs, "g_main_loop_ref") | |||
| 2466 | - | core.PuregoSafeRegister(&xMainLoopRun, libs, "g_main_loop_run") | |||
| 2467 | - | core.PuregoSafeRegister(&xMainLoopUnref, libs, "g_main_loop_unref") | |||
| 2468 | - | ||||
| 2469 | - | core.PuregoSafeRegister(&xSourceGLibType, libs, "g_source_get_type") | |||
| 2470 | - | ||||
| 2471 | - | core.PuregoSafeRegister(&xNewSource, libs, "g_source_new") | |||
| 2472 | - | ||||
| 2473 | - | core.PuregoSafeRegister(&xSourceAddChildSource, libs, "g_source_add_child_source") | |||
| 2474 | - | core.PuregoSafeRegister(&xSourceAddPoll, libs, "g_source_add_poll") | |||
| 2475 | - | core.PuregoSafeRegister(&xSourceAddUnixFd, libs, "g_source_add_unix_fd") | |||
| 2476 | - | core.PuregoSafeRegister(&xSourceAttach, libs, "g_source_attach") | |||
| 2477 | - | core.PuregoSafeRegister(&xSourceDestroy, libs, "g_source_destroy") | |||
| 2478 | - | core.PuregoSafeRegister(&xSourceDupContext, libs, "g_source_dup_context") | |||
| 2479 | - | core.PuregoSafeRegister(&xSourceGetCanRecurse, libs, "g_source_get_can_recurse") | |||
| 2480 | - | core.PuregoSafeRegister(&xSourceGetContext, libs, "g_source_get_context") | |||
| 2481 | - | core.PuregoSafeRegister(&xSourceGetCurrentTime, libs, "g_source_get_current_time") | |||
| 2482 | - | core.PuregoSafeRegister(&xSourceGetId, libs, "g_source_get_id") | |||
| 2483 | - | core.PuregoSafeRegister(&xSourceGetName, libs, "g_source_get_name") | |||
| 2484 | - | core.PuregoSafeRegister(&xSourceGetPriority, libs, "g_source_get_priority") | |||
| 2485 | - | core.PuregoSafeRegister(&xSourceGetReadyTime, libs, "g_source_get_ready_time") | |||
| 2486 | - | core.PuregoSafeRegister(&xSourceGetTime, libs, "g_source_get_time") | |||
| 2487 | - | core.PuregoSafeRegister(&xSourceIsDestroyed, libs, "g_source_is_destroyed") | |||
| 2488 | - | core.PuregoSafeRegister(&xSourceModifyUnixFd, libs, "g_source_modify_unix_fd") | |||
| 2489 | - | core.PuregoSafeRegister(&xSourceQueryUnixFd, libs, "g_source_query_unix_fd") | |||
| 2490 | - | core.PuregoSafeRegister(&xSourceRef, libs, "g_source_ref") | |||
| 2491 | - | core.PuregoSafeRegister(&xSourceRemoveChildSource, libs, "g_source_remove_child_source") | |||
| 2492 | - | core.PuregoSafeRegister(&xSourceRemovePoll, libs, "g_source_remove_poll") | |||
| 2493 | - | core.PuregoSafeRegister(&xSourceRemoveUnixFd, libs, "g_source_remove_unix_fd") | |||
| 2494 | - | core.PuregoSafeRegister(&xSourceSetCallback, libs, "g_source_set_callback") | |||
| 2495 | - | core.PuregoSafeRegister(&xSourceSetCallbackIndirect, libs, "g_source_set_callback_indirect") | |||
| 2496 | - | core.PuregoSafeRegister(&xSourceSetCanRecurse, libs, "g_source_set_can_recurse") | |||
| 2497 | - | core.PuregoSafeRegister(&xSourceSetDisposeFunction, libs, "g_source_set_dispose_function") | |||
| 2498 | - | core.PuregoSafeRegister(&xSourceSetFuncs, libs, "g_source_set_funcs") | |||
| 2499 | - | core.PuregoSafeRegister(&xSourceSetName, libs, "g_source_set_name") | |||
| 2500 | - | core.PuregoSafeRegister(&xSourceSetPriority, libs, "g_source_set_priority") | |||
| 2501 | - | core.PuregoSafeRegister(&xSourceSetReadyTime, libs, "g_source_set_ready_time") | |||
| 2502 | - | core.PuregoSafeRegister(&xSourceSetStaticName, libs, "g_source_set_static_name") | |||
| 2503 | - | core.PuregoSafeRegister(&xSourceUnref, libs, "g_source_unref") | |||
| 2504 | } | 2568 | } | ||