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
| @@ -5,7 +5,6 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | - | "github.com/bnema/purego" | |
| 9 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/gobject/types" | |
| 11 | 10 | ) | |
| @@ -42,6 +41,7 @@ type DateTime struct { | |||
| 42 | 41 | var xDateTimeGLibType func() types.GType | |
| 43 | 42 | ||
| 44 | 43 | func DateTimeGLibType() types.GType { | |
| 44 | + | core.LazyRegister(&xDateTimeGLibType, "GLIB", "g_date_time_get_type", false) | |
| 45 | 45 | return xDateTimeGLibType() | |
| 46 | 46 | } | |
| 47 | 47 | ||
| @@ -88,6 +88,8 @@ var xNewDateTime func(*TimeZone, int, int, int, int, int, float64) uintptr | |||
| 88 | 88 | // You should release the return value by calling g_date_time_unref() | |
| 89 | 89 | // when you are done with it. | |
| 90 | 90 | func NewDateTime(TzVar *TimeZone, YearVar int, MonthVar int, DayVar int, HourVar int, MinuteVar int, SecondsVar float64) *DateTime { | |
| 91 | + | core.LazyRegister(&xNewDateTime, "GLIB", "g_date_time_new", false) | |
| 92 | + | ||
| 91 | 93 | cret := xNewDateTime(TzVar, YearVar, MonthVar, DayVar, HourVar, MinuteVar, SecondsVar) | |
| 92 | 94 | if cret == 0 { | |
| 93 | 95 | return nil | |
| @@ -141,6 +143,8 @@ var xNewDateTimeFromIso8601 func(string, *TimeZone) uintptr | |||
| 141 | 143 | // You should release the return value by calling g_date_time_unref() | |
| 142 | 144 | // when you are done with it. | |
| 143 | 145 | func NewDateTimeFromIso8601(TextVar string, DefaultTzVar *TimeZone) *DateTime { | |
| 146 | + | core.LazyRegister(&xNewDateTimeFromIso8601, "GLIB", "g_date_time_new_from_iso8601", false) | |
| 147 | + | ||
| 144 | 148 | cret := xNewDateTimeFromIso8601(TextVar, DefaultTzVar) | |
| 145 | 149 | if cret == 0 { | |
| 146 | 150 | return nil | |
| @@ -163,6 +167,8 @@ var xNewDateTimeFromTimevalLocal func(*TimeVal) uintptr | |||
| 163 | 167 | // You should release the return value by calling g_date_time_unref() | |
| 164 | 168 | // when you are done with it. | |
| 165 | 169 | func NewDateTimeFromTimevalLocal(TvVar *TimeVal) *DateTime { | |
| 170 | + | core.LazyRegister(&xNewDateTimeFromTimevalLocal, "GLIB", "g_date_time_new_from_timeval_local", false) | |
| 171 | + | ||
| 166 | 172 | cret := xNewDateTimeFromTimevalLocal(TvVar) | |
| 167 | 173 | if cret == 0 { | |
| 168 | 174 | return nil | |
| @@ -183,6 +189,8 @@ var xNewDateTimeFromTimevalUtc func(*TimeVal) uintptr | |||
| 183 | 189 | // You should release the return value by calling g_date_time_unref() | |
| 184 | 190 | // when you are done with it. | |
| 185 | 191 | func NewDateTimeFromTimevalUtc(TvVar *TimeVal) *DateTime { | |
| 192 | + | core.LazyRegister(&xNewDateTimeFromTimevalUtc, "GLIB", "g_date_time_new_from_timeval_utc", false) | |
| 193 | + | ||
| 186 | 194 | cret := xNewDateTimeFromTimevalUtc(TvVar) | |
| 187 | 195 | if cret == 0 { | |
| 188 | 196 | return nil | |
| @@ -204,6 +212,8 @@ var xNewDateTimeFromUnixLocal func(int64) uintptr | |||
| 204 | 212 | // You should release the return value by calling g_date_time_unref() | |
| 205 | 213 | // when you are done with it. | |
| 206 | 214 | func NewDateTimeFromUnixLocal(TVar int64) *DateTime { | |
| 215 | + | core.LazyRegister(&xNewDateTimeFromUnixLocal, "GLIB", "g_date_time_new_from_unix_local", false) | |
| 216 | + | ||
| 207 | 217 | cret := xNewDateTimeFromUnixLocal(TVar) | |
| 208 | 218 | if cret == 0 { | |
| 209 | 219 | return nil | |
| @@ -225,6 +235,8 @@ var xNewDateTimeFromUnixLocalUsec func(int64) uintptr | |||
| 225 | 235 | // You should release the return value by calling [method@GLib.DateTime.unref] | |
| 226 | 236 | // when you are done with it. | |
| 227 | 237 | func NewDateTimeFromUnixLocalUsec(UsecsVar int64) *DateTime { | |
| 238 | + | core.LazyRegister(&xNewDateTimeFromUnixLocalUsec, "GLIB", "g_date_time_new_from_unix_local_usec", false) | |
| 239 | + | ||
| 228 | 240 | cret := xNewDateTimeFromUnixLocalUsec(UsecsVar) | |
| 229 | 241 | if cret == 0 { | |
| 230 | 242 | return nil | |
| @@ -245,6 +257,8 @@ var xNewDateTimeFromUnixUtc func(int64) uintptr | |||
| 245 | 257 | // You should release the return value by calling g_date_time_unref() | |
| 246 | 258 | // when you are done with it. | |
| 247 | 259 | func NewDateTimeFromUnixUtc(TVar int64) *DateTime { | |
| 260 | + | core.LazyRegister(&xNewDateTimeFromUnixUtc, "GLIB", "g_date_time_new_from_unix_utc", false) | |
| 261 | + | ||
| 248 | 262 | cret := xNewDateTimeFromUnixUtc(TVar) | |
| 249 | 263 | if cret == 0 { | |
| 250 | 264 | return nil | |
| @@ -265,6 +279,8 @@ var xNewDateTimeFromUnixUtcUsec func(int64) uintptr | |||
| 265 | 279 | // You should release the return value by calling [method@GLib.DateTime.unref] | |
| 266 | 280 | // when you are done with it. | |
| 267 | 281 | func NewDateTimeFromUnixUtcUsec(UsecsVar int64) *DateTime { | |
| 282 | + | core.LazyRegister(&xNewDateTimeFromUnixUtcUsec, "GLIB", "g_date_time_new_from_unix_utc_usec", false) | |
| 283 | + | ||
| 268 | 284 | cret := xNewDateTimeFromUnixUtcUsec(UsecsVar) | |
| 269 | 285 | if cret == 0 { | |
| 270 | 286 | return nil | |
| @@ -280,6 +296,8 @@ var xNewDateTimeLocal func(int, int, int, int, int, float64) uintptr | |||
| 280 | 296 | // This call is equivalent to calling g_date_time_new() with the time | |
| 281 | 297 | // zone returned by g_time_zone_new_local(). | |
| 282 | 298 | func NewDateTimeLocal(YearVar int, MonthVar int, DayVar int, HourVar int, MinuteVar int, SecondsVar float64) *DateTime { | |
| 299 | + | core.LazyRegister(&xNewDateTimeLocal, "GLIB", "g_date_time_new_local", false) | |
| 300 | + | ||
| 283 | 301 | cret := xNewDateTimeLocal(YearVar, MonthVar, DayVar, HourVar, MinuteVar, SecondsVar) | |
| 284 | 302 | if cret == 0 { | |
| 285 | 303 | return nil | |
| @@ -299,6 +317,8 @@ var xNewDateTimeNow func(*TimeZone) uintptr | |||
| 299 | 317 | // You should release the return value by calling g_date_time_unref() | |
| 300 | 318 | // when you are done with it. | |
| 301 | 319 | func NewDateTimeNow(TzVar *TimeZone) *DateTime { | |
| 320 | + | core.LazyRegister(&xNewDateTimeNow, "GLIB", "g_date_time_new_now", false) | |
| 321 | + | ||
| 302 | 322 | cret := xNewDateTimeNow(TzVar) | |
| 303 | 323 | if cret == 0 { | |
| 304 | 324 | return nil | |
| @@ -314,6 +334,8 @@ var xNewDateTimeNowLocal func() uintptr | |||
| 314 | 334 | // This is equivalent to calling g_date_time_new_now() with the time | |
| 315 | 335 | // zone returned by g_time_zone_new_local(). | |
| 316 | 336 | func NewDateTimeNowLocal() *DateTime { | |
| 337 | + | core.LazyRegister(&xNewDateTimeNowLocal, "GLIB", "g_date_time_new_now_local", false) | |
| 338 | + | ||
| 317 | 339 | cret := xNewDateTimeNowLocal() | |
| 318 | 340 | if cret == 0 { | |
| 319 | 341 | return nil | |
| @@ -328,6 +350,8 @@ var xNewDateTimeNowUtc func() uintptr | |||
| 328 | 350 | // This is equivalent to calling g_date_time_new_now() with the time | |
| 329 | 351 | // zone returned by g_time_zone_new_utc(). | |
| 330 | 352 | func NewDateTimeNowUtc() *DateTime { | |
| 353 | + | core.LazyRegister(&xNewDateTimeNowUtc, "GLIB", "g_date_time_new_now_utc", false) | |
| 354 | + | ||
| 331 | 355 | cret := xNewDateTimeNowUtc() | |
| 332 | 356 | if cret == 0 { | |
| 333 | 357 | return nil | |
| @@ -343,6 +367,8 @@ var xNewDateTimeUtc func(int, int, int, int, int, float64) uintptr | |||
| 343 | 367 | // This call is equivalent to calling g_date_time_new() with the time | |
| 344 | 368 | // zone returned by g_time_zone_new_utc(). | |
| 345 | 369 | func NewDateTimeUtc(YearVar int, MonthVar int, DayVar int, HourVar int, MinuteVar int, SecondsVar float64) *DateTime { | |
| 370 | + | core.LazyRegister(&xNewDateTimeUtc, "GLIB", "g_date_time_new_utc", false) | |
| 371 | + | ||
| 346 | 372 | cret := xNewDateTimeUtc(YearVar, MonthVar, DayVar, HourVar, MinuteVar, SecondsVar) | |
| 347 | 373 | if cret == 0 { | |
| 348 | 374 | return nil | |
| @@ -354,6 +380,8 @@ var xDateTimeAdd func(uintptr, TimeSpan) uintptr | |||
| 354 | 380 | ||
| 355 | 381 | // Creates a copy of @datetime and adds the specified timespan to the copy. | |
| 356 | 382 | func (x *DateTime) Add(TimespanVar TimeSpan) *DateTime { | |
| 383 | + | core.LazyRegister(&xDateTimeAdd, "GLIB", "g_date_time_add", false) | |
| 384 | + | ||
| 357 | 385 | cret := xDateTimeAdd(x.GoPointer(), TimespanVar) | |
| 358 | 386 | if cret == 0 { | |
| 359 | 387 | return nil | |
| @@ -366,6 +394,8 @@ var xDateTimeAddDays func(uintptr, int) uintptr | |||
| 366 | 394 | // Creates a copy of @datetime and adds the specified number of days to the | |
| 367 | 395 | // copy. Add negative values to subtract days. | |
| 368 | 396 | func (x *DateTime) AddDays(DaysVar int) *DateTime { | |
| 397 | + | core.LazyRegister(&xDateTimeAddDays, "GLIB", "g_date_time_add_days", false) | |
| 398 | + | ||
| 369 | 399 | cret := xDateTimeAddDays(x.GoPointer(), DaysVar) | |
| 370 | 400 | if cret == 0 { | |
| 371 | 401 | return nil | |
| @@ -378,6 +408,8 @@ var xDateTimeAddFull func(uintptr, int, int, int, int, int, float64) uintptr | |||
| 378 | 408 | // Creates a new #GDateTime adding the specified values to the current date and | |
| 379 | 409 | // time in @datetime. Add negative values to subtract. | |
| 380 | 410 | func (x *DateTime) AddFull(YearsVar int, MonthsVar int, DaysVar int, HoursVar int, MinutesVar int, SecondsVar float64) *DateTime { | |
| 411 | + | core.LazyRegister(&xDateTimeAddFull, "GLIB", "g_date_time_add_full", false) | |
| 412 | + | ||
| 381 | 413 | cret := xDateTimeAddFull(x.GoPointer(), YearsVar, MonthsVar, DaysVar, HoursVar, MinutesVar, SecondsVar) | |
| 382 | 414 | if cret == 0 { | |
| 383 | 415 | return nil | |
| @@ -390,6 +422,8 @@ var xDateTimeAddHours func(uintptr, int) uintptr | |||
| 390 | 422 | // Creates a copy of @datetime and adds the specified number of hours. | |
| 391 | 423 | // Add negative values to subtract hours. | |
| 392 | 424 | func (x *DateTime) AddHours(HoursVar int) *DateTime { | |
| 425 | + | core.LazyRegister(&xDateTimeAddHours, "GLIB", "g_date_time_add_hours", false) | |
| 426 | + | ||
| 393 | 427 | cret := xDateTimeAddHours(x.GoPointer(), HoursVar) | |
| 394 | 428 | if cret == 0 { | |
| 395 | 429 | return nil | |
| @@ -402,6 +436,8 @@ var xDateTimeAddMinutes func(uintptr, int) uintptr | |||
| 402 | 436 | // Creates a copy of @datetime adding the specified number of minutes. | |
| 403 | 437 | // Add negative values to subtract minutes. | |
| 404 | 438 | func (x *DateTime) AddMinutes(MinutesVar int) *DateTime { | |
| 439 | + | core.LazyRegister(&xDateTimeAddMinutes, "GLIB", "g_date_time_add_minutes", false) | |
| 440 | + | ||
| 405 | 441 | cret := xDateTimeAddMinutes(x.GoPointer(), MinutesVar) | |
| 406 | 442 | if cret == 0 { | |
| 407 | 443 | return nil | |
| @@ -419,6 +455,8 @@ var xDateTimeAddMonths func(uintptr, int) uintptr | |||
| 419 | 455 | // 31st January 2018, the result would be 28th February 2018. In 2020 (a leap | |
| 420 | 456 | // year), the result would be 29th February. | |
| 421 | 457 | func (x *DateTime) AddMonths(MonthsVar int) *DateTime { | |
| 458 | + | core.LazyRegister(&xDateTimeAddMonths, "GLIB", "g_date_time_add_months", false) | |
| 459 | + | ||
| 422 | 460 | cret := xDateTimeAddMonths(x.GoPointer(), MonthsVar) | |
| 423 | 461 | if cret == 0 { | |
| 424 | 462 | return nil | |
| @@ -431,6 +469,8 @@ var xDateTimeAddSeconds func(uintptr, float64) uintptr | |||
| 431 | 469 | // Creates a copy of @datetime and adds the specified number of seconds. | |
| 432 | 470 | // Add negative values to subtract seconds. | |
| 433 | 471 | func (x *DateTime) AddSeconds(SecondsVar float64) *DateTime { | |
| 472 | + | core.LazyRegister(&xDateTimeAddSeconds, "GLIB", "g_date_time_add_seconds", false) | |
| 473 | + | ||
| 434 | 474 | cret := xDateTimeAddSeconds(x.GoPointer(), SecondsVar) | |
| 435 | 475 | if cret == 0 { | |
| 436 | 476 | return nil | |
| @@ -443,6 +483,8 @@ var xDateTimeAddWeeks func(uintptr, int) uintptr | |||
| 443 | 483 | // Creates a copy of @datetime and adds the specified number of weeks to the | |
| 444 | 484 | // copy. Add negative values to subtract weeks. | |
| 445 | 485 | func (x *DateTime) AddWeeks(WeeksVar int) *DateTime { | |
| 486 | + | core.LazyRegister(&xDateTimeAddWeeks, "GLIB", "g_date_time_add_weeks", false) | |
| 487 | + | ||
| 446 | 488 | cret := xDateTimeAddWeeks(x.GoPointer(), WeeksVar) | |
| 447 | 489 | if cret == 0 { | |
| 448 | 490 | return nil | |
| @@ -458,6 +500,8 @@ var xDateTimeAddYears func(uintptr, int) uintptr | |||
| 458 | 500 | // As with g_date_time_add_months(), if the resulting date would be 29th | |
| 459 | 501 | // February on a non-leap year, the day will be clamped to 28th February. | |
| 460 | 502 | func (x *DateTime) AddYears(YearsVar int) *DateTime { | |
| 503 | + | core.LazyRegister(&xDateTimeAddYears, "GLIB", "g_date_time_add_years", false) | |
| 504 | + | ||
| 461 | 505 | cret := xDateTimeAddYears(x.GoPointer(), YearsVar) | |
| 462 | 506 | if cret == 0 { | |
| 463 | 507 | return nil | |
| @@ -470,6 +514,8 @@ var xDateTimeCompare func(uintptr, uintptr) int | |||
| 470 | 514 | // A comparison function for #GDateTimes that is suitable | |
| 471 | 515 | // as a #GCompareFunc. Both #GDateTimes must be non-%NULL. | |
| 472 | 516 | func (x *DateTime) Compare(Dt2Var uintptr) int { | |
| 517 | + | core.LazyRegister(&xDateTimeCompare, "GLIB", "g_date_time_compare", false) | |
| 518 | + | ||
| 473 | 519 | cret := xDateTimeCompare(x.GoPointer(), Dt2Var) | |
| 474 | 520 | return cret | |
| 475 | 521 | } | |
| @@ -480,6 +526,8 @@ var xDateTimeDifference func(uintptr, *DateTime) TimeSpan | |||
| 480 | 526 | // #GTimeSpan that is returned is effectively @end - @begin (ie: | |
| 481 | 527 | // positive if the first parameter is larger). | |
| 482 | 528 | func (x *DateTime) Difference(BeginVar *DateTime) TimeSpan { | |
| 529 | + | core.LazyRegister(&xDateTimeDifference, "GLIB", "g_date_time_difference", false) | |
| 530 | + | ||
| 483 | 531 | cret := xDateTimeDifference(x.GoPointer(), BeginVar) | |
| 484 | 532 | return cret | |
| 485 | 533 | } | |
| @@ -491,6 +539,8 @@ var xDateTimeEqual func(uintptr, uintptr) bool | |||
| 491 | 539 | // Equal here means that they represent the same moment after converting | |
| 492 | 540 | // them to the same time zone. | |
| 493 | 541 | func (x *DateTime) Equal(Dt2Var uintptr) bool { | |
| 542 | + | core.LazyRegister(&xDateTimeEqual, "GLIB", "g_date_time_equal", false) | |
| 543 | + | ||
| 494 | 544 | cret := xDateTimeEqual(x.GoPointer(), Dt2Var) | |
| 495 | 545 | return cret | |
| 496 | 546 | } | |
| @@ -622,6 +672,8 @@ var xDateTimeFormat func(uintptr, string) string | |||
| 622 | 672 | // specifier | |
| 623 | 673 | // - `%EY`: the full alternative year representation | |
| 624 | 674 | func (x *DateTime) Format(FormatVar string) string { | |
| 675 | + | core.LazyRegister(&xDateTimeFormat, "GLIB", "g_date_time_format", false) | |
| 676 | + | ||
| 625 | 677 | cret := xDateTimeFormat(x.GoPointer(), FormatVar) | |
| 626 | 678 | return cret | |
| 627 | 679 | } | |
| @@ -634,6 +686,8 @@ var xDateTimeFormatIso8601 func(uintptr) string | |||
| 634 | 686 | // | |
| 635 | 687 | // Since GLib 2.66, this will output to sub-second precision if needed. | |
| 636 | 688 | func (x *DateTime) FormatIso8601() string { | |
| 689 | + | core.LazyRegister(&xDateTimeFormatIso8601, "GLIB", "g_date_time_format_iso8601", false) | |
| 690 | + | ||
| 637 | 691 | cret := xDateTimeFormatIso8601(x.GoPointer()) | |
| 638 | 692 | return cret | |
| 639 | 693 | } | |
| @@ -643,6 +697,8 @@ var xDateTimeGetDayOfMonth func(uintptr) int | |||
| 643 | 697 | // Retrieves the day of the month represented by @datetime in the gregorian | |
| 644 | 698 | // calendar. | |
| 645 | 699 | func (x *DateTime) GetDayOfMonth() int { | |
| 700 | + | core.LazyRegister(&xDateTimeGetDayOfMonth, "GLIB", "g_date_time_get_day_of_month", false) | |
| 701 | + | ||
| 646 | 702 | cret := xDateTimeGetDayOfMonth(x.GoPointer()) | |
| 647 | 703 | return cret | |
| 648 | 704 | } | |
| @@ -652,6 +708,8 @@ var xDateTimeGetDayOfWeek func(uintptr) int | |||
| 652 | 708 | // Retrieves the ISO 8601 day of the week on which @datetime falls (1 is | |
| 653 | 709 | // Monday, 2 is Tuesday... 7 is Sunday). | |
| 654 | 710 | func (x *DateTime) GetDayOfWeek() int { | |
| 711 | + | core.LazyRegister(&xDateTimeGetDayOfWeek, "GLIB", "g_date_time_get_day_of_week", false) | |
| 712 | + | ||
| 655 | 713 | cret := xDateTimeGetDayOfWeek(x.GoPointer()) | |
| 656 | 714 | return cret | |
| 657 | 715 | } | |
| @@ -661,6 +719,8 @@ var xDateTimeGetDayOfYear func(uintptr) int | |||
| 661 | 719 | // Retrieves the day of the year represented by @datetime in the Gregorian | |
| 662 | 720 | // calendar. | |
| 663 | 721 | func (x *DateTime) GetDayOfYear() int { | |
| 722 | + | core.LazyRegister(&xDateTimeGetDayOfYear, "GLIB", "g_date_time_get_day_of_year", false) | |
| 723 | + | ||
| 664 | 724 | cret := xDateTimeGetDayOfYear(x.GoPointer()) | |
| 665 | 725 | return cret | |
| 666 | 726 | } | |
| @@ -669,6 +729,8 @@ var xDateTimeGetHour func(uintptr) int | |||
| 669 | 729 | ||
| 670 | 730 | // Retrieves the hour of the day represented by @datetime | |
| 671 | 731 | func (x *DateTime) GetHour() int { | |
| 732 | + | core.LazyRegister(&xDateTimeGetHour, "GLIB", "g_date_time_get_hour", false) | |
| 733 | + | ||
| 672 | 734 | cret := xDateTimeGetHour(x.GoPointer()) | |
| 673 | 735 | return cret | |
| 674 | 736 | } | |
| @@ -677,6 +739,8 @@ var xDateTimeGetMicrosecond func(uintptr) int | |||
| 677 | 739 | ||
| 678 | 740 | // Retrieves the microsecond of the date represented by @datetime | |
| 679 | 741 | func (x *DateTime) GetMicrosecond() int { | |
| 742 | + | core.LazyRegister(&xDateTimeGetMicrosecond, "GLIB", "g_date_time_get_microsecond", false) | |
| 743 | + | ||
| 680 | 744 | cret := xDateTimeGetMicrosecond(x.GoPointer()) | |
| 681 | 745 | return cret | |
| 682 | 746 | } | |
| @@ -685,6 +749,8 @@ var xDateTimeGetMinute func(uintptr) int | |||
| 685 | 749 | ||
| 686 | 750 | // Retrieves the minute of the hour represented by @datetime | |
| 687 | 751 | func (x *DateTime) GetMinute() int { | |
| 752 | + | core.LazyRegister(&xDateTimeGetMinute, "GLIB", "g_date_time_get_minute", false) | |
| 753 | + | ||
| 688 | 754 | cret := xDateTimeGetMinute(x.GoPointer()) | |
| 689 | 755 | return cret | |
| 690 | 756 | } | |
| @@ -694,6 +760,8 @@ var xDateTimeGetMonth func(uintptr) int | |||
| 694 | 760 | // Retrieves the month of the year represented by @datetime in the Gregorian | |
| 695 | 761 | // calendar. | |
| 696 | 762 | func (x *DateTime) GetMonth() int { | |
| 763 | + | core.LazyRegister(&xDateTimeGetMonth, "GLIB", "g_date_time_get_month", false) | |
| 764 | + | ||
| 697 | 765 | cret := xDateTimeGetMonth(x.GoPointer()) | |
| 698 | 766 | return cret | |
| 699 | 767 | } | |
| @@ -702,6 +770,8 @@ var xDateTimeGetSecond func(uintptr) int | |||
| 702 | 770 | ||
| 703 | 771 | // Retrieves the second of the minute represented by @datetime | |
| 704 | 772 | func (x *DateTime) GetSecond() int { | |
| 773 | + | core.LazyRegister(&xDateTimeGetSecond, "GLIB", "g_date_time_get_second", false) | |
| 774 | + | ||
| 705 | 775 | cret := xDateTimeGetSecond(x.GoPointer()) | |
| 706 | 776 | return cret | |
| 707 | 777 | } | |
| @@ -711,6 +781,8 @@ var xDateTimeGetSeconds func(uintptr) float64 | |||
| 711 | 781 | // Retrieves the number of seconds since the start of the last minute, | |
| 712 | 782 | // including the fractional part. | |
| 713 | 783 | func (x *DateTime) GetSeconds() float64 { | |
| 784 | + | core.LazyRegister(&xDateTimeGetSeconds, "GLIB", "g_date_time_get_seconds", false) | |
| 785 | + | ||
| 714 | 786 | cret := xDateTimeGetSeconds(x.GoPointer()) | |
| 715 | 787 | return cret | |
| 716 | 788 | } | |
| @@ -719,6 +791,8 @@ var xDateTimeGetTimezone func(uintptr) uintptr | |||
| 719 | 791 | ||
| 720 | 792 | // Get the time zone for this @datetime. | |
| 721 | 793 | func (x *DateTime) GetTimezone() *TimeZone { | |
| 794 | + | core.LazyRegister(&xDateTimeGetTimezone, "GLIB", "g_date_time_get_timezone", false) | |
| 795 | + | ||
| 722 | 796 | cret := xDateTimeGetTimezone(x.GoPointer()) | |
| 723 | 797 | if cret == 0 { | |
| 724 | 798 | return nil | |
| @@ -735,6 +809,8 @@ var xDateTimeGetTimezoneAbbreviation func(uintptr) string | |||
| 735 | 809 | // months and "EDT" during the summer months when daylight savings | |
| 736 | 810 | // time is in effect. | |
| 737 | 811 | func (x *DateTime) GetTimezoneAbbreviation() string { | |
| 812 | + | core.LazyRegister(&xDateTimeGetTimezoneAbbreviation, "GLIB", "g_date_time_get_timezone_abbreviation", false) | |
| 813 | + | ||
| 738 | 814 | cret := xDateTimeGetTimezoneAbbreviation(x.GoPointer()) | |
| 739 | 815 | return cret | |
| 740 | 816 | } | |
| @@ -750,6 +826,8 @@ var xDateTimeGetUtcOffset func(uintptr) TimeSpan | |||
| 750 | 826 | // | |
| 751 | 827 | // If @datetime represents UTC time, then the offset is always zero. | |
| 752 | 828 | func (x *DateTime) GetUtcOffset() TimeSpan { | |
| 829 | + | core.LazyRegister(&xDateTimeGetUtcOffset, "GLIB", "g_date_time_get_utc_offset", false) | |
| 830 | + | ||
| 753 | 831 | cret := xDateTimeGetUtcOffset(x.GoPointer()) | |
| 754 | 832 | return cret | |
| 755 | 833 | } | |
| @@ -788,6 +866,8 @@ var xDateTimeGetWeekNumberingYear func(uintptr) int | |||
| 788 | 866 | // Note that January 1 0001 in the proleptic Gregorian calendar is a | |
| 789 | 867 | // Monday, so this function never returns 0. | |
| 790 | 868 | func (x *DateTime) GetWeekNumberingYear() int { | |
| 869 | + | core.LazyRegister(&xDateTimeGetWeekNumberingYear, "GLIB", "g_date_time_get_week_numbering_year", false) | |
| 870 | + | ||
| 791 | 871 | cret := xDateTimeGetWeekNumberingYear(x.GoPointer()) | |
| 792 | 872 | return cret | |
| 793 | 873 | } | |
| @@ -810,6 +890,8 @@ var xDateTimeGetWeekOfYear func(uintptr) int | |||
| 810 | 890 | // considered as being part of the first ISO 8601 week of the next year | |
| 811 | 891 | // if 4 or more days of that week are contained within the new year. | |
| 812 | 892 | func (x *DateTime) GetWeekOfYear() int { | |
| 893 | + | core.LazyRegister(&xDateTimeGetWeekOfYear, "GLIB", "g_date_time_get_week_of_year", false) | |
| 894 | + | ||
| 813 | 895 | cret := xDateTimeGetWeekOfYear(x.GoPointer()) | |
| 814 | 896 | return cret | |
| 815 | 897 | } | |
| @@ -818,6 +900,8 @@ var xDateTimeGetYear func(uintptr) int | |||
| 818 | 900 | ||
| 819 | 901 | // Retrieves the year represented by @datetime in the Gregorian calendar. | |
| 820 | 902 | func (x *DateTime) GetYear() int { | |
| 903 | + | core.LazyRegister(&xDateTimeGetYear, "GLIB", "g_date_time_get_year", false) | |
| 904 | + | ||
| 821 | 905 | cret := xDateTimeGetYear(x.GoPointer()) | |
| 822 | 906 | return cret | |
| 823 | 907 | } | |
| @@ -826,6 +910,8 @@ var xDateTimeGetYmd func(uintptr, *int, *int, *int) | |||
| 826 | 910 | ||
| 827 | 911 | // Retrieves the Gregorian day, month, and year of a given #GDateTime. | |
| 828 | 912 | func (x *DateTime) GetYmd(YearVar *int, MonthVar *int, DayVar *int) { | |
| 913 | + | core.LazyRegister(&xDateTimeGetYmd, "GLIB", "g_date_time_get_ymd", false) | |
| 914 | + | ||
| 829 | 915 | xDateTimeGetYmd(x.GoPointer(), YearVar, MonthVar, DayVar) | |
| 830 | 916 | } | |
| 831 | 917 | ||
| @@ -833,6 +919,8 @@ var xDateTimeHash func(uintptr) uint | |||
| 833 | 919 | ||
| 834 | 920 | // Hashes @datetime into a #guint, suitable for use within #GHashTable. | |
| 835 | 921 | func (x *DateTime) Hash() uint { | |
| 922 | + | core.LazyRegister(&xDateTimeHash, "GLIB", "g_date_time_hash", false) | |
| 923 | + | ||
| 836 | 924 | cret := xDateTimeHash(x.GoPointer()) | |
| 837 | 925 | return cret | |
| 838 | 926 | } | |
| @@ -842,6 +930,8 @@ var xDateTimeIsDaylightSavings func(uintptr) bool | |||
| 842 | 930 | // Determines if daylight savings time is in effect at the time and in | |
| 843 | 931 | // the time zone of @datetime. | |
| 844 | 932 | func (x *DateTime) IsDaylightSavings() bool { | |
| 933 | + | core.LazyRegister(&xDateTimeIsDaylightSavings, "GLIB", "g_date_time_is_daylight_savings", false) | |
| 934 | + | ||
| 845 | 935 | cret := xDateTimeIsDaylightSavings(x.GoPointer()) | |
| 846 | 936 | return cret | |
| 847 | 937 | } | |
| @@ -850,6 +940,8 @@ var xDateTimeRef func(uintptr) uintptr | |||
| 850 | 940 | ||
| 851 | 941 | // Atomically increments the reference count of @datetime by one. | |
| 852 | 942 | func (x *DateTime) Ref() *DateTime { | |
| 943 | + | core.LazyRegister(&xDateTimeRef, "GLIB", "g_date_time_ref", false) | |
| 944 | + | ||
| 853 | 945 | cret := xDateTimeRef(x.GoPointer()) | |
| 854 | 946 | if cret == 0 { | |
| 855 | 947 | return nil | |
| @@ -865,6 +957,8 @@ var xDateTimeToLocal func(uintptr) uintptr | |||
| 865 | 957 | // This call is equivalent to calling g_date_time_to_timezone() with the | |
| 866 | 958 | // time zone returned by g_time_zone_new_local(). | |
| 867 | 959 | func (x *DateTime) ToLocal() *DateTime { | |
| 960 | + | core.LazyRegister(&xDateTimeToLocal, "GLIB", "g_date_time_to_local", false) | |
| 961 | + | ||
| 868 | 962 | cret := xDateTimeToLocal(x.GoPointer()) | |
| 869 | 963 | if cret == 0 { | |
| 870 | 964 | return nil | |
| @@ -888,6 +982,8 @@ var xDateTimeToTimeval func(uintptr, *TimeVal) bool | |||
| 888 | 982 | // | |
| 889 | 983 | // On systems where 'long' is 64bit, this function never fails. | |
| 890 | 984 | func (x *DateTime) ToTimeval(TvVar *TimeVal) bool { | |
| 985 | + | core.LazyRegister(&xDateTimeToTimeval, "GLIB", "g_date_time_to_timeval", false) | |
| 986 | + | ||
| 891 | 987 | cret := xDateTimeToTimeval(x.GoPointer(), TvVar) | |
| 892 | 988 | return cret | |
| 893 | 989 | } | |
| @@ -901,6 +997,8 @@ var xDateTimeToTimezone func(uintptr, *TimeZone) uintptr | |||
| 901 | 997 | // example, converting 0001-01-01 00:00:00 UTC to a time zone west of | |
| 902 | 998 | // Greenwich will fail (due to the year 0 being out of range). | |
| 903 | 999 | func (x *DateTime) ToTimezone(TzVar *TimeZone) *DateTime { | |
| 1000 | + | core.LazyRegister(&xDateTimeToTimezone, "GLIB", "g_date_time_to_timezone", false) | |
| 1001 | + | ||
| 904 | 1002 | cret := xDateTimeToTimezone(x.GoPointer(), TzVar) | |
| 905 | 1003 | if cret == 0 { | |
| 906 | 1004 | return nil | |
| @@ -916,6 +1014,8 @@ var xDateTimeToUnix func(uintptr) int64 | |||
| 916 | 1014 | // Unix time is the number of seconds that have elapsed since 1970-01-01 | |
| 917 | 1015 | // 00:00:00 UTC, regardless of the time zone associated with @datetime. | |
| 918 | 1016 | func (x *DateTime) ToUnix() int64 { | |
| 1017 | + | core.LazyRegister(&xDateTimeToUnix, "GLIB", "g_date_time_to_unix", false) | |
| 1018 | + | ||
| 919 | 1019 | cret := xDateTimeToUnix(x.GoPointer()) | |
| 920 | 1020 | return cret | |
| 921 | 1021 | } | |
| @@ -927,6 +1027,8 @@ var xDateTimeToUnixUsec func(uintptr) int64 | |||
| 927 | 1027 | // Unix time is the number of microseconds that have elapsed since 1970-01-01 | |
| 928 | 1028 | // 00:00:00 UTC, regardless of the time zone associated with @datetime. | |
| 929 | 1029 | func (x *DateTime) ToUnixUsec() int64 { | |
| 1030 | + | core.LazyRegister(&xDateTimeToUnixUsec, "GLIB", "g_date_time_to_unix_usec", false) | |
| 1031 | + | ||
| 930 | 1032 | cret := xDateTimeToUnixUsec(x.GoPointer()) | |
| 931 | 1033 | return cret | |
| 932 | 1034 | } | |
| @@ -939,6 +1041,8 @@ var xDateTimeToUtc func(uintptr) uintptr | |||
| 939 | 1041 | // This call is equivalent to calling g_date_time_to_timezone() with the | |
| 940 | 1042 | // time zone returned by g_time_zone_new_utc(). | |
| 941 | 1043 | func (x *DateTime) ToUtc() *DateTime { | |
| 1044 | + | core.LazyRegister(&xDateTimeToUtc, "GLIB", "g_date_time_to_utc", false) | |
| 1045 | + | ||
| 942 | 1046 | cret := xDateTimeToUtc(x.GoPointer()) | |
| 943 | 1047 | if cret == 0 { | |
| 944 | 1048 | return nil | |
| @@ -953,6 +1057,8 @@ var xDateTimeUnref func(uintptr) | |||
| 953 | 1057 | // When the reference count reaches zero, the resources allocated by | |
| 954 | 1058 | // @datetime are freed | |
| 955 | 1059 | func (x *DateTime) Unref() { | |
| 1060 | + | core.LazyRegister(&xDateTimeUnref, "GLIB", "g_date_time_unref", false) | |
| 1061 | + | ||
| 956 | 1062 | xDateTimeUnref(x.GoPointer()) | |
| 957 | 1063 | } | |
| 958 | 1064 | ||
| @@ -975,69 +1081,4 @@ const ( | |||
| 975 | 1081 | func init() { | |
| 976 | 1082 | core.SetPackageName("GLIB", "glib-2.0") | |
| 977 | 1083 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | |
| 978 | - | var libs []uintptr | |
| 979 | - | for _, libPath := range core.GetPaths("GLIB") { | |
| 980 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 981 | - | if err != nil { | |
| 982 | - | panic(err) | |
| 983 | - | } | |
| 984 | - | libs = append(libs, lib) | |
| 985 | - | } | |
| 986 | - | ||
| 987 | - | core.PuregoSafeRegister(&xDateTimeGLibType, libs, "g_date_time_get_type") | |
| 988 | - | ||
| 989 | - | core.PuregoSafeRegister(&xNewDateTime, libs, "g_date_time_new") | |
| 990 | - | core.PuregoSafeRegister(&xNewDateTimeFromIso8601, libs, "g_date_time_new_from_iso8601") | |
| 991 | - | core.PuregoSafeRegister(&xNewDateTimeFromTimevalLocal, libs, "g_date_time_new_from_timeval_local") | |
| 992 | - | core.PuregoSafeRegister(&xNewDateTimeFromTimevalUtc, libs, "g_date_time_new_from_timeval_utc") | |
| 993 | - | core.PuregoSafeRegister(&xNewDateTimeFromUnixLocal, libs, "g_date_time_new_from_unix_local") | |
| 994 | - | core.PuregoSafeRegister(&xNewDateTimeFromUnixLocalUsec, libs, "g_date_time_new_from_unix_local_usec") | |
| 995 | - | core.PuregoSafeRegister(&xNewDateTimeFromUnixUtc, libs, "g_date_time_new_from_unix_utc") | |
| 996 | - | core.PuregoSafeRegister(&xNewDateTimeFromUnixUtcUsec, libs, "g_date_time_new_from_unix_utc_usec") | |
| 997 | - | core.PuregoSafeRegister(&xNewDateTimeLocal, libs, "g_date_time_new_local") | |
| 998 | - | core.PuregoSafeRegister(&xNewDateTimeNow, libs, "g_date_time_new_now") | |
| 999 | - | core.PuregoSafeRegister(&xNewDateTimeNowLocal, libs, "g_date_time_new_now_local") | |
| 1000 | - | core.PuregoSafeRegister(&xNewDateTimeNowUtc, libs, "g_date_time_new_now_utc") | |
| 1001 | - | core.PuregoSafeRegister(&xNewDateTimeUtc, libs, "g_date_time_new_utc") | |
| 1002 | - | ||
| 1003 | - | core.PuregoSafeRegister(&xDateTimeAdd, libs, "g_date_time_add") | |
| 1004 | - | core.PuregoSafeRegister(&xDateTimeAddDays, libs, "g_date_time_add_days") | |
| 1005 | - | core.PuregoSafeRegister(&xDateTimeAddFull, libs, "g_date_time_add_full") | |
| 1006 | - | core.PuregoSafeRegister(&xDateTimeAddHours, libs, "g_date_time_add_hours") | |
| 1007 | - | core.PuregoSafeRegister(&xDateTimeAddMinutes, libs, "g_date_time_add_minutes") | |
| 1008 | - | core.PuregoSafeRegister(&xDateTimeAddMonths, libs, "g_date_time_add_months") | |
| 1009 | - | core.PuregoSafeRegister(&xDateTimeAddSeconds, libs, "g_date_time_add_seconds") | |
| 1010 | - | core.PuregoSafeRegister(&xDateTimeAddWeeks, libs, "g_date_time_add_weeks") | |
| 1011 | - | core.PuregoSafeRegister(&xDateTimeAddYears, libs, "g_date_time_add_years") | |
| 1012 | - | core.PuregoSafeRegister(&xDateTimeCompare, libs, "g_date_time_compare") | |
| 1013 | - | core.PuregoSafeRegister(&xDateTimeDifference, libs, "g_date_time_difference") | |
| 1014 | - | core.PuregoSafeRegister(&xDateTimeEqual, libs, "g_date_time_equal") | |
| 1015 | - | core.PuregoSafeRegister(&xDateTimeFormat, libs, "g_date_time_format") | |
| 1016 | - | core.PuregoSafeRegister(&xDateTimeFormatIso8601, libs, "g_date_time_format_iso8601") | |
| 1017 | - | core.PuregoSafeRegister(&xDateTimeGetDayOfMonth, libs, "g_date_time_get_day_of_month") | |
| 1018 | - | core.PuregoSafeRegister(&xDateTimeGetDayOfWeek, libs, "g_date_time_get_day_of_week") | |
| 1019 | - | core.PuregoSafeRegister(&xDateTimeGetDayOfYear, libs, "g_date_time_get_day_of_year") | |
| 1020 | - | core.PuregoSafeRegister(&xDateTimeGetHour, libs, "g_date_time_get_hour") | |
| 1021 | - | core.PuregoSafeRegister(&xDateTimeGetMicrosecond, libs, "g_date_time_get_microsecond") | |
| 1022 | - | core.PuregoSafeRegister(&xDateTimeGetMinute, libs, "g_date_time_get_minute") | |
| 1023 | - | core.PuregoSafeRegister(&xDateTimeGetMonth, libs, "g_date_time_get_month") | |
| 1024 | - | core.PuregoSafeRegister(&xDateTimeGetSecond, libs, "g_date_time_get_second") | |
| 1025 | - | core.PuregoSafeRegister(&xDateTimeGetSeconds, libs, "g_date_time_get_seconds") | |
| 1026 | - | core.PuregoSafeRegister(&xDateTimeGetTimezone, libs, "g_date_time_get_timezone") | |
| 1027 | - | core.PuregoSafeRegister(&xDateTimeGetTimezoneAbbreviation, libs, "g_date_time_get_timezone_abbreviation") | |
| 1028 | - | core.PuregoSafeRegister(&xDateTimeGetUtcOffset, libs, "g_date_time_get_utc_offset") | |
| 1029 | - | core.PuregoSafeRegister(&xDateTimeGetWeekNumberingYear, libs, "g_date_time_get_week_numbering_year") | |
| 1030 | - | core.PuregoSafeRegister(&xDateTimeGetWeekOfYear, libs, "g_date_time_get_week_of_year") | |
| 1031 | - | core.PuregoSafeRegister(&xDateTimeGetYear, libs, "g_date_time_get_year") | |
| 1032 | - | core.PuregoSafeRegister(&xDateTimeGetYmd, libs, "g_date_time_get_ymd") | |
| 1033 | - | core.PuregoSafeRegister(&xDateTimeHash, libs, "g_date_time_hash") | |
| 1034 | - | core.PuregoSafeRegister(&xDateTimeIsDaylightSavings, libs, "g_date_time_is_daylight_savings") | |
| 1035 | - | core.PuregoSafeRegister(&xDateTimeRef, libs, "g_date_time_ref") | |
| 1036 | - | core.PuregoSafeRegister(&xDateTimeToLocal, libs, "g_date_time_to_local") | |
| 1037 | - | core.PuregoSafeRegister(&xDateTimeToTimeval, libs, "g_date_time_to_timeval") | |
| 1038 | - | core.PuregoSafeRegister(&xDateTimeToTimezone, libs, "g_date_time_to_timezone") | |
| 1039 | - | core.PuregoSafeRegister(&xDateTimeToUnix, libs, "g_date_time_to_unix") | |
| 1040 | - | core.PuregoSafeRegister(&xDateTimeToUnixUsec, libs, "g_date_time_to_unix_usec") | |
| 1041 | - | core.PuregoSafeRegister(&xDateTimeToUtc, libs, "g_date_time_to_utc") | |
| 1042 | - | core.PuregoSafeRegister(&xDateTimeUnref, libs, "g_date_time_unref") | |
| 1043 | 1084 | } | |
| @@ -5,7 +5,6 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | - | "github.com/bnema/purego" | |||
| 9 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject/types" | 9 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| 11 | ) | 10 | ) | ||
| @@ -42,6 +41,7 @@ type DateTime struct { | |||||
| 42 | var xDateTimeGLibType func() types.GType | 41 | var xDateTimeGLibType func() types.GType | ||
| 43 | 42 | ||||
| 44 | func DateTimeGLibType() types.GType { | 43 | func DateTimeGLibType() types.GType { | ||
| 44 | + | core.LazyRegister(&xDateTimeGLibType, "GLIB", "g_date_time_get_type", false) | |||
| 45 | return xDateTimeGLibType() | 45 | return xDateTimeGLibType() | ||
| 46 | } | 46 | } | ||
| 47 | 47 | ||||
| @@ -88,6 +88,8 @@ var xNewDateTime func(*TimeZone, int, int, int, int, int, float64) uintptr | |||||
| 88 | // You should release the return value by calling g_date_time_unref() | 88 | // You should release the return value by calling g_date_time_unref() | ||
| 89 | // when you are done with it. | 89 | // when you are done with it. | ||
| 90 | func NewDateTime(TzVar *TimeZone, YearVar int, MonthVar int, DayVar int, HourVar int, MinuteVar int, SecondsVar float64) *DateTime { | 90 | func NewDateTime(TzVar *TimeZone, YearVar int, MonthVar int, DayVar int, HourVar int, MinuteVar int, SecondsVar float64) *DateTime { | ||
| 91 | + | core.LazyRegister(&xNewDateTime, "GLIB", "g_date_time_new", false) | |||
| 92 | + | ||||
| 91 | cret := xNewDateTime(TzVar, YearVar, MonthVar, DayVar, HourVar, MinuteVar, SecondsVar) | 93 | cret := xNewDateTime(TzVar, YearVar, MonthVar, DayVar, HourVar, MinuteVar, SecondsVar) | ||
| 92 | if cret == 0 { | 94 | if cret == 0 { | ||
| 93 | return nil | 95 | return nil | ||
| @@ -141,6 +143,8 @@ var xNewDateTimeFromIso8601 func(string, *TimeZone) uintptr | |||||
| 141 | // You should release the return value by calling g_date_time_unref() | 143 | // You should release the return value by calling g_date_time_unref() | ||
| 142 | // when you are done with it. | 144 | // when you are done with it. | ||
| 143 | func NewDateTimeFromIso8601(TextVar string, DefaultTzVar *TimeZone) *DateTime { | 145 | func NewDateTimeFromIso8601(TextVar string, DefaultTzVar *TimeZone) *DateTime { | ||
| 146 | + | core.LazyRegister(&xNewDateTimeFromIso8601, "GLIB", "g_date_time_new_from_iso8601", false) | |||
| 147 | + | ||||
| 144 | cret := xNewDateTimeFromIso8601(TextVar, DefaultTzVar) | 148 | cret := xNewDateTimeFromIso8601(TextVar, DefaultTzVar) | ||
| 145 | if cret == 0 { | 149 | if cret == 0 { | ||
| 146 | return nil | 150 | return nil | ||
| @@ -163,6 +167,8 @@ var xNewDateTimeFromTimevalLocal func(*TimeVal) uintptr | |||||
| 163 | // You should release the return value by calling g_date_time_unref() | 167 | // You should release the return value by calling g_date_time_unref() | ||
| 164 | // when you are done with it. | 168 | // when you are done with it. | ||
| 165 | func NewDateTimeFromTimevalLocal(TvVar *TimeVal) *DateTime { | 169 | func NewDateTimeFromTimevalLocal(TvVar *TimeVal) *DateTime { | ||
| 170 | + | core.LazyRegister(&xNewDateTimeFromTimevalLocal, "GLIB", "g_date_time_new_from_timeval_local", false) | |||
| 171 | + | ||||
| 166 | cret := xNewDateTimeFromTimevalLocal(TvVar) | 172 | cret := xNewDateTimeFromTimevalLocal(TvVar) | ||
| 167 | if cret == 0 { | 173 | if cret == 0 { | ||
| 168 | return nil | 174 | return nil | ||
| @@ -183,6 +189,8 @@ var xNewDateTimeFromTimevalUtc func(*TimeVal) uintptr | |||||
| 183 | // You should release the return value by calling g_date_time_unref() | 189 | // You should release the return value by calling g_date_time_unref() | ||
| 184 | // when you are done with it. | 190 | // when you are done with it. | ||
| 185 | func NewDateTimeFromTimevalUtc(TvVar *TimeVal) *DateTime { | 191 | func NewDateTimeFromTimevalUtc(TvVar *TimeVal) *DateTime { | ||
| 192 | + | core.LazyRegister(&xNewDateTimeFromTimevalUtc, "GLIB", "g_date_time_new_from_timeval_utc", false) | |||
| 193 | + | ||||
| 186 | cret := xNewDateTimeFromTimevalUtc(TvVar) | 194 | cret := xNewDateTimeFromTimevalUtc(TvVar) | ||
| 187 | if cret == 0 { | 195 | if cret == 0 { | ||
| 188 | return nil | 196 | return nil | ||
| @@ -204,6 +212,8 @@ var xNewDateTimeFromUnixLocal func(int64) uintptr | |||||
| 204 | // You should release the return value by calling g_date_time_unref() | 212 | // You should release the return value by calling g_date_time_unref() | ||
| 205 | // when you are done with it. | 213 | // when you are done with it. | ||
| 206 | func NewDateTimeFromUnixLocal(TVar int64) *DateTime { | 214 | func NewDateTimeFromUnixLocal(TVar int64) *DateTime { | ||
| 215 | + | core.LazyRegister(&xNewDateTimeFromUnixLocal, "GLIB", "g_date_time_new_from_unix_local", false) | |||
| 216 | + | ||||
| 207 | cret := xNewDateTimeFromUnixLocal(TVar) | 217 | cret := xNewDateTimeFromUnixLocal(TVar) | ||
| 208 | if cret == 0 { | 218 | if cret == 0 { | ||
| 209 | return nil | 219 | return nil | ||
| @@ -225,6 +235,8 @@ var xNewDateTimeFromUnixLocalUsec func(int64) uintptr | |||||
| 225 | // You should release the return value by calling [method@GLib.DateTime.unref] | 235 | // You should release the return value by calling [method@GLib.DateTime.unref] | ||
| 226 | // when you are done with it. | 236 | // when you are done with it. | ||
| 227 | func NewDateTimeFromUnixLocalUsec(UsecsVar int64) *DateTime { | 237 | func NewDateTimeFromUnixLocalUsec(UsecsVar int64) *DateTime { | ||
| 238 | + | core.LazyRegister(&xNewDateTimeFromUnixLocalUsec, "GLIB", "g_date_time_new_from_unix_local_usec", false) | |||
| 239 | + | ||||
| 228 | cret := xNewDateTimeFromUnixLocalUsec(UsecsVar) | 240 | cret := xNewDateTimeFromUnixLocalUsec(UsecsVar) | ||
| 229 | if cret == 0 { | 241 | if cret == 0 { | ||
| 230 | return nil | 242 | return nil | ||
| @@ -245,6 +257,8 @@ var xNewDateTimeFromUnixUtc func(int64) uintptr | |||||
| 245 | // You should release the return value by calling g_date_time_unref() | 257 | // You should release the return value by calling g_date_time_unref() | ||
| 246 | // when you are done with it. | 258 | // when you are done with it. | ||
| 247 | func NewDateTimeFromUnixUtc(TVar int64) *DateTime { | 259 | func NewDateTimeFromUnixUtc(TVar int64) *DateTime { | ||
| 260 | + | core.LazyRegister(&xNewDateTimeFromUnixUtc, "GLIB", "g_date_time_new_from_unix_utc", false) | |||
| 261 | + | ||||
| 248 | cret := xNewDateTimeFromUnixUtc(TVar) | 262 | cret := xNewDateTimeFromUnixUtc(TVar) | ||
| 249 | if cret == 0 { | 263 | if cret == 0 { | ||
| 250 | return nil | 264 | return nil | ||
| @@ -265,6 +279,8 @@ var xNewDateTimeFromUnixUtcUsec func(int64) uintptr | |||||
| 265 | // You should release the return value by calling [method@GLib.DateTime.unref] | 279 | // You should release the return value by calling [method@GLib.DateTime.unref] | ||
| 266 | // when you are done with it. | 280 | // when you are done with it. | ||
| 267 | func NewDateTimeFromUnixUtcUsec(UsecsVar int64) *DateTime { | 281 | func NewDateTimeFromUnixUtcUsec(UsecsVar int64) *DateTime { | ||
| 282 | + | core.LazyRegister(&xNewDateTimeFromUnixUtcUsec, "GLIB", "g_date_time_new_from_unix_utc_usec", false) | |||
| 283 | + | ||||
| 268 | cret := xNewDateTimeFromUnixUtcUsec(UsecsVar) | 284 | cret := xNewDateTimeFromUnixUtcUsec(UsecsVar) | ||
| 269 | if cret == 0 { | 285 | if cret == 0 { | ||
| 270 | return nil | 286 | return nil | ||
| @@ -280,6 +296,8 @@ var xNewDateTimeLocal func(int, int, int, int, int, float64) uintptr | |||||
| 280 | // This call is equivalent to calling g_date_time_new() with the time | 296 | // This call is equivalent to calling g_date_time_new() with the time | ||
| 281 | // zone returned by g_time_zone_new_local(). | 297 | // zone returned by g_time_zone_new_local(). | ||
| 282 | func NewDateTimeLocal(YearVar int, MonthVar int, DayVar int, HourVar int, MinuteVar int, SecondsVar float64) *DateTime { | 298 | func NewDateTimeLocal(YearVar int, MonthVar int, DayVar int, HourVar int, MinuteVar int, SecondsVar float64) *DateTime { | ||
| 299 | + | core.LazyRegister(&xNewDateTimeLocal, "GLIB", "g_date_time_new_local", false) | |||
| 300 | + | ||||
| 283 | cret := xNewDateTimeLocal(YearVar, MonthVar, DayVar, HourVar, MinuteVar, SecondsVar) | 301 | cret := xNewDateTimeLocal(YearVar, MonthVar, DayVar, HourVar, MinuteVar, SecondsVar) | ||
| 284 | if cret == 0 { | 302 | if cret == 0 { | ||
| 285 | return nil | 303 | return nil | ||
| @@ -299,6 +317,8 @@ var xNewDateTimeNow func(*TimeZone) uintptr | |||||
| 299 | // You should release the return value by calling g_date_time_unref() | 317 | // You should release the return value by calling g_date_time_unref() | ||
| 300 | // when you are done with it. | 318 | // when you are done with it. | ||
| 301 | func NewDateTimeNow(TzVar *TimeZone) *DateTime { | 319 | func NewDateTimeNow(TzVar *TimeZone) *DateTime { | ||
| 320 | + | core.LazyRegister(&xNewDateTimeNow, "GLIB", "g_date_time_new_now", false) | |||
| 321 | + | ||||
| 302 | cret := xNewDateTimeNow(TzVar) | 322 | cret := xNewDateTimeNow(TzVar) | ||
| 303 | if cret == 0 { | 323 | if cret == 0 { | ||
| 304 | return nil | 324 | return nil | ||
| @@ -314,6 +334,8 @@ var xNewDateTimeNowLocal func() uintptr | |||||
| 314 | // This is equivalent to calling g_date_time_new_now() with the time | 334 | // This is equivalent to calling g_date_time_new_now() with the time | ||
| 315 | // zone returned by g_time_zone_new_local(). | 335 | // zone returned by g_time_zone_new_local(). | ||
| 316 | func NewDateTimeNowLocal() *DateTime { | 336 | func NewDateTimeNowLocal() *DateTime { | ||
| 337 | + | core.LazyRegister(&xNewDateTimeNowLocal, "GLIB", "g_date_time_new_now_local", false) | |||
| 338 | + | ||||
| 317 | cret := xNewDateTimeNowLocal() | 339 | cret := xNewDateTimeNowLocal() | ||
| 318 | if cret == 0 { | 340 | if cret == 0 { | ||
| 319 | return nil | 341 | return nil | ||
| @@ -328,6 +350,8 @@ var xNewDateTimeNowUtc func() uintptr | |||||
| 328 | // This is equivalent to calling g_date_time_new_now() with the time | 350 | // This is equivalent to calling g_date_time_new_now() with the time | ||
| 329 | // zone returned by g_time_zone_new_utc(). | 351 | // zone returned by g_time_zone_new_utc(). | ||
| 330 | func NewDateTimeNowUtc() *DateTime { | 352 | func NewDateTimeNowUtc() *DateTime { | ||
| 353 | + | core.LazyRegister(&xNewDateTimeNowUtc, "GLIB", "g_date_time_new_now_utc", false) | |||
| 354 | + | ||||
| 331 | cret := xNewDateTimeNowUtc() | 355 | cret := xNewDateTimeNowUtc() | ||
| 332 | if cret == 0 { | 356 | if cret == 0 { | ||
| 333 | return nil | 357 | return nil | ||
| @@ -343,6 +367,8 @@ var xNewDateTimeUtc func(int, int, int, int, int, float64) uintptr | |||||
| 343 | // This call is equivalent to calling g_date_time_new() with the time | 367 | // This call is equivalent to calling g_date_time_new() with the time | ||
| 344 | // zone returned by g_time_zone_new_utc(). | 368 | // zone returned by g_time_zone_new_utc(). | ||
| 345 | func NewDateTimeUtc(YearVar int, MonthVar int, DayVar int, HourVar int, MinuteVar int, SecondsVar float64) *DateTime { | 369 | func NewDateTimeUtc(YearVar int, MonthVar int, DayVar int, HourVar int, MinuteVar int, SecondsVar float64) *DateTime { | ||
| 370 | + | core.LazyRegister(&xNewDateTimeUtc, "GLIB", "g_date_time_new_utc", false) | |||
| 371 | + | ||||
| 346 | cret := xNewDateTimeUtc(YearVar, MonthVar, DayVar, HourVar, MinuteVar, SecondsVar) | 372 | cret := xNewDateTimeUtc(YearVar, MonthVar, DayVar, HourVar, MinuteVar, SecondsVar) | ||
| 347 | if cret == 0 { | 373 | if cret == 0 { | ||
| 348 | return nil | 374 | return nil | ||
| @@ -354,6 +380,8 @@ var xDateTimeAdd func(uintptr, TimeSpan) uintptr | |||||
| 354 | 380 | ||||
| 355 | // Creates a copy of @datetime and adds the specified timespan to the copy. | 381 | // Creates a copy of @datetime and adds the specified timespan to the copy. | ||
| 356 | func (x *DateTime) Add(TimespanVar TimeSpan) *DateTime { | 382 | func (x *DateTime) Add(TimespanVar TimeSpan) *DateTime { | ||
| 383 | + | core.LazyRegister(&xDateTimeAdd, "GLIB", "g_date_time_add", false) | |||
| 384 | + | ||||
| 357 | cret := xDateTimeAdd(x.GoPointer(), TimespanVar) | 385 | cret := xDateTimeAdd(x.GoPointer(), TimespanVar) | ||
| 358 | if cret == 0 { | 386 | if cret == 0 { | ||
| 359 | return nil | 387 | return nil | ||
| @@ -366,6 +394,8 @@ var xDateTimeAddDays func(uintptr, int) uintptr | |||||
| 366 | // Creates a copy of @datetime and adds the specified number of days to the | 394 | // Creates a copy of @datetime and adds the specified number of days to the | ||
| 367 | // copy. Add negative values to subtract days. | 395 | // copy. Add negative values to subtract days. | ||
| 368 | func (x *DateTime) AddDays(DaysVar int) *DateTime { | 396 | func (x *DateTime) AddDays(DaysVar int) *DateTime { | ||
| 397 | + | core.LazyRegister(&xDateTimeAddDays, "GLIB", "g_date_time_add_days", false) | |||
| 398 | + | ||||
| 369 | cret := xDateTimeAddDays(x.GoPointer(), DaysVar) | 399 | cret := xDateTimeAddDays(x.GoPointer(), DaysVar) | ||
| 370 | if cret == 0 { | 400 | if cret == 0 { | ||
| 371 | return nil | 401 | return nil | ||
| @@ -378,6 +408,8 @@ var xDateTimeAddFull func(uintptr, int, int, int, int, int, float64) uintptr | |||||
| 378 | // Creates a new #GDateTime adding the specified values to the current date and | 408 | // Creates a new #GDateTime adding the specified values to the current date and | ||
| 379 | // time in @datetime. Add negative values to subtract. | 409 | // time in @datetime. Add negative values to subtract. | ||
| 380 | func (x *DateTime) AddFull(YearsVar int, MonthsVar int, DaysVar int, HoursVar int, MinutesVar int, SecondsVar float64) *DateTime { | 410 | func (x *DateTime) AddFull(YearsVar int, MonthsVar int, DaysVar int, HoursVar int, MinutesVar int, SecondsVar float64) *DateTime { | ||
| 411 | + | core.LazyRegister(&xDateTimeAddFull, "GLIB", "g_date_time_add_full", false) | |||
| 412 | + | ||||
| 381 | cret := xDateTimeAddFull(x.GoPointer(), YearsVar, MonthsVar, DaysVar, HoursVar, MinutesVar, SecondsVar) | 413 | cret := xDateTimeAddFull(x.GoPointer(), YearsVar, MonthsVar, DaysVar, HoursVar, MinutesVar, SecondsVar) | ||
| 382 | if cret == 0 { | 414 | if cret == 0 { | ||
| 383 | return nil | 415 | return nil | ||
| @@ -390,6 +422,8 @@ var xDateTimeAddHours func(uintptr, int) uintptr | |||||
| 390 | // Creates a copy of @datetime and adds the specified number of hours. | 422 | // Creates a copy of @datetime and adds the specified number of hours. | ||
| 391 | // Add negative values to subtract hours. | 423 | // Add negative values to subtract hours. | ||
| 392 | func (x *DateTime) AddHours(HoursVar int) *DateTime { | 424 | func (x *DateTime) AddHours(HoursVar int) *DateTime { | ||
| 425 | + | core.LazyRegister(&xDateTimeAddHours, "GLIB", "g_date_time_add_hours", false) | |||
| 426 | + | ||||
| 393 | cret := xDateTimeAddHours(x.GoPointer(), HoursVar) | 427 | cret := xDateTimeAddHours(x.GoPointer(), HoursVar) | ||
| 394 | if cret == 0 { | 428 | if cret == 0 { | ||
| 395 | return nil | 429 | return nil | ||
| @@ -402,6 +436,8 @@ var xDateTimeAddMinutes func(uintptr, int) uintptr | |||||
| 402 | // Creates a copy of @datetime adding the specified number of minutes. | 436 | // Creates a copy of @datetime adding the specified number of minutes. | ||
| 403 | // Add negative values to subtract minutes. | 437 | // Add negative values to subtract minutes. | ||
| 404 | func (x *DateTime) AddMinutes(MinutesVar int) *DateTime { | 438 | func (x *DateTime) AddMinutes(MinutesVar int) *DateTime { | ||
| 439 | + | core.LazyRegister(&xDateTimeAddMinutes, "GLIB", "g_date_time_add_minutes", false) | |||
| 440 | + | ||||
| 405 | cret := xDateTimeAddMinutes(x.GoPointer(), MinutesVar) | 441 | cret := xDateTimeAddMinutes(x.GoPointer(), MinutesVar) | ||
| 406 | if cret == 0 { | 442 | if cret == 0 { | ||
| 407 | return nil | 443 | return nil | ||
| @@ -419,6 +455,8 @@ var xDateTimeAddMonths func(uintptr, int) uintptr | |||||
| 419 | // 31st January 2018, the result would be 28th February 2018. In 2020 (a leap | 455 | // 31st January 2018, the result would be 28th February 2018. In 2020 (a leap | ||
| 420 | // year), the result would be 29th February. | 456 | // year), the result would be 29th February. | ||
| 421 | func (x *DateTime) AddMonths(MonthsVar int) *DateTime { | 457 | func (x *DateTime) AddMonths(MonthsVar int) *DateTime { | ||
| 458 | + | core.LazyRegister(&xDateTimeAddMonths, "GLIB", "g_date_time_add_months", false) | |||
| 459 | + | ||||
| 422 | cret := xDateTimeAddMonths(x.GoPointer(), MonthsVar) | 460 | cret := xDateTimeAddMonths(x.GoPointer(), MonthsVar) | ||
| 423 | if cret == 0 { | 461 | if cret == 0 { | ||
| 424 | return nil | 462 | return nil | ||
| @@ -431,6 +469,8 @@ var xDateTimeAddSeconds func(uintptr, float64) uintptr | |||||
| 431 | // Creates a copy of @datetime and adds the specified number of seconds. | 469 | // Creates a copy of @datetime and adds the specified number of seconds. | ||
| 432 | // Add negative values to subtract seconds. | 470 | // Add negative values to subtract seconds. | ||
| 433 | func (x *DateTime) AddSeconds(SecondsVar float64) *DateTime { | 471 | func (x *DateTime) AddSeconds(SecondsVar float64) *DateTime { | ||
| 472 | + | core.LazyRegister(&xDateTimeAddSeconds, "GLIB", "g_date_time_add_seconds", false) | |||
| 473 | + | ||||
| 434 | cret := xDateTimeAddSeconds(x.GoPointer(), SecondsVar) | 474 | cret := xDateTimeAddSeconds(x.GoPointer(), SecondsVar) | ||
| 435 | if cret == 0 { | 475 | if cret == 0 { | ||
| 436 | return nil | 476 | return nil | ||
| @@ -443,6 +483,8 @@ var xDateTimeAddWeeks func(uintptr, int) uintptr | |||||
| 443 | // Creates a copy of @datetime and adds the specified number of weeks to the | 483 | // Creates a copy of @datetime and adds the specified number of weeks to the | ||
| 444 | // copy. Add negative values to subtract weeks. | 484 | // copy. Add negative values to subtract weeks. | ||
| 445 | func (x *DateTime) AddWeeks(WeeksVar int) *DateTime { | 485 | func (x *DateTime) AddWeeks(WeeksVar int) *DateTime { | ||
| 486 | + | core.LazyRegister(&xDateTimeAddWeeks, "GLIB", "g_date_time_add_weeks", false) | |||
| 487 | + | ||||
| 446 | cret := xDateTimeAddWeeks(x.GoPointer(), WeeksVar) | 488 | cret := xDateTimeAddWeeks(x.GoPointer(), WeeksVar) | ||
| 447 | if cret == 0 { | 489 | if cret == 0 { | ||
| 448 | return nil | 490 | return nil | ||
| @@ -458,6 +500,8 @@ var xDateTimeAddYears func(uintptr, int) uintptr | |||||
| 458 | // As with g_date_time_add_months(), if the resulting date would be 29th | 500 | // As with g_date_time_add_months(), if the resulting date would be 29th | ||
| 459 | // February on a non-leap year, the day will be clamped to 28th February. | 501 | // February on a non-leap year, the day will be clamped to 28th February. | ||
| 460 | func (x *DateTime) AddYears(YearsVar int) *DateTime { | 502 | func (x *DateTime) AddYears(YearsVar int) *DateTime { | ||
| 503 | + | core.LazyRegister(&xDateTimeAddYears, "GLIB", "g_date_time_add_years", false) | |||
| 504 | + | ||||
| 461 | cret := xDateTimeAddYears(x.GoPointer(), YearsVar) | 505 | cret := xDateTimeAddYears(x.GoPointer(), YearsVar) | ||
| 462 | if cret == 0 { | 506 | if cret == 0 { | ||
| 463 | return nil | 507 | return nil | ||
| @@ -470,6 +514,8 @@ var xDateTimeCompare func(uintptr, uintptr) int | |||||
| 470 | // A comparison function for #GDateTimes that is suitable | 514 | // A comparison function for #GDateTimes that is suitable | ||
| 471 | // as a #GCompareFunc. Both #GDateTimes must be non-%NULL. | 515 | // as a #GCompareFunc. Both #GDateTimes must be non-%NULL. | ||
| 472 | func (x *DateTime) Compare(Dt2Var uintptr) int { | 516 | func (x *DateTime) Compare(Dt2Var uintptr) int { | ||
| 517 | + | core.LazyRegister(&xDateTimeCompare, "GLIB", "g_date_time_compare", false) | |||
| 518 | + | ||||
| 473 | cret := xDateTimeCompare(x.GoPointer(), Dt2Var) | 519 | cret := xDateTimeCompare(x.GoPointer(), Dt2Var) | ||
| 474 | return cret | 520 | return cret | ||
| 475 | } | 521 | } | ||
| @@ -480,6 +526,8 @@ var xDateTimeDifference func(uintptr, *DateTime) TimeSpan | |||||
| 480 | // #GTimeSpan that is returned is effectively @end - @begin (ie: | 526 | // #GTimeSpan that is returned is effectively @end - @begin (ie: | ||
| 481 | // positive if the first parameter is larger). | 527 | // positive if the first parameter is larger). | ||
| 482 | func (x *DateTime) Difference(BeginVar *DateTime) TimeSpan { | 528 | func (x *DateTime) Difference(BeginVar *DateTime) TimeSpan { | ||
| 529 | + | core.LazyRegister(&xDateTimeDifference, "GLIB", "g_date_time_difference", false) | |||
| 530 | + | ||||
| 483 | cret := xDateTimeDifference(x.GoPointer(), BeginVar) | 531 | cret := xDateTimeDifference(x.GoPointer(), BeginVar) | ||
| 484 | return cret | 532 | return cret | ||
| 485 | } | 533 | } | ||
| @@ -491,6 +539,8 @@ var xDateTimeEqual func(uintptr, uintptr) bool | |||||
| 491 | // Equal here means that they represent the same moment after converting | 539 | // Equal here means that they represent the same moment after converting | ||
| 492 | // them to the same time zone. | 540 | // them to the same time zone. | ||
| 493 | func (x *DateTime) Equal(Dt2Var uintptr) bool { | 541 | func (x *DateTime) Equal(Dt2Var uintptr) bool { | ||
| 542 | + | core.LazyRegister(&xDateTimeEqual, "GLIB", "g_date_time_equal", false) | |||
| 543 | + | ||||
| 494 | cret := xDateTimeEqual(x.GoPointer(), Dt2Var) | 544 | cret := xDateTimeEqual(x.GoPointer(), Dt2Var) | ||
| 495 | return cret | 545 | return cret | ||
| 496 | } | 546 | } | ||
| @@ -622,6 +672,8 @@ var xDateTimeFormat func(uintptr, string) string | |||||
| 622 | // specifier | 672 | // specifier | ||
| 623 | // - `%EY`: the full alternative year representation | 673 | // - `%EY`: the full alternative year representation | ||
| 624 | func (x *DateTime) Format(FormatVar string) string { | 674 | func (x *DateTime) Format(FormatVar string) string { | ||
| 675 | + | core.LazyRegister(&xDateTimeFormat, "GLIB", "g_date_time_format", false) | |||
| 676 | + | ||||
| 625 | cret := xDateTimeFormat(x.GoPointer(), FormatVar) | 677 | cret := xDateTimeFormat(x.GoPointer(), FormatVar) | ||
| 626 | return cret | 678 | return cret | ||
| 627 | } | 679 | } | ||
| @@ -634,6 +686,8 @@ var xDateTimeFormatIso8601 func(uintptr) string | |||||
| 634 | // | 686 | // | ||
| 635 | // Since GLib 2.66, this will output to sub-second precision if needed. | 687 | // Since GLib 2.66, this will output to sub-second precision if needed. | ||
| 636 | func (x *DateTime) FormatIso8601() string { | 688 | func (x *DateTime) FormatIso8601() string { | ||
| 689 | + | core.LazyRegister(&xDateTimeFormatIso8601, "GLIB", "g_date_time_format_iso8601", false) | |||
| 690 | + | ||||
| 637 | cret := xDateTimeFormatIso8601(x.GoPointer()) | 691 | cret := xDateTimeFormatIso8601(x.GoPointer()) | ||
| 638 | return cret | 692 | return cret | ||
| 639 | } | 693 | } | ||
| @@ -643,6 +697,8 @@ var xDateTimeGetDayOfMonth func(uintptr) int | |||||
| 643 | // Retrieves the day of the month represented by @datetime in the gregorian | 697 | // Retrieves the day of the month represented by @datetime in the gregorian | ||
| 644 | // calendar. | 698 | // calendar. | ||
| 645 | func (x *DateTime) GetDayOfMonth() int { | 699 | func (x *DateTime) GetDayOfMonth() int { | ||
| 700 | + | core.LazyRegister(&xDateTimeGetDayOfMonth, "GLIB", "g_date_time_get_day_of_month", false) | |||
| 701 | + | ||||
| 646 | cret := xDateTimeGetDayOfMonth(x.GoPointer()) | 702 | cret := xDateTimeGetDayOfMonth(x.GoPointer()) | ||
| 647 | return cret | 703 | return cret | ||
| 648 | } | 704 | } | ||
| @@ -652,6 +708,8 @@ var xDateTimeGetDayOfWeek func(uintptr) int | |||||
| 652 | // Retrieves the ISO 8601 day of the week on which @datetime falls (1 is | 708 | // Retrieves the ISO 8601 day of the week on which @datetime falls (1 is | ||
| 653 | // Monday, 2 is Tuesday... 7 is Sunday). | 709 | // Monday, 2 is Tuesday... 7 is Sunday). | ||
| 654 | func (x *DateTime) GetDayOfWeek() int { | 710 | func (x *DateTime) GetDayOfWeek() int { | ||
| 711 | + | core.LazyRegister(&xDateTimeGetDayOfWeek, "GLIB", "g_date_time_get_day_of_week", false) | |||
| 712 | + | ||||
| 655 | cret := xDateTimeGetDayOfWeek(x.GoPointer()) | 713 | cret := xDateTimeGetDayOfWeek(x.GoPointer()) | ||
| 656 | return cret | 714 | return cret | ||
| 657 | } | 715 | } | ||
| @@ -661,6 +719,8 @@ var xDateTimeGetDayOfYear func(uintptr) int | |||||
| 661 | // Retrieves the day of the year represented by @datetime in the Gregorian | 719 | // Retrieves the day of the year represented by @datetime in the Gregorian | ||
| 662 | // calendar. | 720 | // calendar. | ||
| 663 | func (x *DateTime) GetDayOfYear() int { | 721 | func (x *DateTime) GetDayOfYear() int { | ||
| 722 | + | core.LazyRegister(&xDateTimeGetDayOfYear, "GLIB", "g_date_time_get_day_of_year", false) | |||
| 723 | + | ||||
| 664 | cret := xDateTimeGetDayOfYear(x.GoPointer()) | 724 | cret := xDateTimeGetDayOfYear(x.GoPointer()) | ||
| 665 | return cret | 725 | return cret | ||
| 666 | } | 726 | } | ||
| @@ -669,6 +729,8 @@ var xDateTimeGetHour func(uintptr) int | |||||
| 669 | 729 | ||||
| 670 | // Retrieves the hour of the day represented by @datetime | 730 | // Retrieves the hour of the day represented by @datetime | ||
| 671 | func (x *DateTime) GetHour() int { | 731 | func (x *DateTime) GetHour() int { | ||
| 732 | + | core.LazyRegister(&xDateTimeGetHour, "GLIB", "g_date_time_get_hour", false) | |||
| 733 | + | ||||
| 672 | cret := xDateTimeGetHour(x.GoPointer()) | 734 | cret := xDateTimeGetHour(x.GoPointer()) | ||
| 673 | return cret | 735 | return cret | ||
| 674 | } | 736 | } | ||
| @@ -677,6 +739,8 @@ var xDateTimeGetMicrosecond func(uintptr) int | |||||
| 677 | 739 | ||||
| 678 | // Retrieves the microsecond of the date represented by @datetime | 740 | // Retrieves the microsecond of the date represented by @datetime | ||
| 679 | func (x *DateTime) GetMicrosecond() int { | 741 | func (x *DateTime) GetMicrosecond() int { | ||
| 742 | + | core.LazyRegister(&xDateTimeGetMicrosecond, "GLIB", "g_date_time_get_microsecond", false) | |||
| 743 | + | ||||
| 680 | cret := xDateTimeGetMicrosecond(x.GoPointer()) | 744 | cret := xDateTimeGetMicrosecond(x.GoPointer()) | ||
| 681 | return cret | 745 | return cret | ||
| 682 | } | 746 | } | ||
| @@ -685,6 +749,8 @@ var xDateTimeGetMinute func(uintptr) int | |||||
| 685 | 749 | ||||
| 686 | // Retrieves the minute of the hour represented by @datetime | 750 | // Retrieves the minute of the hour represented by @datetime | ||
| 687 | func (x *DateTime) GetMinute() int { | 751 | func (x *DateTime) GetMinute() int { | ||
| 752 | + | core.LazyRegister(&xDateTimeGetMinute, "GLIB", "g_date_time_get_minute", false) | |||
| 753 | + | ||||
| 688 | cret := xDateTimeGetMinute(x.GoPointer()) | 754 | cret := xDateTimeGetMinute(x.GoPointer()) | ||
| 689 | return cret | 755 | return cret | ||
| 690 | } | 756 | } | ||
| @@ -694,6 +760,8 @@ var xDateTimeGetMonth func(uintptr) int | |||||
| 694 | // Retrieves the month of the year represented by @datetime in the Gregorian | 760 | // Retrieves the month of the year represented by @datetime in the Gregorian | ||
| 695 | // calendar. | 761 | // calendar. | ||
| 696 | func (x *DateTime) GetMonth() int { | 762 | func (x *DateTime) GetMonth() int { | ||
| 763 | + | core.LazyRegister(&xDateTimeGetMonth, "GLIB", "g_date_time_get_month", false) | |||
| 764 | + | ||||
| 697 | cret := xDateTimeGetMonth(x.GoPointer()) | 765 | cret := xDateTimeGetMonth(x.GoPointer()) | ||
| 698 | return cret | 766 | return cret | ||
| 699 | } | 767 | } | ||
| @@ -702,6 +770,8 @@ var xDateTimeGetSecond func(uintptr) int | |||||
| 702 | 770 | ||||
| 703 | // Retrieves the second of the minute represented by @datetime | 771 | // Retrieves the second of the minute represented by @datetime | ||
| 704 | func (x *DateTime) GetSecond() int { | 772 | func (x *DateTime) GetSecond() int { | ||
| 773 | + | core.LazyRegister(&xDateTimeGetSecond, "GLIB", "g_date_time_get_second", false) | |||
| 774 | + | ||||
| 705 | cret := xDateTimeGetSecond(x.GoPointer()) | 775 | cret := xDateTimeGetSecond(x.GoPointer()) | ||
| 706 | return cret | 776 | return cret | ||
| 707 | } | 777 | } | ||
| @@ -711,6 +781,8 @@ var xDateTimeGetSeconds func(uintptr) float64 | |||||
| 711 | // Retrieves the number of seconds since the start of the last minute, | 781 | // Retrieves the number of seconds since the start of the last minute, | ||
| 712 | // including the fractional part. | 782 | // including the fractional part. | ||
| 713 | func (x *DateTime) GetSeconds() float64 { | 783 | func (x *DateTime) GetSeconds() float64 { | ||
| 784 | + | core.LazyRegister(&xDateTimeGetSeconds, "GLIB", "g_date_time_get_seconds", false) | |||
| 785 | + | ||||
| 714 | cret := xDateTimeGetSeconds(x.GoPointer()) | 786 | cret := xDateTimeGetSeconds(x.GoPointer()) | ||
| 715 | return cret | 787 | return cret | ||
| 716 | } | 788 | } | ||
| @@ -719,6 +791,8 @@ var xDateTimeGetTimezone func(uintptr) uintptr | |||||
| 719 | 791 | ||||
| 720 | // Get the time zone for this @datetime. | 792 | // Get the time zone for this @datetime. | ||
| 721 | func (x *DateTime) GetTimezone() *TimeZone { | 793 | func (x *DateTime) GetTimezone() *TimeZone { | ||
| 794 | + | core.LazyRegister(&xDateTimeGetTimezone, "GLIB", "g_date_time_get_timezone", false) | |||
| 795 | + | ||||
| 722 | cret := xDateTimeGetTimezone(x.GoPointer()) | 796 | cret := xDateTimeGetTimezone(x.GoPointer()) | ||
| 723 | if cret == 0 { | 797 | if cret == 0 { | ||
| 724 | return nil | 798 | return nil | ||
| @@ -735,6 +809,8 @@ var xDateTimeGetTimezoneAbbreviation func(uintptr) string | |||||
| 735 | // months and "EDT" during the summer months when daylight savings | 809 | // months and "EDT" during the summer months when daylight savings | ||
| 736 | // time is in effect. | 810 | // time is in effect. | ||
| 737 | func (x *DateTime) GetTimezoneAbbreviation() string { | 811 | func (x *DateTime) GetTimezoneAbbreviation() string { | ||
| 812 | + | core.LazyRegister(&xDateTimeGetTimezoneAbbreviation, "GLIB", "g_date_time_get_timezone_abbreviation", false) | |||
| 813 | + | ||||
| 738 | cret := xDateTimeGetTimezoneAbbreviation(x.GoPointer()) | 814 | cret := xDateTimeGetTimezoneAbbreviation(x.GoPointer()) | ||
| 739 | return cret | 815 | return cret | ||
| 740 | } | 816 | } | ||
| @@ -750,6 +826,8 @@ var xDateTimeGetUtcOffset func(uintptr) TimeSpan | |||||
| 750 | // | 826 | // | ||
| 751 | // If @datetime represents UTC time, then the offset is always zero. | 827 | // If @datetime represents UTC time, then the offset is always zero. | ||
| 752 | func (x *DateTime) GetUtcOffset() TimeSpan { | 828 | func (x *DateTime) GetUtcOffset() TimeSpan { | ||
| 829 | + | core.LazyRegister(&xDateTimeGetUtcOffset, "GLIB", "g_date_time_get_utc_offset", false) | |||
| 830 | + | ||||
| 753 | cret := xDateTimeGetUtcOffset(x.GoPointer()) | 831 | cret := xDateTimeGetUtcOffset(x.GoPointer()) | ||
| 754 | return cret | 832 | return cret | ||
| 755 | } | 833 | } | ||
| @@ -788,6 +866,8 @@ var xDateTimeGetWeekNumberingYear func(uintptr) int | |||||
| 788 | // Note that January 1 0001 in the proleptic Gregorian calendar is a | 866 | // Note that January 1 0001 in the proleptic Gregorian calendar is a | ||
| 789 | // Monday, so this function never returns 0. | 867 | // Monday, so this function never returns 0. | ||
| 790 | func (x *DateTime) GetWeekNumberingYear() int { | 868 | func (x *DateTime) GetWeekNumberingYear() int { | ||
| 869 | + | core.LazyRegister(&xDateTimeGetWeekNumberingYear, "GLIB", "g_date_time_get_week_numbering_year", false) | |||
| 870 | + | ||||
| 791 | cret := xDateTimeGetWeekNumberingYear(x.GoPointer()) | 871 | cret := xDateTimeGetWeekNumberingYear(x.GoPointer()) | ||
| 792 | return cret | 872 | return cret | ||
| 793 | } | 873 | } | ||
| @@ -810,6 +890,8 @@ var xDateTimeGetWeekOfYear func(uintptr) int | |||||
| 810 | // considered as being part of the first ISO 8601 week of the next year | 890 | // considered as being part of the first ISO 8601 week of the next year | ||
| 811 | // if 4 or more days of that week are contained within the new year. | 891 | // if 4 or more days of that week are contained within the new year. | ||
| 812 | func (x *DateTime) GetWeekOfYear() int { | 892 | func (x *DateTime) GetWeekOfYear() int { | ||
| 893 | + | core.LazyRegister(&xDateTimeGetWeekOfYear, "GLIB", "g_date_time_get_week_of_year", false) | |||
| 894 | + | ||||
| 813 | cret := xDateTimeGetWeekOfYear(x.GoPointer()) | 895 | cret := xDateTimeGetWeekOfYear(x.GoPointer()) | ||
| 814 | return cret | 896 | return cret | ||
| 815 | } | 897 | } | ||
| @@ -818,6 +900,8 @@ var xDateTimeGetYear func(uintptr) int | |||||
| 818 | 900 | ||||
| 819 | // Retrieves the year represented by @datetime in the Gregorian calendar. | 901 | // Retrieves the year represented by @datetime in the Gregorian calendar. | ||
| 820 | func (x *DateTime) GetYear() int { | 902 | func (x *DateTime) GetYear() int { | ||
| 903 | + | core.LazyRegister(&xDateTimeGetYear, "GLIB", "g_date_time_get_year", false) | |||
| 904 | + | ||||
| 821 | cret := xDateTimeGetYear(x.GoPointer()) | 905 | cret := xDateTimeGetYear(x.GoPointer()) | ||
| 822 | return cret | 906 | return cret | ||
| 823 | } | 907 | } | ||
| @@ -826,6 +910,8 @@ var xDateTimeGetYmd func(uintptr, *int, *int, *int) | |||||
| 826 | 910 | ||||
| 827 | // Retrieves the Gregorian day, month, and year of a given #GDateTime. | 911 | // Retrieves the Gregorian day, month, and year of a given #GDateTime. | ||
| 828 | func (x *DateTime) GetYmd(YearVar *int, MonthVar *int, DayVar *int) { | 912 | func (x *DateTime) GetYmd(YearVar *int, MonthVar *int, DayVar *int) { | ||
| 913 | + | core.LazyRegister(&xDateTimeGetYmd, "GLIB", "g_date_time_get_ymd", false) | |||
| 914 | + | ||||
| 829 | xDateTimeGetYmd(x.GoPointer(), YearVar, MonthVar, DayVar) | 915 | xDateTimeGetYmd(x.GoPointer(), YearVar, MonthVar, DayVar) | ||
| 830 | } | 916 | } | ||
| 831 | 917 | ||||
| @@ -833,6 +919,8 @@ var xDateTimeHash func(uintptr) uint | |||||
| 833 | 919 | ||||
| 834 | // Hashes @datetime into a #guint, suitable for use within #GHashTable. | 920 | // Hashes @datetime into a #guint, suitable for use within #GHashTable. | ||
| 835 | func (x *DateTime) Hash() uint { | 921 | func (x *DateTime) Hash() uint { | ||
| 922 | + | core.LazyRegister(&xDateTimeHash, "GLIB", "g_date_time_hash", false) | |||
| 923 | + | ||||
| 836 | cret := xDateTimeHash(x.GoPointer()) | 924 | cret := xDateTimeHash(x.GoPointer()) | ||
| 837 | return cret | 925 | return cret | ||
| 838 | } | 926 | } | ||
| @@ -842,6 +930,8 @@ var xDateTimeIsDaylightSavings func(uintptr) bool | |||||
| 842 | // Determines if daylight savings time is in effect at the time and in | 930 | // Determines if daylight savings time is in effect at the time and in | ||
| 843 | // the time zone of @datetime. | 931 | // the time zone of @datetime. | ||
| 844 | func (x *DateTime) IsDaylightSavings() bool { | 932 | func (x *DateTime) IsDaylightSavings() bool { | ||
| 933 | + | core.LazyRegister(&xDateTimeIsDaylightSavings, "GLIB", "g_date_time_is_daylight_savings", false) | |||
| 934 | + | ||||
| 845 | cret := xDateTimeIsDaylightSavings(x.GoPointer()) | 935 | cret := xDateTimeIsDaylightSavings(x.GoPointer()) | ||
| 846 | return cret | 936 | return cret | ||
| 847 | } | 937 | } | ||
| @@ -850,6 +940,8 @@ var xDateTimeRef func(uintptr) uintptr | |||||
| 850 | 940 | ||||
| 851 | // Atomically increments the reference count of @datetime by one. | 941 | // Atomically increments the reference count of @datetime by one. | ||
| 852 | func (x *DateTime) Ref() *DateTime { | 942 | func (x *DateTime) Ref() *DateTime { | ||
| 943 | + | core.LazyRegister(&xDateTimeRef, "GLIB", "g_date_time_ref", false) | |||
| 944 | + | ||||
| 853 | cret := xDateTimeRef(x.GoPointer()) | 945 | cret := xDateTimeRef(x.GoPointer()) | ||
| 854 | if cret == 0 { | 946 | if cret == 0 { | ||
| 855 | return nil | 947 | return nil | ||
| @@ -865,6 +957,8 @@ var xDateTimeToLocal func(uintptr) uintptr | |||||
| 865 | // This call is equivalent to calling g_date_time_to_timezone() with the | 957 | // This call is equivalent to calling g_date_time_to_timezone() with the | ||
| 866 | // time zone returned by g_time_zone_new_local(). | 958 | // time zone returned by g_time_zone_new_local(). | ||
| 867 | func (x *DateTime) ToLocal() *DateTime { | 959 | func (x *DateTime) ToLocal() *DateTime { | ||
| 960 | + | core.LazyRegister(&xDateTimeToLocal, "GLIB", "g_date_time_to_local", false) | |||
| 961 | + | ||||
| 868 | cret := xDateTimeToLocal(x.GoPointer()) | 962 | cret := xDateTimeToLocal(x.GoPointer()) | ||
| 869 | if cret == 0 { | 963 | if cret == 0 { | ||
| 870 | return nil | 964 | return nil | ||
| @@ -888,6 +982,8 @@ var xDateTimeToTimeval func(uintptr, *TimeVal) bool | |||||
| 888 | // | 982 | // | ||
| 889 | // On systems where 'long' is 64bit, this function never fails. | 983 | // On systems where 'long' is 64bit, this function never fails. | ||
| 890 | func (x *DateTime) ToTimeval(TvVar *TimeVal) bool { | 984 | func (x *DateTime) ToTimeval(TvVar *TimeVal) bool { | ||
| 985 | + | core.LazyRegister(&xDateTimeToTimeval, "GLIB", "g_date_time_to_timeval", false) | |||
| 986 | + | ||||
| 891 | cret := xDateTimeToTimeval(x.GoPointer(), TvVar) | 987 | cret := xDateTimeToTimeval(x.GoPointer(), TvVar) | ||
| 892 | return cret | 988 | return cret | ||
| 893 | } | 989 | } | ||
| @@ -901,6 +997,8 @@ var xDateTimeToTimezone func(uintptr, *TimeZone) uintptr | |||||
| 901 | // example, converting 0001-01-01 00:00:00 UTC to a time zone west of | 997 | // example, converting 0001-01-01 00:00:00 UTC to a time zone west of | ||
| 902 | // Greenwich will fail (due to the year 0 being out of range). | 998 | // Greenwich will fail (due to the year 0 being out of range). | ||
| 903 | func (x *DateTime) ToTimezone(TzVar *TimeZone) *DateTime { | 999 | func (x *DateTime) ToTimezone(TzVar *TimeZone) *DateTime { | ||
| 1000 | + | core.LazyRegister(&xDateTimeToTimezone, "GLIB", "g_date_time_to_timezone", false) | |||
| 1001 | + | ||||
| 904 | cret := xDateTimeToTimezone(x.GoPointer(), TzVar) | 1002 | cret := xDateTimeToTimezone(x.GoPointer(), TzVar) | ||
| 905 | if cret == 0 { | 1003 | if cret == 0 { | ||
| 906 | return nil | 1004 | return nil | ||
| @@ -916,6 +1014,8 @@ var xDateTimeToUnix func(uintptr) int64 | |||||
| 916 | // Unix time is the number of seconds that have elapsed since 1970-01-01 | 1014 | // Unix time is the number of seconds that have elapsed since 1970-01-01 | ||
| 917 | // 00:00:00 UTC, regardless of the time zone associated with @datetime. | 1015 | // 00:00:00 UTC, regardless of the time zone associated with @datetime. | ||
| 918 | func (x *DateTime) ToUnix() int64 { | 1016 | func (x *DateTime) ToUnix() int64 { | ||
| 1017 | + | core.LazyRegister(&xDateTimeToUnix, "GLIB", "g_date_time_to_unix", false) | |||
| 1018 | + | ||||
| 919 | cret := xDateTimeToUnix(x.GoPointer()) | 1019 | cret := xDateTimeToUnix(x.GoPointer()) | ||
| 920 | return cret | 1020 | return cret | ||
| 921 | } | 1021 | } | ||
| @@ -927,6 +1027,8 @@ var xDateTimeToUnixUsec func(uintptr) int64 | |||||
| 927 | // Unix time is the number of microseconds that have elapsed since 1970-01-01 | 1027 | // Unix time is the number of microseconds that have elapsed since 1970-01-01 | ||
| 928 | // 00:00:00 UTC, regardless of the time zone associated with @datetime. | 1028 | // 00:00:00 UTC, regardless of the time zone associated with @datetime. | ||
| 929 | func (x *DateTime) ToUnixUsec() int64 { | 1029 | func (x *DateTime) ToUnixUsec() int64 { | ||
| 1030 | + | core.LazyRegister(&xDateTimeToUnixUsec, "GLIB", "g_date_time_to_unix_usec", false) | |||
| 1031 | + | ||||
| 930 | cret := xDateTimeToUnixUsec(x.GoPointer()) | 1032 | cret := xDateTimeToUnixUsec(x.GoPointer()) | ||
| 931 | return cret | 1033 | return cret | ||
| 932 | } | 1034 | } | ||
| @@ -939,6 +1041,8 @@ var xDateTimeToUtc func(uintptr) uintptr | |||||
| 939 | // This call is equivalent to calling g_date_time_to_timezone() with the | 1041 | // This call is equivalent to calling g_date_time_to_timezone() with the | ||
| 940 | // time zone returned by g_time_zone_new_utc(). | 1042 | // time zone returned by g_time_zone_new_utc(). | ||
| 941 | func (x *DateTime) ToUtc() *DateTime { | 1043 | func (x *DateTime) ToUtc() *DateTime { | ||
| 1044 | + | core.LazyRegister(&xDateTimeToUtc, "GLIB", "g_date_time_to_utc", false) | |||
| 1045 | + | ||||
| 942 | cret := xDateTimeToUtc(x.GoPointer()) | 1046 | cret := xDateTimeToUtc(x.GoPointer()) | ||
| 943 | if cret == 0 { | 1047 | if cret == 0 { | ||
| 944 | return nil | 1048 | return nil | ||
| @@ -953,6 +1057,8 @@ var xDateTimeUnref func(uintptr) | |||||
| 953 | // When the reference count reaches zero, the resources allocated by | 1057 | // When the reference count reaches zero, the resources allocated by | ||
| 954 | // @datetime are freed | 1058 | // @datetime are freed | ||
| 955 | func (x *DateTime) Unref() { | 1059 | func (x *DateTime) Unref() { | ||
| 1060 | + | core.LazyRegister(&xDateTimeUnref, "GLIB", "g_date_time_unref", false) | |||
| 1061 | + | ||||
| 956 | xDateTimeUnref(x.GoPointer()) | 1062 | xDateTimeUnref(x.GoPointer()) | ||
| 957 | } | 1063 | } | ||
| 958 | 1064 | ||||
| @@ -975,69 +1081,4 @@ const ( | |||||
| 975 | func init() { | 1081 | func init() { | ||
| 976 | core.SetPackageName("GLIB", "glib-2.0") | 1082 | core.SetPackageName("GLIB", "glib-2.0") | ||
| 977 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | 1083 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | ||
| 978 | - | var libs []uintptr | |||
| 979 | - | for _, libPath := range core.GetPaths("GLIB") { | |||
| 980 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 981 | - | if err != nil { | |||
| 982 | - | panic(err) | |||
| 983 | - | } | |||
| 984 | - | libs = append(libs, lib) | |||
| 985 | - | } | |||
| 986 | - | ||||
| 987 | - | core.PuregoSafeRegister(&xDateTimeGLibType, libs, "g_date_time_get_type") | |||
| 988 | - | ||||
| 989 | - | core.PuregoSafeRegister(&xNewDateTime, libs, "g_date_time_new") | |||
| 990 | - | core.PuregoSafeRegister(&xNewDateTimeFromIso8601, libs, "g_date_time_new_from_iso8601") | |||
| 991 | - | core.PuregoSafeRegister(&xNewDateTimeFromTimevalLocal, libs, "g_date_time_new_from_timeval_local") | |||
| 992 | - | core.PuregoSafeRegister(&xNewDateTimeFromTimevalUtc, libs, "g_date_time_new_from_timeval_utc") | |||
| 993 | - | core.PuregoSafeRegister(&xNewDateTimeFromUnixLocal, libs, "g_date_time_new_from_unix_local") | |||
| 994 | - | core.PuregoSafeRegister(&xNewDateTimeFromUnixLocalUsec, libs, "g_date_time_new_from_unix_local_usec") | |||
| 995 | - | core.PuregoSafeRegister(&xNewDateTimeFromUnixUtc, libs, "g_date_time_new_from_unix_utc") | |||
| 996 | - | core.PuregoSafeRegister(&xNewDateTimeFromUnixUtcUsec, libs, "g_date_time_new_from_unix_utc_usec") | |||
| 997 | - | core.PuregoSafeRegister(&xNewDateTimeLocal, libs, "g_date_time_new_local") | |||
| 998 | - | core.PuregoSafeRegister(&xNewDateTimeNow, libs, "g_date_time_new_now") | |||
| 999 | - | core.PuregoSafeRegister(&xNewDateTimeNowLocal, libs, "g_date_time_new_now_local") | |||
| 1000 | - | core.PuregoSafeRegister(&xNewDateTimeNowUtc, libs, "g_date_time_new_now_utc") | |||
| 1001 | - | core.PuregoSafeRegister(&xNewDateTimeUtc, libs, "g_date_time_new_utc") | |||
| 1002 | - | ||||
| 1003 | - | core.PuregoSafeRegister(&xDateTimeAdd, libs, "g_date_time_add") | |||
| 1004 | - | core.PuregoSafeRegister(&xDateTimeAddDays, libs, "g_date_time_add_days") | |||
| 1005 | - | core.PuregoSafeRegister(&xDateTimeAddFull, libs, "g_date_time_add_full") | |||
| 1006 | - | core.PuregoSafeRegister(&xDateTimeAddHours, libs, "g_date_time_add_hours") | |||
| 1007 | - | core.PuregoSafeRegister(&xDateTimeAddMinutes, libs, "g_date_time_add_minutes") | |||
| 1008 | - | core.PuregoSafeRegister(&xDateTimeAddMonths, libs, "g_date_time_add_months") | |||
| 1009 | - | core.PuregoSafeRegister(&xDateTimeAddSeconds, libs, "g_date_time_add_seconds") | |||
| 1010 | - | core.PuregoSafeRegister(&xDateTimeAddWeeks, libs, "g_date_time_add_weeks") | |||
| 1011 | - | core.PuregoSafeRegister(&xDateTimeAddYears, libs, "g_date_time_add_years") | |||
| 1012 | - | core.PuregoSafeRegister(&xDateTimeCompare, libs, "g_date_time_compare") | |||
| 1013 | - | core.PuregoSafeRegister(&xDateTimeDifference, libs, "g_date_time_difference") | |||
| 1014 | - | core.PuregoSafeRegister(&xDateTimeEqual, libs, "g_date_time_equal") | |||
| 1015 | - | core.PuregoSafeRegister(&xDateTimeFormat, libs, "g_date_time_format") | |||
| 1016 | - | core.PuregoSafeRegister(&xDateTimeFormatIso8601, libs, "g_date_time_format_iso8601") | |||
| 1017 | - | core.PuregoSafeRegister(&xDateTimeGetDayOfMonth, libs, "g_date_time_get_day_of_month") | |||
| 1018 | - | core.PuregoSafeRegister(&xDateTimeGetDayOfWeek, libs, "g_date_time_get_day_of_week") | |||
| 1019 | - | core.PuregoSafeRegister(&xDateTimeGetDayOfYear, libs, "g_date_time_get_day_of_year") | |||
| 1020 | - | core.PuregoSafeRegister(&xDateTimeGetHour, libs, "g_date_time_get_hour") | |||
| 1021 | - | core.PuregoSafeRegister(&xDateTimeGetMicrosecond, libs, "g_date_time_get_microsecond") | |||
| 1022 | - | core.PuregoSafeRegister(&xDateTimeGetMinute, libs, "g_date_time_get_minute") | |||
| 1023 | - | core.PuregoSafeRegister(&xDateTimeGetMonth, libs, "g_date_time_get_month") | |||
| 1024 | - | core.PuregoSafeRegister(&xDateTimeGetSecond, libs, "g_date_time_get_second") | |||
| 1025 | - | core.PuregoSafeRegister(&xDateTimeGetSeconds, libs, "g_date_time_get_seconds") | |||
| 1026 | - | core.PuregoSafeRegister(&xDateTimeGetTimezone, libs, "g_date_time_get_timezone") | |||
| 1027 | - | core.PuregoSafeRegister(&xDateTimeGetTimezoneAbbreviation, libs, "g_date_time_get_timezone_abbreviation") | |||
| 1028 | - | core.PuregoSafeRegister(&xDateTimeGetUtcOffset, libs, "g_date_time_get_utc_offset") | |||
| 1029 | - | core.PuregoSafeRegister(&xDateTimeGetWeekNumberingYear, libs, "g_date_time_get_week_numbering_year") | |||
| 1030 | - | core.PuregoSafeRegister(&xDateTimeGetWeekOfYear, libs, "g_date_time_get_week_of_year") | |||
| 1031 | - | core.PuregoSafeRegister(&xDateTimeGetYear, libs, "g_date_time_get_year") | |||
| 1032 | - | core.PuregoSafeRegister(&xDateTimeGetYmd, libs, "g_date_time_get_ymd") | |||
| 1033 | - | core.PuregoSafeRegister(&xDateTimeHash, libs, "g_date_time_hash") | |||
| 1034 | - | core.PuregoSafeRegister(&xDateTimeIsDaylightSavings, libs, "g_date_time_is_daylight_savings") | |||
| 1035 | - | core.PuregoSafeRegister(&xDateTimeRef, libs, "g_date_time_ref") | |||
| 1036 | - | core.PuregoSafeRegister(&xDateTimeToLocal, libs, "g_date_time_to_local") | |||
| 1037 | - | core.PuregoSafeRegister(&xDateTimeToTimeval, libs, "g_date_time_to_timeval") | |||
| 1038 | - | core.PuregoSafeRegister(&xDateTimeToTimezone, libs, "g_date_time_to_timezone") | |||
| 1039 | - | core.PuregoSafeRegister(&xDateTimeToUnix, libs, "g_date_time_to_unix") | |||
| 1040 | - | core.PuregoSafeRegister(&xDateTimeToUnixUsec, libs, "g_date_time_to_unix_usec") | |||
| 1041 | - | core.PuregoSafeRegister(&xDateTimeToUtc, libs, "g_date_time_to_utc") | |||
| 1042 | - | core.PuregoSafeRegister(&xDateTimeUnref, libs, "g_date_time_unref") | |||
| 1043 | } | 1084 | } | ||