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
| @@ -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" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gobject/types" | |
| @@ -19,6 +18,7 @@ type EventSequence struct { | |||
| 19 | 18 | var xEventSequenceGLibType func() types.GType | |
| 20 | 19 | ||
| 21 | 20 | func EventSequenceGLibType() types.GType { | |
| 21 | + | core.LazyRegister(&xEventSequenceGLibType, "GDK", "gdk_event_sequence_get_type", false) | |
| 22 | 22 | return xEventSequenceGLibType() | |
| 23 | 23 | } | |
| 24 | 24 | ||
| @@ -60,6 +60,7 @@ type CrossingMode int | |||
| 60 | 60 | var xCrossingModeGLibType func() types.GType | |
| 61 | 61 | ||
| 62 | 62 | func CrossingModeGLibType() types.GType { | |
| 63 | + | core.LazyRegister(&xCrossingModeGLibType, "GDK", "gdk_crossing_mode_get_type", false) | |
| 63 | 64 | return xCrossingModeGLibType() | |
| 64 | 65 | } | |
| 65 | 66 | ||
| @@ -96,6 +97,7 @@ type EventType int | |||
| 96 | 97 | var xEventTypeGLibType func() types.GType | |
| 97 | 98 | ||
| 98 | 99 | func EventTypeGLibType() types.GType { | |
| 100 | + | core.LazyRegister(&xEventTypeGLibType, "GDK", "gdk_event_type_get_type", false) | |
| 99 | 101 | return xEventTypeGLibType() | |
| 100 | 102 | } | |
| 101 | 103 | ||
| @@ -181,6 +183,7 @@ type KeyMatch int | |||
| 181 | 183 | var xKeyMatchGLibType func() types.GType | |
| 182 | 184 | ||
| 183 | 185 | func KeyMatchGLibType() types.GType { | |
| 186 | + | core.LazyRegister(&xKeyMatchGLibType, "GDK", "gdk_key_match_get_type", false) | |
| 184 | 187 | return xKeyMatchGLibType() | |
| 185 | 188 | } | |
| 186 | 189 | ||
| @@ -204,6 +207,7 @@ type NotifyType int | |||
| 204 | 207 | var xNotifyTypeGLibType func() types.GType | |
| 205 | 208 | ||
| 206 | 209 | func NotifyTypeGLibType() types.GType { | |
| 210 | + | core.LazyRegister(&xNotifyTypeGLibType, "GDK", "gdk_notify_type_get_type", false) | |
| 207 | 211 | return xNotifyTypeGLibType() | |
| 208 | 212 | } | |
| 209 | 213 | ||
| @@ -236,6 +240,7 @@ type ScrollDirection int | |||
| 236 | 240 | var xScrollDirectionGLibType func() types.GType | |
| 237 | 241 | ||
| 238 | 242 | func ScrollDirectionGLibType() types.GType { | |
| 243 | + | core.LazyRegister(&xScrollDirectionGLibType, "GDK", "gdk_scroll_direction_get_type", false) | |
| 239 | 244 | return xScrollDirectionGLibType() | |
| 240 | 245 | } | |
| 241 | 246 | ||
| @@ -275,6 +280,7 @@ type ScrollUnit int | |||
| 275 | 280 | var xScrollUnitGLibType func() types.GType | |
| 276 | 281 | ||
| 277 | 282 | func ScrollUnitGLibType() types.GType { | |
| 283 | + | core.LazyRegister(&xScrollUnitGLibType, "GDK", "gdk_scroll_unit_get_type", false) | |
| 278 | 284 | return xScrollUnitGLibType() | |
| 279 | 285 | } | |
| 280 | 286 | ||
| @@ -310,6 +316,7 @@ type TouchpadGesturePhase int | |||
| 310 | 316 | var xTouchpadGesturePhaseGLibType func() types.GType | |
| 311 | 317 | ||
| 312 | 318 | func TouchpadGesturePhaseGLibType() types.GType { | |
| 319 | + | core.LazyRegister(&xTouchpadGesturePhaseGLibType, "GDK", "gdk_touchpad_gesture_phase_get_type", false) | |
| 313 | 320 | return xTouchpadGesturePhaseGLibType() | |
| 314 | 321 | } | |
| 315 | 322 | ||
| @@ -338,6 +345,8 @@ var xEventsGetAngle func(uintptr, uintptr, *float64) bool | |||
| 338 | 345 | // This assumes that both events have X/Y information. | |
| 339 | 346 | // If not, this function returns %FALSE. | |
| 340 | 347 | func EventsGetAngle(Event1Var *Event, Event2Var *Event, AngleVar *float64) bool { | |
| 348 | + | core.LazyRegister(&xEventsGetAngle, "GDK", "gdk_events_get_angle", false) | |
| 349 | + | ||
| 341 | 350 | cret := xEventsGetAngle(Event1Var.GoPointer(), Event2Var.GoPointer(), AngleVar) | |
| 342 | 351 | return cret | |
| 343 | 352 | } | |
| @@ -349,6 +358,8 @@ var xEventsGetCenter func(uintptr, uintptr, *float64, *float64) bool | |||
| 349 | 358 | // This assumes that both events have X/Y information. | |
| 350 | 359 | // If not, this function returns %FALSE. | |
| 351 | 360 | func EventsGetCenter(Event1Var *Event, Event2Var *Event, XVar *float64, YVar *float64) bool { | |
| 361 | + | core.LazyRegister(&xEventsGetCenter, "GDK", "gdk_events_get_center", false) | |
| 362 | + | ||
| 352 | 363 | cret := xEventsGetCenter(Event1Var.GoPointer(), Event2Var.GoPointer(), XVar, YVar) | |
| 353 | 364 | return cret | |
| 354 | 365 | } | |
| @@ -360,6 +371,8 @@ var xEventsGetDistance func(uintptr, uintptr, *float64) bool | |||
| 360 | 371 | // This assumes that both events have X/Y information. | |
| 361 | 372 | // If not, this function returns %FALSE. | |
| 362 | 373 | func EventsGetDistance(Event1Var *Event, Event2Var *Event, DistanceVar *float64) bool { | |
| 374 | + | core.LazyRegister(&xEventsGetDistance, "GDK", "gdk_events_get_distance", false) | |
| 375 | + | ||
| 363 | 376 | cret := xEventsGetDistance(Event1Var.GoPointer(), Event2Var.GoPointer(), DistanceVar) | |
| 364 | 377 | return cret | |
| 365 | 378 | } | |
| @@ -372,6 +385,7 @@ type ButtonEvent struct { | |||
| 372 | 385 | var xButtonEventGLibType func() types.GType | |
| 373 | 386 | ||
| 374 | 387 | func ButtonEventGLibType() types.GType { | |
| 388 | + | core.LazyRegister(&xButtonEventGLibType, "GDK", "gdk_button_event_get_type", false) | |
| 375 | 389 | return xButtonEventGLibType() | |
| 376 | 390 | } | |
| 377 | 391 | ||
| @@ -385,6 +399,8 @@ var xButtonEventGetButton func(uintptr) uint | |||
| 385 | 399 | ||
| 386 | 400 | // Extract the button number from a button event. | |
| 387 | 401 | func (x *ButtonEvent) GetButton() uint { | |
| 402 | + | core.LazyRegister(&xButtonEventGetButton, "GDK", "gdk_button_event_get_button", false) | |
| 403 | + | ||
| 388 | 404 | cret := xButtonEventGetButton(x.GoPointer()) | |
| 389 | 405 | return cret | |
| 390 | 406 | } | |
| @@ -408,6 +424,7 @@ type CrossingEvent struct { | |||
| 408 | 424 | var xCrossingEventGLibType func() types.GType | |
| 409 | 425 | ||
| 410 | 426 | func CrossingEventGLibType() types.GType { | |
| 427 | + | core.LazyRegister(&xCrossingEventGLibType, "GDK", "gdk_crossing_event_get_type", false) | |
| 411 | 428 | return xCrossingEventGLibType() | |
| 412 | 429 | } | |
| 413 | 430 | ||
| @@ -421,6 +438,8 @@ var xCrossingEventGetDetail func(uintptr) NotifyType | |||
| 421 | 438 | ||
| 422 | 439 | // Extracts the notify detail from a crossing event. | |
| 423 | 440 | func (x *CrossingEvent) GetDetail() NotifyType { | |
| 441 | + | core.LazyRegister(&xCrossingEventGetDetail, "GDK", "gdk_crossing_event_get_detail", false) | |
| 442 | + | ||
| 424 | 443 | cret := xCrossingEventGetDetail(x.GoPointer()) | |
| 425 | 444 | return cret | |
| 426 | 445 | } | |
| @@ -429,6 +448,8 @@ var xCrossingEventGetFocus func(uintptr) bool | |||
| 429 | 448 | ||
| 430 | 449 | // Checks if the @event surface is the focus surface. | |
| 431 | 450 | func (x *CrossingEvent) GetFocus() bool { | |
| 451 | + | core.LazyRegister(&xCrossingEventGetFocus, "GDK", "gdk_crossing_event_get_focus", false) | |
| 452 | + | ||
| 432 | 453 | cret := xCrossingEventGetFocus(x.GoPointer()) | |
| 433 | 454 | return cret | |
| 434 | 455 | } | |
| @@ -437,6 +458,8 @@ var xCrossingEventGetMode func(uintptr) CrossingMode | |||
| 437 | 458 | ||
| 438 | 459 | // Extracts the crossing mode from a crossing event. | |
| 439 | 460 | func (x *CrossingEvent) GetMode() CrossingMode { | |
| 461 | + | core.LazyRegister(&xCrossingEventGetMode, "GDK", "gdk_crossing_event_get_mode", false) | |
| 462 | + | ||
| 440 | 463 | cret := xCrossingEventGetMode(x.GoPointer()) | |
| 441 | 464 | return cret | |
| 442 | 465 | } | |
| @@ -460,6 +483,7 @@ type DNDEvent struct { | |||
| 460 | 483 | var xDNDEventGLibType func() types.GType | |
| 461 | 484 | ||
| 462 | 485 | func DNDEventGLibType() types.GType { | |
| 486 | + | core.LazyRegister(&xDNDEventGLibType, "GDK", "gdk_dnd_event_get_type", false) | |
| 463 | 487 | return xDNDEventGLibType() | |
| 464 | 488 | } | |
| 465 | 489 | ||
| @@ -473,6 +497,7 @@ var xDNDEventGetDrop func(uintptr) uintptr | |||
| 473 | 497 | ||
| 474 | 498 | // Gets the `GdkDrop` object from a DND event. | |
| 475 | 499 | func (x *DNDEvent) GetDrop() *Drop { | |
| 500 | + | core.LazyRegister(&xDNDEventGetDrop, "GDK", "gdk_dnd_event_get_drop", false) | |
| 476 | 501 | var cls *Drop | |
| 477 | 502 | ||
| 478 | 503 | cret := xDNDEventGetDrop(x.GoPointer()) | |
| @@ -505,6 +530,7 @@ type DeleteEvent struct { | |||
| 505 | 530 | var xDeleteEventGLibType func() types.GType | |
| 506 | 531 | ||
| 507 | 532 | func DeleteEventGLibType() types.GType { | |
| 533 | + | core.LazyRegister(&xDeleteEventGLibType, "GDK", "gdk_delete_event_get_type", false) | |
| 508 | 534 | return xDeleteEventGLibType() | |
| 509 | 535 | } | |
| 510 | 536 | ||
| @@ -539,6 +565,7 @@ type Event struct { | |||
| 539 | 565 | var xEventGLibType func() types.GType | |
| 540 | 566 | ||
| 541 | 567 | func EventGLibType() types.GType { | |
| 568 | + | core.LazyRegister(&xEventGLibType, "GDK", "gdk_event_get_type", false) | |
| 542 | 569 | return xEventGLibType() | |
| 543 | 570 | } | |
| 544 | 571 | ||
| @@ -559,6 +586,8 @@ var xEventGetAngle func(uintptr, uintptr, *float64) bool | |||
| 559 | 586 | // This assumes that both events have X/Y information. | |
| 560 | 587 | // If not, this function returns %FALSE. | |
| 561 | 588 | func (x *Event) GetAngle(Event2Var *Event, AngleVar *float64) bool { | |
| 589 | + | core.LazyRegister(&xEventGetAngle, "GDK", "gdk_events_get_angle", false) | |
| 590 | + | ||
| 562 | 591 | cret := xEventGetAngle(x.GoPointer(), Event2Var.GoPointer(), AngleVar) | |
| 563 | 592 | return cret | |
| 564 | 593 | } | |
| @@ -570,6 +599,8 @@ var xEventGetCenter func(uintptr, uintptr, *float64, *float64) bool | |||
| 570 | 599 | // This assumes that both events have X/Y information. | |
| 571 | 600 | // If not, this function returns %FALSE. | |
| 572 | 601 | func (x *Event) GetCenter(Event2Var *Event, XVar *float64, YVar *float64) bool { | |
| 602 | + | core.LazyRegister(&xEventGetCenter, "GDK", "gdk_events_get_center", false) | |
| 603 | + | ||
| 573 | 604 | cret := xEventGetCenter(x.GoPointer(), Event2Var.GoPointer(), XVar, YVar) | |
| 574 | 605 | return cret | |
| 575 | 606 | } | |
| @@ -581,6 +612,8 @@ var xEventGetDistance func(uintptr, uintptr, *float64) bool | |||
| 581 | 612 | // This assumes that both events have X/Y information. | |
| 582 | 613 | // If not, this function returns %FALSE. | |
| 583 | 614 | func (x *Event) GetDistance(Event2Var *Event, DistanceVar *float64) bool { | |
| 615 | + | core.LazyRegister(&xEventGetDistance, "GDK", "gdk_events_get_distance", false) | |
| 616 | + | ||
| 584 | 617 | cret := xEventGetDistance(x.GoPointer(), Event2Var.GoPointer(), DistanceVar) | |
| 585 | 618 | return cret | |
| 586 | 619 | } | |
| @@ -592,6 +625,8 @@ var xEventGetAxes func(uintptr, *[]float64, *uint) bool | |||
| 592 | 625 | // To find out which axes are used, use [method@Gdk.DeviceTool.get_axes] | |
| 593 | 626 | // on the device tool returned by [method@Gdk.Event.get_device_tool]. | |
| 594 | 627 | func (x *Event) GetAxes(AxesVar *[]float64, NAxesVar *uint) bool { | |
| 628 | + | core.LazyRegister(&xEventGetAxes, "GDK", "gdk_event_get_axes", false) | |
| 629 | + | ||
| 595 | 630 | cret := xEventGetAxes(x.GoPointer(), AxesVar, NAxesVar) | |
| 596 | 631 | return cret | |
| 597 | 632 | } | |
| @@ -604,6 +639,8 @@ var xEventGetAxis func(uintptr, AxisUse, *float64) bool | |||
| 604 | 639 | // To find out which axes are used, use [method@Gdk.DeviceTool.get_axes] | |
| 605 | 640 | // on the device tool returned by [method@Gdk.Event.get_device_tool]. | |
| 606 | 641 | func (x *Event) GetAxis(AxisUseVar AxisUse, ValueVar *float64) bool { | |
| 642 | + | core.LazyRegister(&xEventGetAxis, "GDK", "gdk_event_get_axis", false) | |
| 643 | + | ||
| 607 | 644 | cret := xEventGetAxis(x.GoPointer(), AxisUseVar, ValueVar) | |
| 608 | 645 | return cret | |
| 609 | 646 | } | |
| @@ -612,6 +649,7 @@ var xEventGetDevice func(uintptr) uintptr | |||
| 612 | 649 | ||
| 613 | 650 | // Returns the device of an event. | |
| 614 | 651 | func (x *Event) GetDevice() *Device { | |
| 652 | + | core.LazyRegister(&xEventGetDevice, "GDK", "gdk_event_get_device", false) | |
| 615 | 653 | var cls *Device | |
| 616 | 654 | ||
| 617 | 655 | cret := xEventGetDevice(x.GoPointer()) | |
| @@ -638,6 +676,7 @@ var xEventGetDeviceTool func(uintptr) uintptr | |||
| 638 | 676 | // the application lifetime, if settings must be stored | |
| 639 | 677 | // persistently across runs, see [method@Gdk.DeviceTool.get_serial]. | |
| 640 | 678 | func (x *Event) GetDeviceTool() *DeviceTool { | |
| 679 | + | core.LazyRegister(&xEventGetDeviceTool, "GDK", "gdk_event_get_device_tool", false) | |
| 641 | 680 | var cls *DeviceTool | |
| 642 | 681 | ||
| 643 | 682 | cret := xEventGetDeviceTool(x.GoPointer()) | |
| @@ -655,6 +694,7 @@ var xEventGetDisplay func(uintptr) uintptr | |||
| 655 | 694 | ||
| 656 | 695 | // Retrieves the display associated to the @event. | |
| 657 | 696 | func (x *Event) GetDisplay() *Display { | |
| 697 | + | core.LazyRegister(&xEventGetDisplay, "GDK", "gdk_event_get_display", false) | |
| 658 | 698 | var cls *Display | |
| 659 | 699 | ||
| 660 | 700 | cret := xEventGetDisplay(x.GoPointer()) | |
| @@ -675,6 +715,8 @@ var xEventGetEventSequence func(uintptr) uintptr | |||
| 675 | 715 | // Related touch events are connected in a sequence. Other | |
| 676 | 716 | // events typically don't have event sequence information. | |
| 677 | 717 | func (x *Event) GetEventSequence() *EventSequence { | |
| 718 | + | core.LazyRegister(&xEventGetEventSequence, "GDK", "gdk_event_get_event_sequence", false) | |
| 719 | + | ||
| 678 | 720 | cret := xEventGetEventSequence(x.GoPointer()) | |
| 679 | 721 | if cret == 0 { | |
| 680 | 722 | return nil | |
| @@ -686,6 +728,8 @@ var xEventGetEventType func(uintptr) EventType | |||
| 686 | 728 | ||
| 687 | 729 | // Retrieves the type of the event. | |
| 688 | 730 | func (x *Event) GetEventType() EventType { | |
| 731 | + | core.LazyRegister(&xEventGetEventType, "GDK", "gdk_event_get_event_type", false) | |
| 732 | + | ||
| 689 | 733 | cret := xEventGetEventType(x.GoPointer()) | |
| 690 | 734 | return cret | |
| 691 | 735 | } | |
| @@ -702,6 +746,8 @@ var xEventGetHistory func(uintptr, *uint) uintptr | |||
| 702 | 746 | // events do it only if one of the mouse buttons is down, or the device | |
| 703 | 747 | // has a tool. | |
| 704 | 748 | func (x *Event) GetHistory(OutNCoordsVar *uint) uintptr { | |
| 749 | + | core.LazyRegister(&xEventGetHistory, "GDK", "gdk_event_get_history", false) | |
| 750 | + | ||
| 705 | 751 | cret := xEventGetHistory(x.GoPointer(), OutNCoordsVar) | |
| 706 | 752 | return cret | |
| 707 | 753 | } | |
| @@ -710,6 +756,8 @@ var xEventGetModifierState func(uintptr) ModifierType | |||
| 710 | 756 | ||
| 711 | 757 | // Returns the modifier state field of an event. | |
| 712 | 758 | func (x *Event) GetModifierState() ModifierType { | |
| 759 | + | core.LazyRegister(&xEventGetModifierState, "GDK", "gdk_event_get_modifier_state", false) | |
| 760 | + | ||
| 713 | 761 | cret := xEventGetModifierState(x.GoPointer()) | |
| 714 | 762 | return cret | |
| 715 | 763 | } | |
| @@ -720,6 +768,8 @@ var xEventGetPointerEmulated func(uintptr) bool | |||
| 720 | 768 | // | |
| 721 | 769 | // Emulated pointer events typically originate from a touch events. | |
| 722 | 770 | func (x *Event) GetPointerEmulated() bool { | |
| 771 | + | core.LazyRegister(&xEventGetPointerEmulated, "GDK", "gdk_event_get_pointer_emulated", false) | |
| 772 | + | ||
| 723 | 773 | cret := xEventGetPointerEmulated(x.GoPointer()) | |
| 724 | 774 | return cret | |
| 725 | 775 | } | |
| @@ -730,6 +780,8 @@ var xEventGetPosition func(uintptr, *float64, *float64) bool | |||
| 730 | 780 | // | |
| 731 | 781 | // This position is in [surface coordinates](coordinates.html). | |
| 732 | 782 | func (x *Event) GetPosition(XVar *float64, YVar *float64) bool { | |
| 783 | + | core.LazyRegister(&xEventGetPosition, "GDK", "gdk_event_get_position", false) | |
| 784 | + | ||
| 733 | 785 | cret := xEventGetPosition(x.GoPointer(), XVar, YVar) | |
| 734 | 786 | return cret | |
| 735 | 787 | } | |
| @@ -738,6 +790,7 @@ var xEventGetSeat func(uintptr) uintptr | |||
| 738 | 790 | ||
| 739 | 791 | // Returns the seat that originated the event. | |
| 740 | 792 | func (x *Event) GetSeat() *Seat { | |
| 793 | + | core.LazyRegister(&xEventGetSeat, "GDK", "gdk_event_get_seat", false) | |
| 741 | 794 | var cls *Seat | |
| 742 | 795 | ||
| 743 | 796 | cret := xEventGetSeat(x.GoPointer()) | |
| @@ -755,6 +808,7 @@ var xEventGetSurface func(uintptr) uintptr | |||
| 755 | 808 | ||
| 756 | 809 | // Extracts the surface associated with an event. | |
| 757 | 810 | func (x *Event) GetSurface() *Surface { | |
| 811 | + | core.LazyRegister(&xEventGetSurface, "GDK", "gdk_event_get_surface", false) | |
| 758 | 812 | var cls *Surface | |
| 759 | 813 | ||
| 760 | 814 | cret := xEventGetSurface(x.GoPointer()) | |
| @@ -775,6 +829,8 @@ var xEventGetTime func(uintptr) uint32 | |||
| 775 | 829 | // Not all events have timestamps. In that case, this function | |
| 776 | 830 | // returns %GDK_CURRENT_TIME. | |
| 777 | 831 | func (x *Event) GetTime() uint32 { | |
| 832 | + | core.LazyRegister(&xEventGetTime, "GDK", "gdk_event_get_time", false) | |
| 833 | + | ||
| 778 | 834 | cret := xEventGetTime(x.GoPointer()) | |
| 779 | 835 | return cret | |
| 780 | 836 | } | |
| @@ -783,6 +839,7 @@ var xEventRef func(uintptr) uintptr | |||
| 783 | 839 | ||
| 784 | 840 | // Increase the ref count of @event. | |
| 785 | 841 | func (x *Event) Ref() *Event { | |
| 842 | + | core.LazyRegister(&xEventRef, "GDK", "gdk_event_ref", false) | |
| 786 | 843 | var cls *Event | |
| 787 | 844 | ||
| 788 | 845 | cret := xEventRef(x.GoPointer()) | |
| @@ -809,6 +866,8 @@ var xEventTriggersContextMenu func(uintptr) bool | |||
| 809 | 866 | // event->button == GDK_BUTTON_SECONDARY | |
| 810 | 867 | // ``` | |
| 811 | 868 | func (x *Event) TriggersContextMenu() bool { | |
| 869 | + | core.LazyRegister(&xEventTriggersContextMenu, "GDK", "gdk_event_triggers_context_menu", false) | |
| 870 | + | ||
| 812 | 871 | cret := xEventTriggersContextMenu(x.GoPointer()) | |
| 813 | 872 | return cret | |
| 814 | 873 | } | |
| @@ -819,6 +878,8 @@ var xEventUnref func(uintptr) | |||
| 819 | 878 | // | |
| 820 | 879 | // If the last reference is dropped, the structure is freed. | |
| 821 | 880 | func (x *Event) Unref() { | |
| 881 | + | core.LazyRegister(&xEventUnref, "GDK", "gdk_event_unref", false) | |
| 882 | + | ||
| 822 | 883 | xEventUnref(x.GoPointer()) | |
| 823 | 884 | } | |
| 824 | 885 | ||
| @@ -841,6 +902,7 @@ type FocusEvent struct { | |||
| 841 | 902 | var xFocusEventGLibType func() types.GType | |
| 842 | 903 | ||
| 843 | 904 | func FocusEventGLibType() types.GType { | |
| 905 | + | core.LazyRegister(&xFocusEventGLibType, "GDK", "gdk_focus_event_get_type", false) | |
| 844 | 906 | return xFocusEventGLibType() | |
| 845 | 907 | } | |
| 846 | 908 | ||
| @@ -855,6 +917,8 @@ var xFocusEventGetIn func(uintptr) bool | |||
| 855 | 917 | // Extracts whether this event is about focus entering or | |
| 856 | 918 | // leaving the surface. | |
| 857 | 919 | func (x *FocusEvent) GetIn() bool { | |
| 920 | + | core.LazyRegister(&xFocusEventGetIn, "GDK", "gdk_focus_event_get_in", false) | |
| 921 | + | ||
| 858 | 922 | cret := xFocusEventGetIn(x.GoPointer()) | |
| 859 | 923 | return cret | |
| 860 | 924 | } | |
| @@ -878,6 +942,7 @@ type GrabBrokenEvent struct { | |||
| 878 | 942 | var xGrabBrokenEventGLibType func() types.GType | |
| 879 | 943 | ||
| 880 | 944 | func GrabBrokenEventGLibType() types.GType { | |
| 945 | + | core.LazyRegister(&xGrabBrokenEventGLibType, "GDK", "gdk_grab_broken_event_get_type", false) | |
| 881 | 946 | return xGrabBrokenEventGLibType() | |
| 882 | 947 | } | |
| 883 | 948 | ||
| @@ -891,6 +956,7 @@ var xGrabBrokenEventGetGrabSurface func(uintptr) uintptr | |||
| 891 | 956 | ||
| 892 | 957 | // Extracts the grab surface from a grab broken event. | |
| 893 | 958 | func (x *GrabBrokenEvent) GetGrabSurface() *Surface { | |
| 959 | + | core.LazyRegister(&xGrabBrokenEventGetGrabSurface, "GDK", "gdk_grab_broken_event_get_grab_surface", false) | |
| 894 | 960 | var cls *Surface | |
| 895 | 961 | ||
| 896 | 962 | cret := xGrabBrokenEventGetGrabSurface(x.GoPointer()) | |
| @@ -908,6 +974,8 @@ var xGrabBrokenEventGetImplicit func(uintptr) bool | |||
| 908 | 974 | ||
| 909 | 975 | // Checks whether the grab broken event is for an implicit grab. | |
| 910 | 976 | func (x *GrabBrokenEvent) GetImplicit() bool { | |
| 977 | + | core.LazyRegister(&xGrabBrokenEventGetImplicit, "GDK", "gdk_grab_broken_event_get_implicit", false) | |
| 978 | + | ||
| 911 | 979 | cret := xGrabBrokenEventGetImplicit(x.GoPointer()) | |
| 912 | 980 | return cret | |
| 913 | 981 | } | |
| @@ -931,6 +999,7 @@ type KeyEvent struct { | |||
| 931 | 999 | var xKeyEventGLibType func() types.GType | |
| 932 | 1000 | ||
| 933 | 1001 | func KeyEventGLibType() types.GType { | |
| 1002 | + | core.LazyRegister(&xKeyEventGLibType, "GDK", "gdk_key_event_get_type", false) | |
| 934 | 1003 | return xKeyEventGLibType() | |
| 935 | 1004 | } | |
| 936 | 1005 | ||
| @@ -944,6 +1013,8 @@ var xKeyEventGetConsumedModifiers func(uintptr) ModifierType | |||
| 944 | 1013 | ||
| 945 | 1014 | // Extracts the consumed modifiers from a key event. | |
| 946 | 1015 | func (x *KeyEvent) GetConsumedModifiers() ModifierType { | |
| 1016 | + | core.LazyRegister(&xKeyEventGetConsumedModifiers, "GDK", "gdk_key_event_get_consumed_modifiers", false) | |
| 1017 | + | ||
| 947 | 1018 | cret := xKeyEventGetConsumedModifiers(x.GoPointer()) | |
| 948 | 1019 | return cret | |
| 949 | 1020 | } | |
| @@ -952,6 +1023,8 @@ var xKeyEventGetKeycode func(uintptr) uint | |||
| 952 | 1023 | ||
| 953 | 1024 | // Extracts the keycode from a key event. | |
| 954 | 1025 | func (x *KeyEvent) GetKeycode() uint { | |
| 1026 | + | core.LazyRegister(&xKeyEventGetKeycode, "GDK", "gdk_key_event_get_keycode", false) | |
| 1027 | + | ||
| 955 | 1028 | cret := xKeyEventGetKeycode(x.GoPointer()) | |
| 956 | 1029 | return cret | |
| 957 | 1030 | } | |
| @@ -960,6 +1033,8 @@ var xKeyEventGetKeyval func(uintptr) uint | |||
| 960 | 1033 | ||
| 961 | 1034 | // Extracts the keyval from a key event. | |
| 962 | 1035 | func (x *KeyEvent) GetKeyval() uint { | |
| 1036 | + | core.LazyRegister(&xKeyEventGetKeyval, "GDK", "gdk_key_event_get_keyval", false) | |
| 1037 | + | ||
| 963 | 1038 | cret := xKeyEventGetKeyval(x.GoPointer()) | |
| 964 | 1039 | return cret | |
| 965 | 1040 | } | |
| @@ -968,6 +1043,8 @@ var xKeyEventGetLayout func(uintptr) uint | |||
| 968 | 1043 | ||
| 969 | 1044 | // Extracts the layout from a key event. | |
| 970 | 1045 | func (x *KeyEvent) GetLayout() uint { | |
| 1046 | + | core.LazyRegister(&xKeyEventGetLayout, "GDK", "gdk_key_event_get_layout", false) | |
| 1047 | + | ||
| 971 | 1048 | cret := xKeyEventGetLayout(x.GoPointer()) | |
| 972 | 1049 | return cret | |
| 973 | 1050 | } | |
| @@ -976,6 +1053,8 @@ var xKeyEventGetLevel func(uintptr) uint | |||
| 976 | 1053 | ||
| 977 | 1054 | // Extracts the shift level from a key event. | |
| 978 | 1055 | func (x *KeyEvent) GetLevel() uint { | |
| 1056 | + | core.LazyRegister(&xKeyEventGetLevel, "GDK", "gdk_key_event_get_level", false) | |
| 1057 | + | ||
| 979 | 1058 | cret := xKeyEventGetLevel(x.GoPointer()) | |
| 980 | 1059 | return cret | |
| 981 | 1060 | } | |
| @@ -987,6 +1066,8 @@ var xKeyEventGetMatch func(uintptr, *uint, *ModifierType) bool | |||
| 987 | 1066 | // | |
| 988 | 1067 | // See [method@Gdk.KeyEvent.matches]. | |
| 989 | 1068 | func (x *KeyEvent) GetMatch(KeyvalVar *uint, ModifiersVar *ModifierType) bool { | |
| 1069 | + | core.LazyRegister(&xKeyEventGetMatch, "GDK", "gdk_key_event_get_match", false) | |
| 1070 | + | ||
| 990 | 1071 | cret := xKeyEventGetMatch(x.GoPointer(), KeyvalVar, ModifiersVar) | |
| 991 | 1072 | return cret | |
| 992 | 1073 | } | |
| @@ -995,6 +1076,8 @@ var xKeyEventIsModifier func(uintptr) bool | |||
| 995 | 1076 | ||
| 996 | 1077 | // Extracts whether the key event is for a modifier key. | |
| 997 | 1078 | func (x *KeyEvent) IsModifier() bool { | |
| 1079 | + | core.LazyRegister(&xKeyEventIsModifier, "GDK", "gdk_key_event_is_modifier", false) | |
| 1080 | + | ||
| 998 | 1081 | cret := xKeyEventIsModifier(x.GoPointer()) | |
| 999 | 1082 | return cret | |
| 1000 | 1083 | } | |
| @@ -1010,6 +1093,8 @@ var xKeyEventMatches func(uintptr, uint, ModifierType) KeyMatch | |||
| 1010 | 1093 | // | |
| 1011 | 1094 | // Note that we ignore Caps Lock for matching. | |
| 1012 | 1095 | func (x *KeyEvent) Matches(KeyvalVar uint, ModifiersVar ModifierType) KeyMatch { | |
| 1096 | + | core.LazyRegister(&xKeyEventMatches, "GDK", "gdk_key_event_matches", false) | |
| 1097 | + | ||
| 1013 | 1098 | cret := xKeyEventMatches(x.GoPointer(), KeyvalVar, ModifiersVar) | |
| 1014 | 1099 | return cret | |
| 1015 | 1100 | } | |
| @@ -1033,6 +1118,7 @@ type MotionEvent struct { | |||
| 1033 | 1118 | var xMotionEventGLibType func() types.GType | |
| 1034 | 1119 | ||
| 1035 | 1120 | func MotionEventGLibType() types.GType { | |
| 1121 | + | core.LazyRegister(&xMotionEventGLibType, "GDK", "gdk_motion_event_get_type", false) | |
| 1036 | 1122 | return xMotionEventGLibType() | |
| 1037 | 1123 | } | |
| 1038 | 1124 | ||
| @@ -1061,6 +1147,7 @@ type PadEvent struct { | |||
| 1061 | 1147 | var xPadEventGLibType func() types.GType | |
| 1062 | 1148 | ||
| 1063 | 1149 | func PadEventGLibType() types.GType { | |
| 1150 | + | core.LazyRegister(&xPadEventGLibType, "GDK", "gdk_pad_event_get_type", false) | |
| 1064 | 1151 | return xPadEventGLibType() | |
| 1065 | 1152 | } | |
| 1066 | 1153 | ||
| @@ -1074,6 +1161,8 @@ var xPadEventGetAxisValue func(uintptr, *uint, *float64) | |||
| 1074 | 1161 | ||
| 1075 | 1162 | // Extracts the information from a pad strip or ring event. | |
| 1076 | 1163 | func (x *PadEvent) GetAxisValue(IndexVar *uint, ValueVar *float64) { | |
| 1164 | + | core.LazyRegister(&xPadEventGetAxisValue, "GDK", "gdk_pad_event_get_axis_value", false) | |
| 1165 | + | ||
| 1077 | 1166 | xPadEventGetAxisValue(x.GoPointer(), IndexVar, ValueVar) | |
| 1078 | 1167 | } | |
| 1079 | 1168 | ||
| @@ -1082,6 +1171,8 @@ var xPadEventGetButton func(uintptr) uint | |||
| 1082 | 1171 | // Extracts information about the pressed button from | |
| 1083 | 1172 | // a pad event. | |
| 1084 | 1173 | func (x *PadEvent) GetButton() uint { | |
| 1174 | + | core.LazyRegister(&xPadEventGetButton, "GDK", "gdk_pad_event_get_button", false) | |
| 1175 | + | ||
| 1085 | 1176 | cret := xPadEventGetButton(x.GoPointer()) | |
| 1086 | 1177 | return cret | |
| 1087 | 1178 | } | |
| @@ -1090,6 +1181,8 @@ var xPadEventGetGroupMode func(uintptr, *uint, *uint) | |||
| 1090 | 1181 | ||
| 1091 | 1182 | // Extracts group and mode information from a pad event. | |
| 1092 | 1183 | func (x *PadEvent) GetGroupMode(GroupVar *uint, ModeVar *uint) { | |
| 1184 | + | core.LazyRegister(&xPadEventGetGroupMode, "GDK", "gdk_pad_event_get_group_mode", false) | |
| 1185 | + | ||
| 1093 | 1186 | xPadEventGetGroupMode(x.GoPointer(), GroupVar, ModeVar) | |
| 1094 | 1187 | } | |
| 1095 | 1188 | ||
| @@ -1112,6 +1205,7 @@ type ProximityEvent struct { | |||
| 1112 | 1205 | var xProximityEventGLibType func() types.GType | |
| 1113 | 1206 | ||
| 1114 | 1207 | func ProximityEventGLibType() types.GType { | |
| 1208 | + | core.LazyRegister(&xProximityEventGLibType, "GDK", "gdk_proximity_event_get_type", false) | |
| 1115 | 1209 | return xProximityEventGLibType() | |
| 1116 | 1210 | } | |
| 1117 | 1211 | ||
| @@ -1140,6 +1234,7 @@ type ScrollEvent struct { | |||
| 1140 | 1234 | var xScrollEventGLibType func() types.GType | |
| 1141 | 1235 | ||
| 1142 | 1236 | func ScrollEventGLibType() types.GType { | |
| 1237 | + | core.LazyRegister(&xScrollEventGLibType, "GDK", "gdk_scroll_event_get_type", false) | |
| 1143 | 1238 | return xScrollEventGLibType() | |
| 1144 | 1239 | } | |
| 1145 | 1240 | ||
| @@ -1159,6 +1254,8 @@ var xScrollEventGetDeltas func(uintptr, *float64, *float64) | |||
| 1159 | 1254 | // For the representation unit of these deltas, see | |
| 1160 | 1255 | // [method@Gdk.ScrollEvent.get_unit]. | |
| 1161 | 1256 | func (x *ScrollEvent) GetDeltas(DeltaXVar *float64, DeltaYVar *float64) { | |
| 1257 | + | core.LazyRegister(&xScrollEventGetDeltas, "GDK", "gdk_scroll_event_get_deltas", false) | |
| 1258 | + | ||
| 1162 | 1259 | xScrollEventGetDeltas(x.GoPointer(), DeltaXVar, DeltaYVar) | |
| 1163 | 1260 | } | |
| 1164 | 1261 | ||
| @@ -1166,6 +1263,8 @@ var xScrollEventGetDirection func(uintptr) ScrollDirection | |||
| 1166 | 1263 | ||
| 1167 | 1264 | // Extracts the direction of a scroll event. | |
| 1168 | 1265 | func (x *ScrollEvent) GetDirection() ScrollDirection { | |
| 1266 | + | core.LazyRegister(&xScrollEventGetDirection, "GDK", "gdk_scroll_event_get_direction", false) | |
| 1267 | + | ||
| 1169 | 1268 | cret := xScrollEventGetDirection(x.GoPointer()) | |
| 1170 | 1269 | return cret | |
| 1171 | 1270 | } | |
| @@ -1174,6 +1273,8 @@ var xScrollEventGetRelativeDirection func(uintptr) ScrollRelativeDirection | |||
| 1174 | 1273 | ||
| 1175 | 1274 | // Extracts the scroll direction relative to the physical motion. | |
| 1176 | 1275 | func (x *ScrollEvent) GetRelativeDirection() ScrollRelativeDirection { | |
| 1276 | + | core.LazyRegister(&xScrollEventGetRelativeDirection, "GDK", "gdk_scroll_event_get_relative_direction", false) | |
| 1277 | + | ||
| 1177 | 1278 | cret := xScrollEventGetRelativeDirection(x.GoPointer()) | |
| 1178 | 1279 | return cret | |
| 1179 | 1280 | } | |
| @@ -1185,6 +1286,8 @@ var xScrollEventGetUnit func(uintptr) ScrollUnit | |||
| 1185 | 1286 | // The unit will always be %GDK_SCROLL_UNIT_WHEEL if the scroll direction is not | |
| 1186 | 1287 | // %GDK_SCROLL_SMOOTH. | |
| 1187 | 1288 | func (x *ScrollEvent) GetUnit() ScrollUnit { | |
| 1289 | + | core.LazyRegister(&xScrollEventGetUnit, "GDK", "gdk_scroll_event_get_unit", false) | |
| 1290 | + | ||
| 1188 | 1291 | cret := xScrollEventGetUnit(x.GoPointer()) | |
| 1189 | 1292 | return cret | |
| 1190 | 1293 | } | |
| @@ -1201,6 +1304,8 @@ var xScrollEventIsStop func(uintptr) bool | |||
| 1201 | 1304 | // | |
| 1202 | 1305 | // Stop scroll events always have a delta of 0/0. | |
| 1203 | 1306 | func (x *ScrollEvent) IsStop() bool { | |
| 1307 | + | core.LazyRegister(&xScrollEventIsStop, "GDK", "gdk_scroll_event_is_stop", false) | |
| 1308 | + | ||
| 1204 | 1309 | cret := xScrollEventIsStop(x.GoPointer()) | |
| 1205 | 1310 | return cret | |
| 1206 | 1311 | } | |
| @@ -1224,6 +1329,7 @@ type TouchEvent struct { | |||
| 1224 | 1329 | var xTouchEventGLibType func() types.GType | |
| 1225 | 1330 | ||
| 1226 | 1331 | func TouchEventGLibType() types.GType { | |
| 1332 | + | core.LazyRegister(&xTouchEventGLibType, "GDK", "gdk_touch_event_get_type", false) | |
| 1227 | 1333 | return xTouchEventGLibType() | |
| 1228 | 1334 | } | |
| 1229 | 1335 | ||
| @@ -1237,6 +1343,8 @@ var xTouchEventGetEmulatingPointer func(uintptr) bool | |||
| 1237 | 1343 | ||
| 1238 | 1344 | // Extracts whether a touch event is emulating a pointer event. | |
| 1239 | 1345 | func (x *TouchEvent) GetEmulatingPointer() bool { | |
| 1346 | + | core.LazyRegister(&xTouchEventGetEmulatingPointer, "GDK", "gdk_touch_event_get_emulating_pointer", false) | |
| 1347 | + | ||
| 1240 | 1348 | cret := xTouchEventGetEmulatingPointer(x.GoPointer()) | |
| 1241 | 1349 | return cret | |
| 1242 | 1350 | } | |
| @@ -1265,6 +1373,7 @@ type TouchpadEvent struct { | |||
| 1265 | 1373 | var xTouchpadEventGLibType func() types.GType | |
| 1266 | 1374 | ||
| 1267 | 1375 | func TouchpadEventGLibType() types.GType { | |
| 1376 | + | core.LazyRegister(&xTouchpadEventGLibType, "GDK", "gdk_touchpad_event_get_type", false) | |
| 1268 | 1377 | return xTouchpadEventGLibType() | |
| 1269 | 1378 | } | |
| 1270 | 1379 | ||
| @@ -1278,6 +1387,8 @@ var xTouchpadEventGetDeltas func(uintptr, *float64, *float64) | |||
| 1278 | 1387 | ||
| 1279 | 1388 | // Extracts delta information from a touchpad event. | |
| 1280 | 1389 | func (x *TouchpadEvent) GetDeltas(DxVar *float64, DyVar *float64) { | |
| 1390 | + | core.LazyRegister(&xTouchpadEventGetDeltas, "GDK", "gdk_touchpad_event_get_deltas", false) | |
| 1391 | + | ||
| 1281 | 1392 | xTouchpadEventGetDeltas(x.GoPointer(), DxVar, DyVar) | |
| 1282 | 1393 | } | |
| 1283 | 1394 | ||
| @@ -1285,6 +1396,8 @@ var xTouchpadEventGetGesturePhase func(uintptr) TouchpadGesturePhase | |||
| 1285 | 1396 | ||
| 1286 | 1397 | // Extracts the touchpad gesture phase from a touchpad event. | |
| 1287 | 1398 | func (x *TouchpadEvent) GetGesturePhase() TouchpadGesturePhase { | |
| 1399 | + | core.LazyRegister(&xTouchpadEventGetGesturePhase, "GDK", "gdk_touchpad_event_get_gesture_phase", false) | |
| 1400 | + | ||
| 1288 | 1401 | cret := xTouchpadEventGetGesturePhase(x.GoPointer()) | |
| 1289 | 1402 | return cret | |
| 1290 | 1403 | } | |
| @@ -1293,6 +1406,8 @@ var xTouchpadEventGetNFingers func(uintptr) uint | |||
| 1293 | 1406 | ||
| 1294 | 1407 | // Extracts the number of fingers from a touchpad event. | |
| 1295 | 1408 | func (x *TouchpadEvent) GetNFingers() uint { | |
| 1409 | + | core.LazyRegister(&xTouchpadEventGetNFingers, "GDK", "gdk_touchpad_event_get_n_fingers", false) | |
| 1410 | + | ||
| 1296 | 1411 | cret := xTouchpadEventGetNFingers(x.GoPointer()) | |
| 1297 | 1412 | return cret | |
| 1298 | 1413 | } | |
| @@ -1301,6 +1416,8 @@ var xTouchpadEventGetPinchAngleDelta func(uintptr) float64 | |||
| 1301 | 1416 | ||
| 1302 | 1417 | // Extracts the angle delta from a touchpad pinch event. | |
| 1303 | 1418 | func (x *TouchpadEvent) GetPinchAngleDelta() float64 { | |
| 1419 | + | core.LazyRegister(&xTouchpadEventGetPinchAngleDelta, "GDK", "gdk_touchpad_event_get_pinch_angle_delta", false) | |
| 1420 | + | ||
| 1304 | 1421 | cret := xTouchpadEventGetPinchAngleDelta(x.GoPointer()) | |
| 1305 | 1422 | return cret | |
| 1306 | 1423 | } | |
| @@ -1309,6 +1426,8 @@ var xTouchpadEventGetPinchScale func(uintptr) float64 | |||
| 1309 | 1426 | ||
| 1310 | 1427 | // Extracts the scale from a touchpad pinch event. | |
| 1311 | 1428 | func (x *TouchpadEvent) GetPinchScale() float64 { | |
| 1429 | + | core.LazyRegister(&xTouchpadEventGetPinchScale, "GDK", "gdk_touchpad_event_get_pinch_scale", false) | |
| 1430 | + | ||
| 1312 | 1431 | cret := xTouchpadEventGetPinchScale(x.GoPointer()) | |
| 1313 | 1432 | return cret | |
| 1314 | 1433 | } | |
| @@ -1327,121 +1446,4 @@ func (c *TouchpadEvent) SetGoPointer(ptr uintptr) { | |||
| 1327 | 1446 | func init() { | |
| 1328 | 1447 | core.SetPackageName("GDK", "gtk4") | |
| 1329 | 1448 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 1330 | - | var libs []uintptr | |
| 1331 | - | for _, libPath := range core.GetPaths("GDK") { | |
| 1332 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 1333 | - | if err != nil { | |
| 1334 | - | panic(err) | |
| 1335 | - | } | |
| 1336 | - | libs = append(libs, lib) | |
| 1337 | - | } | |
| 1338 | - | ||
| 1339 | - | core.PuregoSafeRegister(&xCrossingModeGLibType, libs, "gdk_crossing_mode_get_type") | |
| 1340 | - | ||
| 1341 | - | core.PuregoSafeRegister(&xEventTypeGLibType, libs, "gdk_event_type_get_type") | |
| 1342 | - | ||
| 1343 | - | core.PuregoSafeRegister(&xKeyMatchGLibType, libs, "gdk_key_match_get_type") | |
| 1344 | - | ||
| 1345 | - | core.PuregoSafeRegister(&xNotifyTypeGLibType, libs, "gdk_notify_type_get_type") | |
| 1346 | - | ||
| 1347 | - | core.PuregoSafeRegister(&xScrollDirectionGLibType, libs, "gdk_scroll_direction_get_type") | |
| 1348 | - | ||
| 1349 | - | core.PuregoSafeRegister(&xScrollUnitGLibType, libs, "gdk_scroll_unit_get_type") | |
| 1350 | - | ||
| 1351 | - | core.PuregoSafeRegister(&xTouchpadGesturePhaseGLibType, libs, "gdk_touchpad_gesture_phase_get_type") | |
| 1352 | - | ||
| 1353 | - | core.PuregoSafeRegister(&xEventsGetAngle, libs, "gdk_events_get_angle") | |
| 1354 | - | core.PuregoSafeRegister(&xEventsGetCenter, libs, "gdk_events_get_center") | |
| 1355 | - | core.PuregoSafeRegister(&xEventsGetDistance, libs, "gdk_events_get_distance") | |
| 1356 | - | ||
| 1357 | - | core.PuregoSafeRegister(&xEventSequenceGLibType, libs, "gdk_event_sequence_get_type") | |
| 1358 | - | ||
| 1359 | - | core.PuregoSafeRegister(&xButtonEventGLibType, libs, "gdk_button_event_get_type") | |
| 1360 | - | ||
| 1361 | - | core.PuregoSafeRegister(&xButtonEventGetButton, libs, "gdk_button_event_get_button") | |
| 1362 | - | ||
| 1363 | - | core.PuregoSafeRegister(&xCrossingEventGLibType, libs, "gdk_crossing_event_get_type") | |
| 1364 | - | ||
| 1365 | - | core.PuregoSafeRegister(&xCrossingEventGetDetail, libs, "gdk_crossing_event_get_detail") | |
| 1366 | - | core.PuregoSafeRegister(&xCrossingEventGetFocus, libs, "gdk_crossing_event_get_focus") | |
| 1367 | - | core.PuregoSafeRegister(&xCrossingEventGetMode, libs, "gdk_crossing_event_get_mode") | |
| 1368 | - | ||
| 1369 | - | core.PuregoSafeRegister(&xDNDEventGLibType, libs, "gdk_dnd_event_get_type") | |
| 1370 | - | ||
| 1371 | - | core.PuregoSafeRegister(&xDNDEventGetDrop, libs, "gdk_dnd_event_get_drop") | |
| 1372 | - | ||
| 1373 | - | core.PuregoSafeRegister(&xDeleteEventGLibType, libs, "gdk_delete_event_get_type") | |
| 1374 | - | ||
| 1375 | - | core.PuregoSafeRegister(&xEventGLibType, libs, "gdk_event_get_type") | |
| 1376 | - | ||
| 1377 | - | core.PuregoSafeRegister(&xEventGetAngle, libs, "gdk_events_get_angle") | |
| 1378 | - | core.PuregoSafeRegister(&xEventGetCenter, libs, "gdk_events_get_center") | |
| 1379 | - | core.PuregoSafeRegister(&xEventGetDistance, libs, "gdk_events_get_distance") | |
| 1380 | - | core.PuregoSafeRegister(&xEventGetAxes, libs, "gdk_event_get_axes") | |
| 1381 | - | core.PuregoSafeRegister(&xEventGetAxis, libs, "gdk_event_get_axis") | |
| 1382 | - | core.PuregoSafeRegister(&xEventGetDevice, libs, "gdk_event_get_device") | |
| 1383 | - | core.PuregoSafeRegister(&xEventGetDeviceTool, libs, "gdk_event_get_device_tool") | |
| 1384 | - | core.PuregoSafeRegister(&xEventGetDisplay, libs, "gdk_event_get_display") | |
| 1385 | - | core.PuregoSafeRegister(&xEventGetEventSequence, libs, "gdk_event_get_event_sequence") | |
| 1386 | - | core.PuregoSafeRegister(&xEventGetEventType, libs, "gdk_event_get_event_type") | |
| 1387 | - | core.PuregoSafeRegister(&xEventGetHistory, libs, "gdk_event_get_history") | |
| 1388 | - | core.PuregoSafeRegister(&xEventGetModifierState, libs, "gdk_event_get_modifier_state") | |
| 1389 | - | core.PuregoSafeRegister(&xEventGetPointerEmulated, libs, "gdk_event_get_pointer_emulated") | |
| 1390 | - | core.PuregoSafeRegister(&xEventGetPosition, libs, "gdk_event_get_position") | |
| 1391 | - | core.PuregoSafeRegister(&xEventGetSeat, libs, "gdk_event_get_seat") | |
| 1392 | - | core.PuregoSafeRegister(&xEventGetSurface, libs, "gdk_event_get_surface") | |
| 1393 | - | core.PuregoSafeRegister(&xEventGetTime, libs, "gdk_event_get_time") | |
| 1394 | - | core.PuregoSafeRegister(&xEventRef, libs, "gdk_event_ref") | |
| 1395 | - | core.PuregoSafeRegister(&xEventTriggersContextMenu, libs, "gdk_event_triggers_context_menu") | |
| 1396 | - | core.PuregoSafeRegister(&xEventUnref, libs, "gdk_event_unref") | |
| 1397 | - | ||
| 1398 | - | core.PuregoSafeRegister(&xFocusEventGLibType, libs, "gdk_focus_event_get_type") | |
| 1399 | - | ||
| 1400 | - | core.PuregoSafeRegister(&xFocusEventGetIn, libs, "gdk_focus_event_get_in") | |
| 1401 | - | ||
| 1402 | - | core.PuregoSafeRegister(&xGrabBrokenEventGLibType, libs, "gdk_grab_broken_event_get_type") | |
| 1403 | - | ||
| 1404 | - | core.PuregoSafeRegister(&xGrabBrokenEventGetGrabSurface, libs, "gdk_grab_broken_event_get_grab_surface") | |
| 1405 | - | core.PuregoSafeRegister(&xGrabBrokenEventGetImplicit, libs, "gdk_grab_broken_event_get_implicit") | |
| 1406 | - | ||
| 1407 | - | core.PuregoSafeRegister(&xKeyEventGLibType, libs, "gdk_key_event_get_type") | |
| 1408 | - | ||
| 1409 | - | core.PuregoSafeRegister(&xKeyEventGetConsumedModifiers, libs, "gdk_key_event_get_consumed_modifiers") | |
| 1410 | - | core.PuregoSafeRegister(&xKeyEventGetKeycode, libs, "gdk_key_event_get_keycode") | |
| 1411 | - | core.PuregoSafeRegister(&xKeyEventGetKeyval, libs, "gdk_key_event_get_keyval") | |
| 1412 | - | core.PuregoSafeRegister(&xKeyEventGetLayout, libs, "gdk_key_event_get_layout") | |
| 1413 | - | core.PuregoSafeRegister(&xKeyEventGetLevel, libs, "gdk_key_event_get_level") | |
| 1414 | - | core.PuregoSafeRegister(&xKeyEventGetMatch, libs, "gdk_key_event_get_match") | |
| 1415 | - | core.PuregoSafeRegister(&xKeyEventIsModifier, libs, "gdk_key_event_is_modifier") | |
| 1416 | - | core.PuregoSafeRegister(&xKeyEventMatches, libs, "gdk_key_event_matches") | |
| 1417 | - | ||
| 1418 | - | core.PuregoSafeRegister(&xMotionEventGLibType, libs, "gdk_motion_event_get_type") | |
| 1419 | - | ||
| 1420 | - | core.PuregoSafeRegister(&xPadEventGLibType, libs, "gdk_pad_event_get_type") | |
| 1421 | - | ||
| 1422 | - | core.PuregoSafeRegister(&xPadEventGetAxisValue, libs, "gdk_pad_event_get_axis_value") | |
| 1423 | - | core.PuregoSafeRegister(&xPadEventGetButton, libs, "gdk_pad_event_get_button") | |
| 1424 | - | core.PuregoSafeRegister(&xPadEventGetGroupMode, libs, "gdk_pad_event_get_group_mode") | |
| 1425 | - | ||
| 1426 | - | core.PuregoSafeRegister(&xProximityEventGLibType, libs, "gdk_proximity_event_get_type") | |
| 1427 | - | ||
| 1428 | - | core.PuregoSafeRegister(&xScrollEventGLibType, libs, "gdk_scroll_event_get_type") | |
| 1429 | - | ||
| 1430 | - | core.PuregoSafeRegister(&xScrollEventGetDeltas, libs, "gdk_scroll_event_get_deltas") | |
| 1431 | - | core.PuregoSafeRegister(&xScrollEventGetDirection, libs, "gdk_scroll_event_get_direction") | |
| 1432 | - | core.PuregoSafeRegister(&xScrollEventGetRelativeDirection, libs, "gdk_scroll_event_get_relative_direction") | |
| 1433 | - | core.PuregoSafeRegister(&xScrollEventGetUnit, libs, "gdk_scroll_event_get_unit") | |
| 1434 | - | core.PuregoSafeRegister(&xScrollEventIsStop, libs, "gdk_scroll_event_is_stop") | |
| 1435 | - | ||
| 1436 | - | core.PuregoSafeRegister(&xTouchEventGLibType, libs, "gdk_touch_event_get_type") | |
| 1437 | - | ||
| 1438 | - | core.PuregoSafeRegister(&xTouchEventGetEmulatingPointer, libs, "gdk_touch_event_get_emulating_pointer") | |
| 1439 | - | ||
| 1440 | - | core.PuregoSafeRegister(&xTouchpadEventGLibType, libs, "gdk_touchpad_event_get_type") | |
| 1441 | - | ||
| 1442 | - | core.PuregoSafeRegister(&xTouchpadEventGetDeltas, libs, "gdk_touchpad_event_get_deltas") | |
| 1443 | - | core.PuregoSafeRegister(&xTouchpadEventGetGesturePhase, libs, "gdk_touchpad_event_get_gesture_phase") | |
| 1444 | - | core.PuregoSafeRegister(&xTouchpadEventGetNFingers, libs, "gdk_touchpad_event_get_n_fingers") | |
| 1445 | - | core.PuregoSafeRegister(&xTouchpadEventGetPinchAngleDelta, libs, "gdk_touchpad_event_get_pinch_angle_delta") | |
| 1446 | - | core.PuregoSafeRegister(&xTouchpadEventGetPinchScale, libs, "gdk_touchpad_event_get_pinch_scale") | |
| 1447 | 1449 | } | |
| @@ -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" | 9 | "github.com/bnema/puregotk/v4/gobject" | ||
| 11 | "github.com/bnema/puregotk/v4/gobject/types" | 10 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| @@ -19,6 +18,7 @@ type EventSequence struct { | |||||
| 19 | var xEventSequenceGLibType func() types.GType | 18 | var xEventSequenceGLibType func() types.GType | ||
| 20 | 19 | ||||
| 21 | func EventSequenceGLibType() types.GType { | 20 | func EventSequenceGLibType() types.GType { | ||
| 21 | + | core.LazyRegister(&xEventSequenceGLibType, "GDK", "gdk_event_sequence_get_type", false) | |||
| 22 | return xEventSequenceGLibType() | 22 | return xEventSequenceGLibType() | ||
| 23 | } | 23 | } | ||
| 24 | 24 | ||||
| @@ -60,6 +60,7 @@ type CrossingMode int | |||||
| 60 | var xCrossingModeGLibType func() types.GType | 60 | var xCrossingModeGLibType func() types.GType | ||
| 61 | 61 | ||||
| 62 | func CrossingModeGLibType() types.GType { | 62 | func CrossingModeGLibType() types.GType { | ||
| 63 | + | core.LazyRegister(&xCrossingModeGLibType, "GDK", "gdk_crossing_mode_get_type", false) | |||
| 63 | return xCrossingModeGLibType() | 64 | return xCrossingModeGLibType() | ||
| 64 | } | 65 | } | ||
| 65 | 66 | ||||
| @@ -96,6 +97,7 @@ type EventType int | |||||
| 96 | var xEventTypeGLibType func() types.GType | 97 | var xEventTypeGLibType func() types.GType | ||
| 97 | 98 | ||||
| 98 | func EventTypeGLibType() types.GType { | 99 | func EventTypeGLibType() types.GType { | ||
| 100 | + | core.LazyRegister(&xEventTypeGLibType, "GDK", "gdk_event_type_get_type", false) | |||
| 99 | return xEventTypeGLibType() | 101 | return xEventTypeGLibType() | ||
| 100 | } | 102 | } | ||
| 101 | 103 | ||||
| @@ -181,6 +183,7 @@ type KeyMatch int | |||||
| 181 | var xKeyMatchGLibType func() types.GType | 183 | var xKeyMatchGLibType func() types.GType | ||
| 182 | 184 | ||||
| 183 | func KeyMatchGLibType() types.GType { | 185 | func KeyMatchGLibType() types.GType { | ||
| 186 | + | core.LazyRegister(&xKeyMatchGLibType, "GDK", "gdk_key_match_get_type", false) | |||
| 184 | return xKeyMatchGLibType() | 187 | return xKeyMatchGLibType() | ||
| 185 | } | 188 | } | ||
| 186 | 189 | ||||
| @@ -204,6 +207,7 @@ type NotifyType int | |||||
| 204 | var xNotifyTypeGLibType func() types.GType | 207 | var xNotifyTypeGLibType func() types.GType | ||
| 205 | 208 | ||||
| 206 | func NotifyTypeGLibType() types.GType { | 209 | func NotifyTypeGLibType() types.GType { | ||
| 210 | + | core.LazyRegister(&xNotifyTypeGLibType, "GDK", "gdk_notify_type_get_type", false) | |||
| 207 | return xNotifyTypeGLibType() | 211 | return xNotifyTypeGLibType() | ||
| 208 | } | 212 | } | ||
| 209 | 213 | ||||
| @@ -236,6 +240,7 @@ type ScrollDirection int | |||||
| 236 | var xScrollDirectionGLibType func() types.GType | 240 | var xScrollDirectionGLibType func() types.GType | ||
| 237 | 241 | ||||
| 238 | func ScrollDirectionGLibType() types.GType { | 242 | func ScrollDirectionGLibType() types.GType { | ||
| 243 | + | core.LazyRegister(&xScrollDirectionGLibType, "GDK", "gdk_scroll_direction_get_type", false) | |||
| 239 | return xScrollDirectionGLibType() | 244 | return xScrollDirectionGLibType() | ||
| 240 | } | 245 | } | ||
| 241 | 246 | ||||
| @@ -275,6 +280,7 @@ type ScrollUnit int | |||||
| 275 | var xScrollUnitGLibType func() types.GType | 280 | var xScrollUnitGLibType func() types.GType | ||
| 276 | 281 | ||||
| 277 | func ScrollUnitGLibType() types.GType { | 282 | func ScrollUnitGLibType() types.GType { | ||
| 283 | + | core.LazyRegister(&xScrollUnitGLibType, "GDK", "gdk_scroll_unit_get_type", false) | |||
| 278 | return xScrollUnitGLibType() | 284 | return xScrollUnitGLibType() | ||
| 279 | } | 285 | } | ||
| 280 | 286 | ||||
| @@ -310,6 +316,7 @@ type TouchpadGesturePhase int | |||||
| 310 | var xTouchpadGesturePhaseGLibType func() types.GType | 316 | var xTouchpadGesturePhaseGLibType func() types.GType | ||
| 311 | 317 | ||||
| 312 | func TouchpadGesturePhaseGLibType() types.GType { | 318 | func TouchpadGesturePhaseGLibType() types.GType { | ||
| 319 | + | core.LazyRegister(&xTouchpadGesturePhaseGLibType, "GDK", "gdk_touchpad_gesture_phase_get_type", false) | |||
| 313 | return xTouchpadGesturePhaseGLibType() | 320 | return xTouchpadGesturePhaseGLibType() | ||
| 314 | } | 321 | } | ||
| 315 | 322 | ||||
| @@ -338,6 +345,8 @@ var xEventsGetAngle func(uintptr, uintptr, *float64) bool | |||||
| 338 | // This assumes that both events have X/Y information. | 345 | // This assumes that both events have X/Y information. | ||
| 339 | // If not, this function returns %FALSE. | 346 | // If not, this function returns %FALSE. | ||
| 340 | func EventsGetAngle(Event1Var *Event, Event2Var *Event, AngleVar *float64) bool { | 347 | func EventsGetAngle(Event1Var *Event, Event2Var *Event, AngleVar *float64) bool { | ||
| 348 | + | core.LazyRegister(&xEventsGetAngle, "GDK", "gdk_events_get_angle", false) | |||
| 349 | + | ||||
| 341 | cret := xEventsGetAngle(Event1Var.GoPointer(), Event2Var.GoPointer(), AngleVar) | 350 | cret := xEventsGetAngle(Event1Var.GoPointer(), Event2Var.GoPointer(), AngleVar) | ||
| 342 | return cret | 351 | return cret | ||
| 343 | } | 352 | } | ||
| @@ -349,6 +358,8 @@ var xEventsGetCenter func(uintptr, uintptr, *float64, *float64) bool | |||||
| 349 | // This assumes that both events have X/Y information. | 358 | // This assumes that both events have X/Y information. | ||
| 350 | // If not, this function returns %FALSE. | 359 | // If not, this function returns %FALSE. | ||
| 351 | func EventsGetCenter(Event1Var *Event, Event2Var *Event, XVar *float64, YVar *float64) bool { | 360 | func EventsGetCenter(Event1Var *Event, Event2Var *Event, XVar *float64, YVar *float64) bool { | ||
| 361 | + | core.LazyRegister(&xEventsGetCenter, "GDK", "gdk_events_get_center", false) | |||
| 362 | + | ||||
| 352 | cret := xEventsGetCenter(Event1Var.GoPointer(), Event2Var.GoPointer(), XVar, YVar) | 363 | cret := xEventsGetCenter(Event1Var.GoPointer(), Event2Var.GoPointer(), XVar, YVar) | ||
| 353 | return cret | 364 | return cret | ||
| 354 | } | 365 | } | ||
| @@ -360,6 +371,8 @@ var xEventsGetDistance func(uintptr, uintptr, *float64) bool | |||||
| 360 | // This assumes that both events have X/Y information. | 371 | // This assumes that both events have X/Y information. | ||
| 361 | // If not, this function returns %FALSE. | 372 | // If not, this function returns %FALSE. | ||
| 362 | func EventsGetDistance(Event1Var *Event, Event2Var *Event, DistanceVar *float64) bool { | 373 | func EventsGetDistance(Event1Var *Event, Event2Var *Event, DistanceVar *float64) bool { | ||
| 374 | + | core.LazyRegister(&xEventsGetDistance, "GDK", "gdk_events_get_distance", false) | |||
| 375 | + | ||||
| 363 | cret := xEventsGetDistance(Event1Var.GoPointer(), Event2Var.GoPointer(), DistanceVar) | 376 | cret := xEventsGetDistance(Event1Var.GoPointer(), Event2Var.GoPointer(), DistanceVar) | ||
| 364 | return cret | 377 | return cret | ||
| 365 | } | 378 | } | ||
| @@ -372,6 +385,7 @@ type ButtonEvent struct { | |||||
| 372 | var xButtonEventGLibType func() types.GType | 385 | var xButtonEventGLibType func() types.GType | ||
| 373 | 386 | ||||
| 374 | func ButtonEventGLibType() types.GType { | 387 | func ButtonEventGLibType() types.GType { | ||
| 388 | + | core.LazyRegister(&xButtonEventGLibType, "GDK", "gdk_button_event_get_type", false) | |||
| 375 | return xButtonEventGLibType() | 389 | return xButtonEventGLibType() | ||
| 376 | } | 390 | } | ||
| 377 | 391 | ||||
| @@ -385,6 +399,8 @@ var xButtonEventGetButton func(uintptr) uint | |||||
| 385 | 399 | ||||
| 386 | // Extract the button number from a button event. | 400 | // Extract the button number from a button event. | ||
| 387 | func (x *ButtonEvent) GetButton() uint { | 401 | func (x *ButtonEvent) GetButton() uint { | ||
| 402 | + | core.LazyRegister(&xButtonEventGetButton, "GDK", "gdk_button_event_get_button", false) | |||
| 403 | + | ||||
| 388 | cret := xButtonEventGetButton(x.GoPointer()) | 404 | cret := xButtonEventGetButton(x.GoPointer()) | ||
| 389 | return cret | 405 | return cret | ||
| 390 | } | 406 | } | ||
| @@ -408,6 +424,7 @@ type CrossingEvent struct { | |||||
| 408 | var xCrossingEventGLibType func() types.GType | 424 | var xCrossingEventGLibType func() types.GType | ||
| 409 | 425 | ||||
| 410 | func CrossingEventGLibType() types.GType { | 426 | func CrossingEventGLibType() types.GType { | ||
| 427 | + | core.LazyRegister(&xCrossingEventGLibType, "GDK", "gdk_crossing_event_get_type", false) | |||
| 411 | return xCrossingEventGLibType() | 428 | return xCrossingEventGLibType() | ||
| 412 | } | 429 | } | ||
| 413 | 430 | ||||
| @@ -421,6 +438,8 @@ var xCrossingEventGetDetail func(uintptr) NotifyType | |||||
| 421 | 438 | ||||
| 422 | // Extracts the notify detail from a crossing event. | 439 | // Extracts the notify detail from a crossing event. | ||
| 423 | func (x *CrossingEvent) GetDetail() NotifyType { | 440 | func (x *CrossingEvent) GetDetail() NotifyType { | ||
| 441 | + | core.LazyRegister(&xCrossingEventGetDetail, "GDK", "gdk_crossing_event_get_detail", false) | |||
| 442 | + | ||||
| 424 | cret := xCrossingEventGetDetail(x.GoPointer()) | 443 | cret := xCrossingEventGetDetail(x.GoPointer()) | ||
| 425 | return cret | 444 | return cret | ||
| 426 | } | 445 | } | ||
| @@ -429,6 +448,8 @@ var xCrossingEventGetFocus func(uintptr) bool | |||||
| 429 | 448 | ||||
| 430 | // Checks if the @event surface is the focus surface. | 449 | // Checks if the @event surface is the focus surface. | ||
| 431 | func (x *CrossingEvent) GetFocus() bool { | 450 | func (x *CrossingEvent) GetFocus() bool { | ||
| 451 | + | core.LazyRegister(&xCrossingEventGetFocus, "GDK", "gdk_crossing_event_get_focus", false) | |||
| 452 | + | ||||
| 432 | cret := xCrossingEventGetFocus(x.GoPointer()) | 453 | cret := xCrossingEventGetFocus(x.GoPointer()) | ||
| 433 | return cret | 454 | return cret | ||
| 434 | } | 455 | } | ||
| @@ -437,6 +458,8 @@ var xCrossingEventGetMode func(uintptr) CrossingMode | |||||
| 437 | 458 | ||||
| 438 | // Extracts the crossing mode from a crossing event. | 459 | // Extracts the crossing mode from a crossing event. | ||
| 439 | func (x *CrossingEvent) GetMode() CrossingMode { | 460 | func (x *CrossingEvent) GetMode() CrossingMode { | ||
| 461 | + | core.LazyRegister(&xCrossingEventGetMode, "GDK", "gdk_crossing_event_get_mode", false) | |||
| 462 | + | ||||
| 440 | cret := xCrossingEventGetMode(x.GoPointer()) | 463 | cret := xCrossingEventGetMode(x.GoPointer()) | ||
| 441 | return cret | 464 | return cret | ||
| 442 | } | 465 | } | ||
| @@ -460,6 +483,7 @@ type DNDEvent struct { | |||||
| 460 | var xDNDEventGLibType func() types.GType | 483 | var xDNDEventGLibType func() types.GType | ||
| 461 | 484 | ||||
| 462 | func DNDEventGLibType() types.GType { | 485 | func DNDEventGLibType() types.GType { | ||
| 486 | + | core.LazyRegister(&xDNDEventGLibType, "GDK", "gdk_dnd_event_get_type", false) | |||
| 463 | return xDNDEventGLibType() | 487 | return xDNDEventGLibType() | ||
| 464 | } | 488 | } | ||
| 465 | 489 | ||||
| @@ -473,6 +497,7 @@ var xDNDEventGetDrop func(uintptr) uintptr | |||||
| 473 | 497 | ||||
| 474 | // Gets the `GdkDrop` object from a DND event. | 498 | // Gets the `GdkDrop` object from a DND event. | ||
| 475 | func (x *DNDEvent) GetDrop() *Drop { | 499 | func (x *DNDEvent) GetDrop() *Drop { | ||
| 500 | + | core.LazyRegister(&xDNDEventGetDrop, "GDK", "gdk_dnd_event_get_drop", false) | |||
| 476 | var cls *Drop | 501 | var cls *Drop | ||
| 477 | 502 | ||||
| 478 | cret := xDNDEventGetDrop(x.GoPointer()) | 503 | cret := xDNDEventGetDrop(x.GoPointer()) | ||
| @@ -505,6 +530,7 @@ type DeleteEvent struct { | |||||
| 505 | var xDeleteEventGLibType func() types.GType | 530 | var xDeleteEventGLibType func() types.GType | ||
| 506 | 531 | ||||
| 507 | func DeleteEventGLibType() types.GType { | 532 | func DeleteEventGLibType() types.GType { | ||
| 533 | + | core.LazyRegister(&xDeleteEventGLibType, "GDK", "gdk_delete_event_get_type", false) | |||
| 508 | return xDeleteEventGLibType() | 534 | return xDeleteEventGLibType() | ||
| 509 | } | 535 | } | ||
| 510 | 536 | ||||
| @@ -539,6 +565,7 @@ type Event struct { | |||||
| 539 | var xEventGLibType func() types.GType | 565 | var xEventGLibType func() types.GType | ||
| 540 | 566 | ||||
| 541 | func EventGLibType() types.GType { | 567 | func EventGLibType() types.GType { | ||
| 568 | + | core.LazyRegister(&xEventGLibType, "GDK", "gdk_event_get_type", false) | |||
| 542 | return xEventGLibType() | 569 | return xEventGLibType() | ||
| 543 | } | 570 | } | ||
| 544 | 571 | ||||
| @@ -559,6 +586,8 @@ var xEventGetAngle func(uintptr, uintptr, *float64) bool | |||||
| 559 | // This assumes that both events have X/Y information. | 586 | // This assumes that both events have X/Y information. | ||
| 560 | // If not, this function returns %FALSE. | 587 | // If not, this function returns %FALSE. | ||
| 561 | func (x *Event) GetAngle(Event2Var *Event, AngleVar *float64) bool { | 588 | func (x *Event) GetAngle(Event2Var *Event, AngleVar *float64) bool { | ||
| 589 | + | core.LazyRegister(&xEventGetAngle, "GDK", "gdk_events_get_angle", false) | |||
| 590 | + | ||||
| 562 | cret := xEventGetAngle(x.GoPointer(), Event2Var.GoPointer(), AngleVar) | 591 | cret := xEventGetAngle(x.GoPointer(), Event2Var.GoPointer(), AngleVar) | ||
| 563 | return cret | 592 | return cret | ||
| 564 | } | 593 | } | ||
| @@ -570,6 +599,8 @@ var xEventGetCenter func(uintptr, uintptr, *float64, *float64) bool | |||||
| 570 | // This assumes that both events have X/Y information. | 599 | // This assumes that both events have X/Y information. | ||
| 571 | // If not, this function returns %FALSE. | 600 | // If not, this function returns %FALSE. | ||
| 572 | func (x *Event) GetCenter(Event2Var *Event, XVar *float64, YVar *float64) bool { | 601 | func (x *Event) GetCenter(Event2Var *Event, XVar *float64, YVar *float64) bool { | ||
| 602 | + | core.LazyRegister(&xEventGetCenter, "GDK", "gdk_events_get_center", false) | |||
| 603 | + | ||||
| 573 | cret := xEventGetCenter(x.GoPointer(), Event2Var.GoPointer(), XVar, YVar) | 604 | cret := xEventGetCenter(x.GoPointer(), Event2Var.GoPointer(), XVar, YVar) | ||
| 574 | return cret | 605 | return cret | ||
| 575 | } | 606 | } | ||
| @@ -581,6 +612,8 @@ var xEventGetDistance func(uintptr, uintptr, *float64) bool | |||||
| 581 | // This assumes that both events have X/Y information. | 612 | // This assumes that both events have X/Y information. | ||
| 582 | // If not, this function returns %FALSE. | 613 | // If not, this function returns %FALSE. | ||
| 583 | func (x *Event) GetDistance(Event2Var *Event, DistanceVar *float64) bool { | 614 | func (x *Event) GetDistance(Event2Var *Event, DistanceVar *float64) bool { | ||
| 615 | + | core.LazyRegister(&xEventGetDistance, "GDK", "gdk_events_get_distance", false) | |||
| 616 | + | ||||
| 584 | cret := xEventGetDistance(x.GoPointer(), Event2Var.GoPointer(), DistanceVar) | 617 | cret := xEventGetDistance(x.GoPointer(), Event2Var.GoPointer(), DistanceVar) | ||
| 585 | return cret | 618 | return cret | ||
| 586 | } | 619 | } | ||
| @@ -592,6 +625,8 @@ var xEventGetAxes func(uintptr, *[]float64, *uint) bool | |||||
| 592 | // To find out which axes are used, use [method@Gdk.DeviceTool.get_axes] | 625 | // To find out which axes are used, use [method@Gdk.DeviceTool.get_axes] | ||
| 593 | // on the device tool returned by [method@Gdk.Event.get_device_tool]. | 626 | // on the device tool returned by [method@Gdk.Event.get_device_tool]. | ||
| 594 | func (x *Event) GetAxes(AxesVar *[]float64, NAxesVar *uint) bool { | 627 | func (x *Event) GetAxes(AxesVar *[]float64, NAxesVar *uint) bool { | ||
| 628 | + | core.LazyRegister(&xEventGetAxes, "GDK", "gdk_event_get_axes", false) | |||
| 629 | + | ||||
| 595 | cret := xEventGetAxes(x.GoPointer(), AxesVar, NAxesVar) | 630 | cret := xEventGetAxes(x.GoPointer(), AxesVar, NAxesVar) | ||
| 596 | return cret | 631 | return cret | ||
| 597 | } | 632 | } | ||
| @@ -604,6 +639,8 @@ var xEventGetAxis func(uintptr, AxisUse, *float64) bool | |||||
| 604 | // To find out which axes are used, use [method@Gdk.DeviceTool.get_axes] | 639 | // To find out which axes are used, use [method@Gdk.DeviceTool.get_axes] | ||
| 605 | // on the device tool returned by [method@Gdk.Event.get_device_tool]. | 640 | // on the device tool returned by [method@Gdk.Event.get_device_tool]. | ||
| 606 | func (x *Event) GetAxis(AxisUseVar AxisUse, ValueVar *float64) bool { | 641 | func (x *Event) GetAxis(AxisUseVar AxisUse, ValueVar *float64) bool { | ||
| 642 | + | core.LazyRegister(&xEventGetAxis, "GDK", "gdk_event_get_axis", false) | |||
| 643 | + | ||||
| 607 | cret := xEventGetAxis(x.GoPointer(), AxisUseVar, ValueVar) | 644 | cret := xEventGetAxis(x.GoPointer(), AxisUseVar, ValueVar) | ||
| 608 | return cret | 645 | return cret | ||
| 609 | } | 646 | } | ||
| @@ -612,6 +649,7 @@ var xEventGetDevice func(uintptr) uintptr | |||||
| 612 | 649 | ||||
| 613 | // Returns the device of an event. | 650 | // Returns the device of an event. | ||
| 614 | func (x *Event) GetDevice() *Device { | 651 | func (x *Event) GetDevice() *Device { | ||
| 652 | + | core.LazyRegister(&xEventGetDevice, "GDK", "gdk_event_get_device", false) | |||
| 615 | var cls *Device | 653 | var cls *Device | ||
| 616 | 654 | ||||
| 617 | cret := xEventGetDevice(x.GoPointer()) | 655 | cret := xEventGetDevice(x.GoPointer()) | ||
| @@ -638,6 +676,7 @@ var xEventGetDeviceTool func(uintptr) uintptr | |||||
| 638 | // the application lifetime, if settings must be stored | 676 | // the application lifetime, if settings must be stored | ||
| 639 | // persistently across runs, see [method@Gdk.DeviceTool.get_serial]. | 677 | // persistently across runs, see [method@Gdk.DeviceTool.get_serial]. | ||
| 640 | func (x *Event) GetDeviceTool() *DeviceTool { | 678 | func (x *Event) GetDeviceTool() *DeviceTool { | ||
| 679 | + | core.LazyRegister(&xEventGetDeviceTool, "GDK", "gdk_event_get_device_tool", false) | |||
| 641 | var cls *DeviceTool | 680 | var cls *DeviceTool | ||
| 642 | 681 | ||||
| 643 | cret := xEventGetDeviceTool(x.GoPointer()) | 682 | cret := xEventGetDeviceTool(x.GoPointer()) | ||
| @@ -655,6 +694,7 @@ var xEventGetDisplay func(uintptr) uintptr | |||||
| 655 | 694 | ||||
| 656 | // Retrieves the display associated to the @event. | 695 | // Retrieves the display associated to the @event. | ||
| 657 | func (x *Event) GetDisplay() *Display { | 696 | func (x *Event) GetDisplay() *Display { | ||
| 697 | + | core.LazyRegister(&xEventGetDisplay, "GDK", "gdk_event_get_display", false) | |||
| 658 | var cls *Display | 698 | var cls *Display | ||
| 659 | 699 | ||||
| 660 | cret := xEventGetDisplay(x.GoPointer()) | 700 | cret := xEventGetDisplay(x.GoPointer()) | ||
| @@ -675,6 +715,8 @@ var xEventGetEventSequence func(uintptr) uintptr | |||||
| 675 | // Related touch events are connected in a sequence. Other | 715 | // Related touch events are connected in a sequence. Other | ||
| 676 | // events typically don't have event sequence information. | 716 | // events typically don't have event sequence information. | ||
| 677 | func (x *Event) GetEventSequence() *EventSequence { | 717 | func (x *Event) GetEventSequence() *EventSequence { | ||
| 718 | + | core.LazyRegister(&xEventGetEventSequence, "GDK", "gdk_event_get_event_sequence", false) | |||
| 719 | + | ||||
| 678 | cret := xEventGetEventSequence(x.GoPointer()) | 720 | cret := xEventGetEventSequence(x.GoPointer()) | ||
| 679 | if cret == 0 { | 721 | if cret == 0 { | ||
| 680 | return nil | 722 | return nil | ||
| @@ -686,6 +728,8 @@ var xEventGetEventType func(uintptr) EventType | |||||
| 686 | 728 | ||||
| 687 | // Retrieves the type of the event. | 729 | // Retrieves the type of the event. | ||
| 688 | func (x *Event) GetEventType() EventType { | 730 | func (x *Event) GetEventType() EventType { | ||
| 731 | + | core.LazyRegister(&xEventGetEventType, "GDK", "gdk_event_get_event_type", false) | |||
| 732 | + | ||||
| 689 | cret := xEventGetEventType(x.GoPointer()) | 733 | cret := xEventGetEventType(x.GoPointer()) | ||
| 690 | return cret | 734 | return cret | ||
| 691 | } | 735 | } | ||
| @@ -702,6 +746,8 @@ var xEventGetHistory func(uintptr, *uint) uintptr | |||||
| 702 | // events do it only if one of the mouse buttons is down, or the device | 746 | // events do it only if one of the mouse buttons is down, or the device | ||
| 703 | // has a tool. | 747 | // has a tool. | ||
| 704 | func (x *Event) GetHistory(OutNCoordsVar *uint) uintptr { | 748 | func (x *Event) GetHistory(OutNCoordsVar *uint) uintptr { | ||
| 749 | + | core.LazyRegister(&xEventGetHistory, "GDK", "gdk_event_get_history", false) | |||
| 750 | + | ||||
| 705 | cret := xEventGetHistory(x.GoPointer(), OutNCoordsVar) | 751 | cret := xEventGetHistory(x.GoPointer(), OutNCoordsVar) | ||
| 706 | return cret | 752 | return cret | ||
| 707 | } | 753 | } | ||
| @@ -710,6 +756,8 @@ var xEventGetModifierState func(uintptr) ModifierType | |||||
| 710 | 756 | ||||
| 711 | // Returns the modifier state field of an event. | 757 | // Returns the modifier state field of an event. | ||
| 712 | func (x *Event) GetModifierState() ModifierType { | 758 | func (x *Event) GetModifierState() ModifierType { | ||
| 759 | + | core.LazyRegister(&xEventGetModifierState, "GDK", "gdk_event_get_modifier_state", false) | |||
| 760 | + | ||||
| 713 | cret := xEventGetModifierState(x.GoPointer()) | 761 | cret := xEventGetModifierState(x.GoPointer()) | ||
| 714 | return cret | 762 | return cret | ||
| 715 | } | 763 | } | ||
| @@ -720,6 +768,8 @@ var xEventGetPointerEmulated func(uintptr) bool | |||||
| 720 | // | 768 | // | ||
| 721 | // Emulated pointer events typically originate from a touch events. | 769 | // Emulated pointer events typically originate from a touch events. | ||
| 722 | func (x *Event) GetPointerEmulated() bool { | 770 | func (x *Event) GetPointerEmulated() bool { | ||
| 771 | + | core.LazyRegister(&xEventGetPointerEmulated, "GDK", "gdk_event_get_pointer_emulated", false) | |||
| 772 | + | ||||
| 723 | cret := xEventGetPointerEmulated(x.GoPointer()) | 773 | cret := xEventGetPointerEmulated(x.GoPointer()) | ||
| 724 | return cret | 774 | return cret | ||
| 725 | } | 775 | } | ||
| @@ -730,6 +780,8 @@ var xEventGetPosition func(uintptr, *float64, *float64) bool | |||||
| 730 | // | 780 | // | ||
| 731 | // This position is in [surface coordinates](coordinates.html). | 781 | // This position is in [surface coordinates](coordinates.html). | ||
| 732 | func (x *Event) GetPosition(XVar *float64, YVar *float64) bool { | 782 | func (x *Event) GetPosition(XVar *float64, YVar *float64) bool { | ||
| 783 | + | core.LazyRegister(&xEventGetPosition, "GDK", "gdk_event_get_position", false) | |||
| 784 | + | ||||
| 733 | cret := xEventGetPosition(x.GoPointer(), XVar, YVar) | 785 | cret := xEventGetPosition(x.GoPointer(), XVar, YVar) | ||
| 734 | return cret | 786 | return cret | ||
| 735 | } | 787 | } | ||
| @@ -738,6 +790,7 @@ var xEventGetSeat func(uintptr) uintptr | |||||
| 738 | 790 | ||||
| 739 | // Returns the seat that originated the event. | 791 | // Returns the seat that originated the event. | ||
| 740 | func (x *Event) GetSeat() *Seat { | 792 | func (x *Event) GetSeat() *Seat { | ||
| 793 | + | core.LazyRegister(&xEventGetSeat, "GDK", "gdk_event_get_seat", false) | |||
| 741 | var cls *Seat | 794 | var cls *Seat | ||
| 742 | 795 | ||||
| 743 | cret := xEventGetSeat(x.GoPointer()) | 796 | cret := xEventGetSeat(x.GoPointer()) | ||
| @@ -755,6 +808,7 @@ var xEventGetSurface func(uintptr) uintptr | |||||
| 755 | 808 | ||||
| 756 | // Extracts the surface associated with an event. | 809 | // Extracts the surface associated with an event. | ||
| 757 | func (x *Event) GetSurface() *Surface { | 810 | func (x *Event) GetSurface() *Surface { | ||
| 811 | + | core.LazyRegister(&xEventGetSurface, "GDK", "gdk_event_get_surface", false) | |||
| 758 | var cls *Surface | 812 | var cls *Surface | ||
| 759 | 813 | ||||
| 760 | cret := xEventGetSurface(x.GoPointer()) | 814 | cret := xEventGetSurface(x.GoPointer()) | ||
| @@ -775,6 +829,8 @@ var xEventGetTime func(uintptr) uint32 | |||||
| 775 | // Not all events have timestamps. In that case, this function | 829 | // Not all events have timestamps. In that case, this function | ||
| 776 | // returns %GDK_CURRENT_TIME. | 830 | // returns %GDK_CURRENT_TIME. | ||
| 777 | func (x *Event) GetTime() uint32 { | 831 | func (x *Event) GetTime() uint32 { | ||
| 832 | + | core.LazyRegister(&xEventGetTime, "GDK", "gdk_event_get_time", false) | |||
| 833 | + | ||||
| 778 | cret := xEventGetTime(x.GoPointer()) | 834 | cret := xEventGetTime(x.GoPointer()) | ||
| 779 | return cret | 835 | return cret | ||
| 780 | } | 836 | } | ||
| @@ -783,6 +839,7 @@ var xEventRef func(uintptr) uintptr | |||||
| 783 | 839 | ||||
| 784 | // Increase the ref count of @event. | 840 | // Increase the ref count of @event. | ||
| 785 | func (x *Event) Ref() *Event { | 841 | func (x *Event) Ref() *Event { | ||
| 842 | + | core.LazyRegister(&xEventRef, "GDK", "gdk_event_ref", false) | |||
| 786 | var cls *Event | 843 | var cls *Event | ||
| 787 | 844 | ||||
| 788 | cret := xEventRef(x.GoPointer()) | 845 | cret := xEventRef(x.GoPointer()) | ||
| @@ -809,6 +866,8 @@ var xEventTriggersContextMenu func(uintptr) bool | |||||
| 809 | // event->button == GDK_BUTTON_SECONDARY | 866 | // event->button == GDK_BUTTON_SECONDARY | ||
| 810 | // ``` | 867 | // ``` | ||
| 811 | func (x *Event) TriggersContextMenu() bool { | 868 | func (x *Event) TriggersContextMenu() bool { | ||
| 869 | + | core.LazyRegister(&xEventTriggersContextMenu, "GDK", "gdk_event_triggers_context_menu", false) | |||
| 870 | + | ||||
| 812 | cret := xEventTriggersContextMenu(x.GoPointer()) | 871 | cret := xEventTriggersContextMenu(x.GoPointer()) | ||
| 813 | return cret | 872 | return cret | ||
| 814 | } | 873 | } | ||
| @@ -819,6 +878,8 @@ var xEventUnref func(uintptr) | |||||
| 819 | // | 878 | // | ||
| 820 | // If the last reference is dropped, the structure is freed. | 879 | // If the last reference is dropped, the structure is freed. | ||
| 821 | func (x *Event) Unref() { | 880 | func (x *Event) Unref() { | ||
| 881 | + | core.LazyRegister(&xEventUnref, "GDK", "gdk_event_unref", false) | |||
| 882 | + | ||||
| 822 | xEventUnref(x.GoPointer()) | 883 | xEventUnref(x.GoPointer()) | ||
| 823 | } | 884 | } | ||
| 824 | 885 | ||||
| @@ -841,6 +902,7 @@ type FocusEvent struct { | |||||
| 841 | var xFocusEventGLibType func() types.GType | 902 | var xFocusEventGLibType func() types.GType | ||
| 842 | 903 | ||||
| 843 | func FocusEventGLibType() types.GType { | 904 | func FocusEventGLibType() types.GType { | ||
| 905 | + | core.LazyRegister(&xFocusEventGLibType, "GDK", "gdk_focus_event_get_type", false) | |||
| 844 | return xFocusEventGLibType() | 906 | return xFocusEventGLibType() | ||
| 845 | } | 907 | } | ||
| 846 | 908 | ||||
| @@ -855,6 +917,8 @@ var xFocusEventGetIn func(uintptr) bool | |||||
| 855 | // Extracts whether this event is about focus entering or | 917 | // Extracts whether this event is about focus entering or | ||
| 856 | // leaving the surface. | 918 | // leaving the surface. | ||
| 857 | func (x *FocusEvent) GetIn() bool { | 919 | func (x *FocusEvent) GetIn() bool { | ||
| 920 | + | core.LazyRegister(&xFocusEventGetIn, "GDK", "gdk_focus_event_get_in", false) | |||
| 921 | + | ||||
| 858 | cret := xFocusEventGetIn(x.GoPointer()) | 922 | cret := xFocusEventGetIn(x.GoPointer()) | ||
| 859 | return cret | 923 | return cret | ||
| 860 | } | 924 | } | ||
| @@ -878,6 +942,7 @@ type GrabBrokenEvent struct { | |||||
| 878 | var xGrabBrokenEventGLibType func() types.GType | 942 | var xGrabBrokenEventGLibType func() types.GType | ||
| 879 | 943 | ||||
| 880 | func GrabBrokenEventGLibType() types.GType { | 944 | func GrabBrokenEventGLibType() types.GType { | ||
| 945 | + | core.LazyRegister(&xGrabBrokenEventGLibType, "GDK", "gdk_grab_broken_event_get_type", false) | |||
| 881 | return xGrabBrokenEventGLibType() | 946 | return xGrabBrokenEventGLibType() | ||
| 882 | } | 947 | } | ||
| 883 | 948 | ||||
| @@ -891,6 +956,7 @@ var xGrabBrokenEventGetGrabSurface func(uintptr) uintptr | |||||
| 891 | 956 | ||||
| 892 | // Extracts the grab surface from a grab broken event. | 957 | // Extracts the grab surface from a grab broken event. | ||
| 893 | func (x *GrabBrokenEvent) GetGrabSurface() *Surface { | 958 | func (x *GrabBrokenEvent) GetGrabSurface() *Surface { | ||
| 959 | + | core.LazyRegister(&xGrabBrokenEventGetGrabSurface, "GDK", "gdk_grab_broken_event_get_grab_surface", false) | |||
| 894 | var cls *Surface | 960 | var cls *Surface | ||
| 895 | 961 | ||||
| 896 | cret := xGrabBrokenEventGetGrabSurface(x.GoPointer()) | 962 | cret := xGrabBrokenEventGetGrabSurface(x.GoPointer()) | ||
| @@ -908,6 +974,8 @@ var xGrabBrokenEventGetImplicit func(uintptr) bool | |||||
| 908 | 974 | ||||
| 909 | // Checks whether the grab broken event is for an implicit grab. | 975 | // Checks whether the grab broken event is for an implicit grab. | ||
| 910 | func (x *GrabBrokenEvent) GetImplicit() bool { | 976 | func (x *GrabBrokenEvent) GetImplicit() bool { | ||
| 977 | + | core.LazyRegister(&xGrabBrokenEventGetImplicit, "GDK", "gdk_grab_broken_event_get_implicit", false) | |||
| 978 | + | ||||
| 911 | cret := xGrabBrokenEventGetImplicit(x.GoPointer()) | 979 | cret := xGrabBrokenEventGetImplicit(x.GoPointer()) | ||
| 912 | return cret | 980 | return cret | ||
| 913 | } | 981 | } | ||
| @@ -931,6 +999,7 @@ type KeyEvent struct { | |||||
| 931 | var xKeyEventGLibType func() types.GType | 999 | var xKeyEventGLibType func() types.GType | ||
| 932 | 1000 | ||||
| 933 | func KeyEventGLibType() types.GType { | 1001 | func KeyEventGLibType() types.GType { | ||
| 1002 | + | core.LazyRegister(&xKeyEventGLibType, "GDK", "gdk_key_event_get_type", false) | |||
| 934 | return xKeyEventGLibType() | 1003 | return xKeyEventGLibType() | ||
| 935 | } | 1004 | } | ||
| 936 | 1005 | ||||
| @@ -944,6 +1013,8 @@ var xKeyEventGetConsumedModifiers func(uintptr) ModifierType | |||||
| 944 | 1013 | ||||
| 945 | // Extracts the consumed modifiers from a key event. | 1014 | // Extracts the consumed modifiers from a key event. | ||
| 946 | func (x *KeyEvent) GetConsumedModifiers() ModifierType { | 1015 | func (x *KeyEvent) GetConsumedModifiers() ModifierType { | ||
| 1016 | + | core.LazyRegister(&xKeyEventGetConsumedModifiers, "GDK", "gdk_key_event_get_consumed_modifiers", false) | |||
| 1017 | + | ||||
| 947 | cret := xKeyEventGetConsumedModifiers(x.GoPointer()) | 1018 | cret := xKeyEventGetConsumedModifiers(x.GoPointer()) | ||
| 948 | return cret | 1019 | return cret | ||
| 949 | } | 1020 | } | ||
| @@ -952,6 +1023,8 @@ var xKeyEventGetKeycode func(uintptr) uint | |||||
| 952 | 1023 | ||||
| 953 | // Extracts the keycode from a key event. | 1024 | // Extracts the keycode from a key event. | ||
| 954 | func (x *KeyEvent) GetKeycode() uint { | 1025 | func (x *KeyEvent) GetKeycode() uint { | ||
| 1026 | + | core.LazyRegister(&xKeyEventGetKeycode, "GDK", "gdk_key_event_get_keycode", false) | |||
| 1027 | + | ||||
| 955 | cret := xKeyEventGetKeycode(x.GoPointer()) | 1028 | cret := xKeyEventGetKeycode(x.GoPointer()) | ||
| 956 | return cret | 1029 | return cret | ||
| 957 | } | 1030 | } | ||
| @@ -960,6 +1033,8 @@ var xKeyEventGetKeyval func(uintptr) uint | |||||
| 960 | 1033 | ||||
| 961 | // Extracts the keyval from a key event. | 1034 | // Extracts the keyval from a key event. | ||
| 962 | func (x *KeyEvent) GetKeyval() uint { | 1035 | func (x *KeyEvent) GetKeyval() uint { | ||
| 1036 | + | core.LazyRegister(&xKeyEventGetKeyval, "GDK", "gdk_key_event_get_keyval", false) | |||
| 1037 | + | ||||
| 963 | cret := xKeyEventGetKeyval(x.GoPointer()) | 1038 | cret := xKeyEventGetKeyval(x.GoPointer()) | ||
| 964 | return cret | 1039 | return cret | ||
| 965 | } | 1040 | } | ||
| @@ -968,6 +1043,8 @@ var xKeyEventGetLayout func(uintptr) uint | |||||
| 968 | 1043 | ||||
| 969 | // Extracts the layout from a key event. | 1044 | // Extracts the layout from a key event. | ||
| 970 | func (x *KeyEvent) GetLayout() uint { | 1045 | func (x *KeyEvent) GetLayout() uint { | ||
| 1046 | + | core.LazyRegister(&xKeyEventGetLayout, "GDK", "gdk_key_event_get_layout", false) | |||
| 1047 | + | ||||
| 971 | cret := xKeyEventGetLayout(x.GoPointer()) | 1048 | cret := xKeyEventGetLayout(x.GoPointer()) | ||
| 972 | return cret | 1049 | return cret | ||
| 973 | } | 1050 | } | ||
| @@ -976,6 +1053,8 @@ var xKeyEventGetLevel func(uintptr) uint | |||||
| 976 | 1053 | ||||
| 977 | // Extracts the shift level from a key event. | 1054 | // Extracts the shift level from a key event. | ||
| 978 | func (x *KeyEvent) GetLevel() uint { | 1055 | func (x *KeyEvent) GetLevel() uint { | ||
| 1056 | + | core.LazyRegister(&xKeyEventGetLevel, "GDK", "gdk_key_event_get_level", false) | |||
| 1057 | + | ||||
| 979 | cret := xKeyEventGetLevel(x.GoPointer()) | 1058 | cret := xKeyEventGetLevel(x.GoPointer()) | ||
| 980 | return cret | 1059 | return cret | ||
| 981 | } | 1060 | } | ||
| @@ -987,6 +1066,8 @@ var xKeyEventGetMatch func(uintptr, *uint, *ModifierType) bool | |||||
| 987 | // | 1066 | // | ||
| 988 | // See [method@Gdk.KeyEvent.matches]. | 1067 | // See [method@Gdk.KeyEvent.matches]. | ||
| 989 | func (x *KeyEvent) GetMatch(KeyvalVar *uint, ModifiersVar *ModifierType) bool { | 1068 | func (x *KeyEvent) GetMatch(KeyvalVar *uint, ModifiersVar *ModifierType) bool { | ||
| 1069 | + | core.LazyRegister(&xKeyEventGetMatch, "GDK", "gdk_key_event_get_match", false) | |||
| 1070 | + | ||||
| 990 | cret := xKeyEventGetMatch(x.GoPointer(), KeyvalVar, ModifiersVar) | 1071 | cret := xKeyEventGetMatch(x.GoPointer(), KeyvalVar, ModifiersVar) | ||
| 991 | return cret | 1072 | return cret | ||
| 992 | } | 1073 | } | ||
| @@ -995,6 +1076,8 @@ var xKeyEventIsModifier func(uintptr) bool | |||||
| 995 | 1076 | ||||
| 996 | // Extracts whether the key event is for a modifier key. | 1077 | // Extracts whether the key event is for a modifier key. | ||
| 997 | func (x *KeyEvent) IsModifier() bool { | 1078 | func (x *KeyEvent) IsModifier() bool { | ||
| 1079 | + | core.LazyRegister(&xKeyEventIsModifier, "GDK", "gdk_key_event_is_modifier", false) | |||
| 1080 | + | ||||
| 998 | cret := xKeyEventIsModifier(x.GoPointer()) | 1081 | cret := xKeyEventIsModifier(x.GoPointer()) | ||
| 999 | return cret | 1082 | return cret | ||
| 1000 | } | 1083 | } | ||
| @@ -1010,6 +1093,8 @@ var xKeyEventMatches func(uintptr, uint, ModifierType) KeyMatch | |||||
| 1010 | // | 1093 | // | ||
| 1011 | // Note that we ignore Caps Lock for matching. | 1094 | // Note that we ignore Caps Lock for matching. | ||
| 1012 | func (x *KeyEvent) Matches(KeyvalVar uint, ModifiersVar ModifierType) KeyMatch { | 1095 | func (x *KeyEvent) Matches(KeyvalVar uint, ModifiersVar ModifierType) KeyMatch { | ||
| 1096 | + | core.LazyRegister(&xKeyEventMatches, "GDK", "gdk_key_event_matches", false) | |||
| 1097 | + | ||||
| 1013 | cret := xKeyEventMatches(x.GoPointer(), KeyvalVar, ModifiersVar) | 1098 | cret := xKeyEventMatches(x.GoPointer(), KeyvalVar, ModifiersVar) | ||
| 1014 | return cret | 1099 | return cret | ||
| 1015 | } | 1100 | } | ||
| @@ -1033,6 +1118,7 @@ type MotionEvent struct { | |||||
| 1033 | var xMotionEventGLibType func() types.GType | 1118 | var xMotionEventGLibType func() types.GType | ||
| 1034 | 1119 | ||||
| 1035 | func MotionEventGLibType() types.GType { | 1120 | func MotionEventGLibType() types.GType { | ||
| 1121 | + | core.LazyRegister(&xMotionEventGLibType, "GDK", "gdk_motion_event_get_type", false) | |||
| 1036 | return xMotionEventGLibType() | 1122 | return xMotionEventGLibType() | ||
| 1037 | } | 1123 | } | ||
| 1038 | 1124 | ||||
| @@ -1061,6 +1147,7 @@ type PadEvent struct { | |||||
| 1061 | var xPadEventGLibType func() types.GType | 1147 | var xPadEventGLibType func() types.GType | ||
| 1062 | 1148 | ||||
| 1063 | func PadEventGLibType() types.GType { | 1149 | func PadEventGLibType() types.GType { | ||
| 1150 | + | core.LazyRegister(&xPadEventGLibType, "GDK", "gdk_pad_event_get_type", false) | |||
| 1064 | return xPadEventGLibType() | 1151 | return xPadEventGLibType() | ||
| 1065 | } | 1152 | } | ||
| 1066 | 1153 | ||||
| @@ -1074,6 +1161,8 @@ var xPadEventGetAxisValue func(uintptr, *uint, *float64) | |||||
| 1074 | 1161 | ||||
| 1075 | // Extracts the information from a pad strip or ring event. | 1162 | // Extracts the information from a pad strip or ring event. | ||
| 1076 | func (x *PadEvent) GetAxisValue(IndexVar *uint, ValueVar *float64) { | 1163 | func (x *PadEvent) GetAxisValue(IndexVar *uint, ValueVar *float64) { | ||
| 1164 | + | core.LazyRegister(&xPadEventGetAxisValue, "GDK", "gdk_pad_event_get_axis_value", false) | |||
| 1165 | + | ||||
| 1077 | xPadEventGetAxisValue(x.GoPointer(), IndexVar, ValueVar) | 1166 | xPadEventGetAxisValue(x.GoPointer(), IndexVar, ValueVar) | ||
| 1078 | } | 1167 | } | ||
| 1079 | 1168 | ||||
| @@ -1082,6 +1171,8 @@ var xPadEventGetButton func(uintptr) uint | |||||
| 1082 | // Extracts information about the pressed button from | 1171 | // Extracts information about the pressed button from | ||
| 1083 | // a pad event. | 1172 | // a pad event. | ||
| 1084 | func (x *PadEvent) GetButton() uint { | 1173 | func (x *PadEvent) GetButton() uint { | ||
| 1174 | + | core.LazyRegister(&xPadEventGetButton, "GDK", "gdk_pad_event_get_button", false) | |||
| 1175 | + | ||||
| 1085 | cret := xPadEventGetButton(x.GoPointer()) | 1176 | cret := xPadEventGetButton(x.GoPointer()) | ||
| 1086 | return cret | 1177 | return cret | ||
| 1087 | } | 1178 | } | ||
| @@ -1090,6 +1181,8 @@ var xPadEventGetGroupMode func(uintptr, *uint, *uint) | |||||
| 1090 | 1181 | ||||
| 1091 | // Extracts group and mode information from a pad event. | 1182 | // Extracts group and mode information from a pad event. | ||
| 1092 | func (x *PadEvent) GetGroupMode(GroupVar *uint, ModeVar *uint) { | 1183 | func (x *PadEvent) GetGroupMode(GroupVar *uint, ModeVar *uint) { | ||
| 1184 | + | core.LazyRegister(&xPadEventGetGroupMode, "GDK", "gdk_pad_event_get_group_mode", false) | |||
| 1185 | + | ||||
| 1093 | xPadEventGetGroupMode(x.GoPointer(), GroupVar, ModeVar) | 1186 | xPadEventGetGroupMode(x.GoPointer(), GroupVar, ModeVar) | ||
| 1094 | } | 1187 | } | ||
| 1095 | 1188 | ||||
| @@ -1112,6 +1205,7 @@ type ProximityEvent struct { | |||||
| 1112 | var xProximityEventGLibType func() types.GType | 1205 | var xProximityEventGLibType func() types.GType | ||
| 1113 | 1206 | ||||
| 1114 | func ProximityEventGLibType() types.GType { | 1207 | func ProximityEventGLibType() types.GType { | ||
| 1208 | + | core.LazyRegister(&xProximityEventGLibType, "GDK", "gdk_proximity_event_get_type", false) | |||
| 1115 | return xProximityEventGLibType() | 1209 | return xProximityEventGLibType() | ||
| 1116 | } | 1210 | } | ||
| 1117 | 1211 | ||||
| @@ -1140,6 +1234,7 @@ type ScrollEvent struct { | |||||
| 1140 | var xScrollEventGLibType func() types.GType | 1234 | var xScrollEventGLibType func() types.GType | ||
| 1141 | 1235 | ||||
| 1142 | func ScrollEventGLibType() types.GType { | 1236 | func ScrollEventGLibType() types.GType { | ||
| 1237 | + | core.LazyRegister(&xScrollEventGLibType, "GDK", "gdk_scroll_event_get_type", false) | |||
| 1143 | return xScrollEventGLibType() | 1238 | return xScrollEventGLibType() | ||
| 1144 | } | 1239 | } | ||
| 1145 | 1240 | ||||
| @@ -1159,6 +1254,8 @@ var xScrollEventGetDeltas func(uintptr, *float64, *float64) | |||||
| 1159 | // For the representation unit of these deltas, see | 1254 | // For the representation unit of these deltas, see | ||
| 1160 | // [method@Gdk.ScrollEvent.get_unit]. | 1255 | // [method@Gdk.ScrollEvent.get_unit]. | ||
| 1161 | func (x *ScrollEvent) GetDeltas(DeltaXVar *float64, DeltaYVar *float64) { | 1256 | func (x *ScrollEvent) GetDeltas(DeltaXVar *float64, DeltaYVar *float64) { | ||
| 1257 | + | core.LazyRegister(&xScrollEventGetDeltas, "GDK", "gdk_scroll_event_get_deltas", false) | |||
| 1258 | + | ||||
| 1162 | xScrollEventGetDeltas(x.GoPointer(), DeltaXVar, DeltaYVar) | 1259 | xScrollEventGetDeltas(x.GoPointer(), DeltaXVar, DeltaYVar) | ||
| 1163 | } | 1260 | } | ||
| 1164 | 1261 | ||||
| @@ -1166,6 +1263,8 @@ var xScrollEventGetDirection func(uintptr) ScrollDirection | |||||
| 1166 | 1263 | ||||
| 1167 | // Extracts the direction of a scroll event. | 1264 | // Extracts the direction of a scroll event. | ||
| 1168 | func (x *ScrollEvent) GetDirection() ScrollDirection { | 1265 | func (x *ScrollEvent) GetDirection() ScrollDirection { | ||
| 1266 | + | core.LazyRegister(&xScrollEventGetDirection, "GDK", "gdk_scroll_event_get_direction", false) | |||
| 1267 | + | ||||
| 1169 | cret := xScrollEventGetDirection(x.GoPointer()) | 1268 | cret := xScrollEventGetDirection(x.GoPointer()) | ||
| 1170 | return cret | 1269 | return cret | ||
| 1171 | } | 1270 | } | ||
| @@ -1174,6 +1273,8 @@ var xScrollEventGetRelativeDirection func(uintptr) ScrollRelativeDirection | |||||
| 1174 | 1273 | ||||
| 1175 | // Extracts the scroll direction relative to the physical motion. | 1274 | // Extracts the scroll direction relative to the physical motion. | ||
| 1176 | func (x *ScrollEvent) GetRelativeDirection() ScrollRelativeDirection { | 1275 | func (x *ScrollEvent) GetRelativeDirection() ScrollRelativeDirection { | ||
| 1276 | + | core.LazyRegister(&xScrollEventGetRelativeDirection, "GDK", "gdk_scroll_event_get_relative_direction", false) | |||
| 1277 | + | ||||
| 1177 | cret := xScrollEventGetRelativeDirection(x.GoPointer()) | 1278 | cret := xScrollEventGetRelativeDirection(x.GoPointer()) | ||
| 1178 | return cret | 1279 | return cret | ||
| 1179 | } | 1280 | } | ||
| @@ -1185,6 +1286,8 @@ var xScrollEventGetUnit func(uintptr) ScrollUnit | |||||
| 1185 | // The unit will always be %GDK_SCROLL_UNIT_WHEEL if the scroll direction is not | 1286 | // The unit will always be %GDK_SCROLL_UNIT_WHEEL if the scroll direction is not | ||
| 1186 | // %GDK_SCROLL_SMOOTH. | 1287 | // %GDK_SCROLL_SMOOTH. | ||
| 1187 | func (x *ScrollEvent) GetUnit() ScrollUnit { | 1288 | func (x *ScrollEvent) GetUnit() ScrollUnit { | ||
| 1289 | + | core.LazyRegister(&xScrollEventGetUnit, "GDK", "gdk_scroll_event_get_unit", false) | |||
| 1290 | + | ||||
| 1188 | cret := xScrollEventGetUnit(x.GoPointer()) | 1291 | cret := xScrollEventGetUnit(x.GoPointer()) | ||
| 1189 | return cret | 1292 | return cret | ||
| 1190 | } | 1293 | } | ||
| @@ -1201,6 +1304,8 @@ var xScrollEventIsStop func(uintptr) bool | |||||
| 1201 | // | 1304 | // | ||
| 1202 | // Stop scroll events always have a delta of 0/0. | 1305 | // Stop scroll events always have a delta of 0/0. | ||
| 1203 | func (x *ScrollEvent) IsStop() bool { | 1306 | func (x *ScrollEvent) IsStop() bool { | ||
| 1307 | + | core.LazyRegister(&xScrollEventIsStop, "GDK", "gdk_scroll_event_is_stop", false) | |||
| 1308 | + | ||||
| 1204 | cret := xScrollEventIsStop(x.GoPointer()) | 1309 | cret := xScrollEventIsStop(x.GoPointer()) | ||
| 1205 | return cret | 1310 | return cret | ||
| 1206 | } | 1311 | } | ||
| @@ -1224,6 +1329,7 @@ type TouchEvent struct { | |||||
| 1224 | var xTouchEventGLibType func() types.GType | 1329 | var xTouchEventGLibType func() types.GType | ||
| 1225 | 1330 | ||||
| 1226 | func TouchEventGLibType() types.GType { | 1331 | func TouchEventGLibType() types.GType { | ||
| 1332 | + | core.LazyRegister(&xTouchEventGLibType, "GDK", "gdk_touch_event_get_type", false) | |||
| 1227 | return xTouchEventGLibType() | 1333 | return xTouchEventGLibType() | ||
| 1228 | } | 1334 | } | ||
| 1229 | 1335 | ||||
| @@ -1237,6 +1343,8 @@ var xTouchEventGetEmulatingPointer func(uintptr) bool | |||||
| 1237 | 1343 | ||||
| 1238 | // Extracts whether a touch event is emulating a pointer event. | 1344 | // Extracts whether a touch event is emulating a pointer event. | ||
| 1239 | func (x *TouchEvent) GetEmulatingPointer() bool { | 1345 | func (x *TouchEvent) GetEmulatingPointer() bool { | ||
| 1346 | + | core.LazyRegister(&xTouchEventGetEmulatingPointer, "GDK", "gdk_touch_event_get_emulating_pointer", false) | |||
| 1347 | + | ||||
| 1240 | cret := xTouchEventGetEmulatingPointer(x.GoPointer()) | 1348 | cret := xTouchEventGetEmulatingPointer(x.GoPointer()) | ||
| 1241 | return cret | 1349 | return cret | ||
| 1242 | } | 1350 | } | ||
| @@ -1265,6 +1373,7 @@ type TouchpadEvent struct { | |||||
| 1265 | var xTouchpadEventGLibType func() types.GType | 1373 | var xTouchpadEventGLibType func() types.GType | ||
| 1266 | 1374 | ||||
| 1267 | func TouchpadEventGLibType() types.GType { | 1375 | func TouchpadEventGLibType() types.GType { | ||
| 1376 | + | core.LazyRegister(&xTouchpadEventGLibType, "GDK", "gdk_touchpad_event_get_type", false) | |||
| 1268 | return xTouchpadEventGLibType() | 1377 | return xTouchpadEventGLibType() | ||
| 1269 | } | 1378 | } | ||
| 1270 | 1379 | ||||
| @@ -1278,6 +1387,8 @@ var xTouchpadEventGetDeltas func(uintptr, *float64, *float64) | |||||
| 1278 | 1387 | ||||
| 1279 | // Extracts delta information from a touchpad event. | 1388 | // Extracts delta information from a touchpad event. | ||
| 1280 | func (x *TouchpadEvent) GetDeltas(DxVar *float64, DyVar *float64) { | 1389 | func (x *TouchpadEvent) GetDeltas(DxVar *float64, DyVar *float64) { | ||
| 1390 | + | core.LazyRegister(&xTouchpadEventGetDeltas, "GDK", "gdk_touchpad_event_get_deltas", false) | |||
| 1391 | + | ||||
| 1281 | xTouchpadEventGetDeltas(x.GoPointer(), DxVar, DyVar) | 1392 | xTouchpadEventGetDeltas(x.GoPointer(), DxVar, DyVar) | ||
| 1282 | } | 1393 | } | ||
| 1283 | 1394 | ||||
| @@ -1285,6 +1396,8 @@ var xTouchpadEventGetGesturePhase func(uintptr) TouchpadGesturePhase | |||||
| 1285 | 1396 | ||||
| 1286 | // Extracts the touchpad gesture phase from a touchpad event. | 1397 | // Extracts the touchpad gesture phase from a touchpad event. | ||
| 1287 | func (x *TouchpadEvent) GetGesturePhase() TouchpadGesturePhase { | 1398 | func (x *TouchpadEvent) GetGesturePhase() TouchpadGesturePhase { | ||
| 1399 | + | core.LazyRegister(&xTouchpadEventGetGesturePhase, "GDK", "gdk_touchpad_event_get_gesture_phase", false) | |||
| 1400 | + | ||||
| 1288 | cret := xTouchpadEventGetGesturePhase(x.GoPointer()) | 1401 | cret := xTouchpadEventGetGesturePhase(x.GoPointer()) | ||
| 1289 | return cret | 1402 | return cret | ||
| 1290 | } | 1403 | } | ||
| @@ -1293,6 +1406,8 @@ var xTouchpadEventGetNFingers func(uintptr) uint | |||||
| 1293 | 1406 | ||||
| 1294 | // Extracts the number of fingers from a touchpad event. | 1407 | // Extracts the number of fingers from a touchpad event. | ||
| 1295 | func (x *TouchpadEvent) GetNFingers() uint { | 1408 | func (x *TouchpadEvent) GetNFingers() uint { | ||
| 1409 | + | core.LazyRegister(&xTouchpadEventGetNFingers, "GDK", "gdk_touchpad_event_get_n_fingers", false) | |||
| 1410 | + | ||||
| 1296 | cret := xTouchpadEventGetNFingers(x.GoPointer()) | 1411 | cret := xTouchpadEventGetNFingers(x.GoPointer()) | ||
| 1297 | return cret | 1412 | return cret | ||
| 1298 | } | 1413 | } | ||
| @@ -1301,6 +1416,8 @@ var xTouchpadEventGetPinchAngleDelta func(uintptr) float64 | |||||
| 1301 | 1416 | ||||
| 1302 | // Extracts the angle delta from a touchpad pinch event. | 1417 | // Extracts the angle delta from a touchpad pinch event. | ||
| 1303 | func (x *TouchpadEvent) GetPinchAngleDelta() float64 { | 1418 | func (x *TouchpadEvent) GetPinchAngleDelta() float64 { | ||
| 1419 | + | core.LazyRegister(&xTouchpadEventGetPinchAngleDelta, "GDK", "gdk_touchpad_event_get_pinch_angle_delta", false) | |||
| 1420 | + | ||||
| 1304 | cret := xTouchpadEventGetPinchAngleDelta(x.GoPointer()) | 1421 | cret := xTouchpadEventGetPinchAngleDelta(x.GoPointer()) | ||
| 1305 | return cret | 1422 | return cret | ||
| 1306 | } | 1423 | } | ||
| @@ -1309,6 +1426,8 @@ var xTouchpadEventGetPinchScale func(uintptr) float64 | |||||
| 1309 | 1426 | ||||
| 1310 | // Extracts the scale from a touchpad pinch event. | 1427 | // Extracts the scale from a touchpad pinch event. | ||
| 1311 | func (x *TouchpadEvent) GetPinchScale() float64 { | 1428 | func (x *TouchpadEvent) GetPinchScale() float64 { | ||
| 1429 | + | core.LazyRegister(&xTouchpadEventGetPinchScale, "GDK", "gdk_touchpad_event_get_pinch_scale", false) | |||
| 1430 | + | ||||
| 1312 | cret := xTouchpadEventGetPinchScale(x.GoPointer()) | 1431 | cret := xTouchpadEventGetPinchScale(x.GoPointer()) | ||
| 1313 | return cret | 1432 | return cret | ||
| 1314 | } | 1433 | } | ||
| @@ -1327,121 +1446,4 @@ func (c *TouchpadEvent) SetGoPointer(ptr uintptr) { | |||||
| 1327 | func init() { | 1446 | func init() { | ||
| 1328 | core.SetPackageName("GDK", "gtk4") | 1447 | core.SetPackageName("GDK", "gtk4") | ||
| 1329 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 1448 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 1330 | - | var libs []uintptr | |||
| 1331 | - | for _, libPath := range core.GetPaths("GDK") { | |||
| 1332 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 1333 | - | if err != nil { | |||
| 1334 | - | panic(err) | |||
| 1335 | - | } | |||
| 1336 | - | libs = append(libs, lib) | |||
| 1337 | - | } | |||
| 1338 | - | ||||
| 1339 | - | core.PuregoSafeRegister(&xCrossingModeGLibType, libs, "gdk_crossing_mode_get_type") | |||
| 1340 | - | ||||
| 1341 | - | core.PuregoSafeRegister(&xEventTypeGLibType, libs, "gdk_event_type_get_type") | |||
| 1342 | - | ||||
| 1343 | - | core.PuregoSafeRegister(&xKeyMatchGLibType, libs, "gdk_key_match_get_type") | |||
| 1344 | - | ||||
| 1345 | - | core.PuregoSafeRegister(&xNotifyTypeGLibType, libs, "gdk_notify_type_get_type") | |||
| 1346 | - | ||||
| 1347 | - | core.PuregoSafeRegister(&xScrollDirectionGLibType, libs, "gdk_scroll_direction_get_type") | |||
| 1348 | - | ||||
| 1349 | - | core.PuregoSafeRegister(&xScrollUnitGLibType, libs, "gdk_scroll_unit_get_type") | |||
| 1350 | - | ||||
| 1351 | - | core.PuregoSafeRegister(&xTouchpadGesturePhaseGLibType, libs, "gdk_touchpad_gesture_phase_get_type") | |||
| 1352 | - | ||||
| 1353 | - | core.PuregoSafeRegister(&xEventsGetAngle, libs, "gdk_events_get_angle") | |||
| 1354 | - | core.PuregoSafeRegister(&xEventsGetCenter, libs, "gdk_events_get_center") | |||
| 1355 | - | core.PuregoSafeRegister(&xEventsGetDistance, libs, "gdk_events_get_distance") | |||
| 1356 | - | ||||
| 1357 | - | core.PuregoSafeRegister(&xEventSequenceGLibType, libs, "gdk_event_sequence_get_type") | |||
| 1358 | - | ||||
| 1359 | - | core.PuregoSafeRegister(&xButtonEventGLibType, libs, "gdk_button_event_get_type") | |||
| 1360 | - | ||||
| 1361 | - | core.PuregoSafeRegister(&xButtonEventGetButton, libs, "gdk_button_event_get_button") | |||
| 1362 | - | ||||
| 1363 | - | core.PuregoSafeRegister(&xCrossingEventGLibType, libs, "gdk_crossing_event_get_type") | |||
| 1364 | - | ||||
| 1365 | - | core.PuregoSafeRegister(&xCrossingEventGetDetail, libs, "gdk_crossing_event_get_detail") | |||
| 1366 | - | core.PuregoSafeRegister(&xCrossingEventGetFocus, libs, "gdk_crossing_event_get_focus") | |||
| 1367 | - | core.PuregoSafeRegister(&xCrossingEventGetMode, libs, "gdk_crossing_event_get_mode") | |||
| 1368 | - | ||||
| 1369 | - | core.PuregoSafeRegister(&xDNDEventGLibType, libs, "gdk_dnd_event_get_type") | |||
| 1370 | - | ||||
| 1371 | - | core.PuregoSafeRegister(&xDNDEventGetDrop, libs, "gdk_dnd_event_get_drop") | |||
| 1372 | - | ||||
| 1373 | - | core.PuregoSafeRegister(&xDeleteEventGLibType, libs, "gdk_delete_event_get_type") | |||
| 1374 | - | ||||
| 1375 | - | core.PuregoSafeRegister(&xEventGLibType, libs, "gdk_event_get_type") | |||
| 1376 | - | ||||
| 1377 | - | core.PuregoSafeRegister(&xEventGetAngle, libs, "gdk_events_get_angle") | |||
| 1378 | - | core.PuregoSafeRegister(&xEventGetCenter, libs, "gdk_events_get_center") | |||
| 1379 | - | core.PuregoSafeRegister(&xEventGetDistance, libs, "gdk_events_get_distance") | |||
| 1380 | - | core.PuregoSafeRegister(&xEventGetAxes, libs, "gdk_event_get_axes") | |||
| 1381 | - | core.PuregoSafeRegister(&xEventGetAxis, libs, "gdk_event_get_axis") | |||
| 1382 | - | core.PuregoSafeRegister(&xEventGetDevice, libs, "gdk_event_get_device") | |||
| 1383 | - | core.PuregoSafeRegister(&xEventGetDeviceTool, libs, "gdk_event_get_device_tool") | |||
| 1384 | - | core.PuregoSafeRegister(&xEventGetDisplay, libs, "gdk_event_get_display") | |||
| 1385 | - | core.PuregoSafeRegister(&xEventGetEventSequence, libs, "gdk_event_get_event_sequence") | |||
| 1386 | - | core.PuregoSafeRegister(&xEventGetEventType, libs, "gdk_event_get_event_type") | |||
| 1387 | - | core.PuregoSafeRegister(&xEventGetHistory, libs, "gdk_event_get_history") | |||
| 1388 | - | core.PuregoSafeRegister(&xEventGetModifierState, libs, "gdk_event_get_modifier_state") | |||
| 1389 | - | core.PuregoSafeRegister(&xEventGetPointerEmulated, libs, "gdk_event_get_pointer_emulated") | |||
| 1390 | - | core.PuregoSafeRegister(&xEventGetPosition, libs, "gdk_event_get_position") | |||
| 1391 | - | core.PuregoSafeRegister(&xEventGetSeat, libs, "gdk_event_get_seat") | |||
| 1392 | - | core.PuregoSafeRegister(&xEventGetSurface, libs, "gdk_event_get_surface") | |||
| 1393 | - | core.PuregoSafeRegister(&xEventGetTime, libs, "gdk_event_get_time") | |||
| 1394 | - | core.PuregoSafeRegister(&xEventRef, libs, "gdk_event_ref") | |||
| 1395 | - | core.PuregoSafeRegister(&xEventTriggersContextMenu, libs, "gdk_event_triggers_context_menu") | |||
| 1396 | - | core.PuregoSafeRegister(&xEventUnref, libs, "gdk_event_unref") | |||
| 1397 | - | ||||
| 1398 | - | core.PuregoSafeRegister(&xFocusEventGLibType, libs, "gdk_focus_event_get_type") | |||
| 1399 | - | ||||
| 1400 | - | core.PuregoSafeRegister(&xFocusEventGetIn, libs, "gdk_focus_event_get_in") | |||
| 1401 | - | ||||
| 1402 | - | core.PuregoSafeRegister(&xGrabBrokenEventGLibType, libs, "gdk_grab_broken_event_get_type") | |||
| 1403 | - | ||||
| 1404 | - | core.PuregoSafeRegister(&xGrabBrokenEventGetGrabSurface, libs, "gdk_grab_broken_event_get_grab_surface") | |||
| 1405 | - | core.PuregoSafeRegister(&xGrabBrokenEventGetImplicit, libs, "gdk_grab_broken_event_get_implicit") | |||
| 1406 | - | ||||
| 1407 | - | core.PuregoSafeRegister(&xKeyEventGLibType, libs, "gdk_key_event_get_type") | |||
| 1408 | - | ||||
| 1409 | - | core.PuregoSafeRegister(&xKeyEventGetConsumedModifiers, libs, "gdk_key_event_get_consumed_modifiers") | |||
| 1410 | - | core.PuregoSafeRegister(&xKeyEventGetKeycode, libs, "gdk_key_event_get_keycode") | |||
| 1411 | - | core.PuregoSafeRegister(&xKeyEventGetKeyval, libs, "gdk_key_event_get_keyval") | |||
| 1412 | - | core.PuregoSafeRegister(&xKeyEventGetLayout, libs, "gdk_key_event_get_layout") | |||
| 1413 | - | core.PuregoSafeRegister(&xKeyEventGetLevel, libs, "gdk_key_event_get_level") | |||
| 1414 | - | core.PuregoSafeRegister(&xKeyEventGetMatch, libs, "gdk_key_event_get_match") | |||
| 1415 | - | core.PuregoSafeRegister(&xKeyEventIsModifier, libs, "gdk_key_event_is_modifier") | |||
| 1416 | - | core.PuregoSafeRegister(&xKeyEventMatches, libs, "gdk_key_event_matches") | |||
| 1417 | - | ||||
| 1418 | - | core.PuregoSafeRegister(&xMotionEventGLibType, libs, "gdk_motion_event_get_type") | |||
| 1419 | - | ||||
| 1420 | - | core.PuregoSafeRegister(&xPadEventGLibType, libs, "gdk_pad_event_get_type") | |||
| 1421 | - | ||||
| 1422 | - | core.PuregoSafeRegister(&xPadEventGetAxisValue, libs, "gdk_pad_event_get_axis_value") | |||
| 1423 | - | core.PuregoSafeRegister(&xPadEventGetButton, libs, "gdk_pad_event_get_button") | |||
| 1424 | - | core.PuregoSafeRegister(&xPadEventGetGroupMode, libs, "gdk_pad_event_get_group_mode") | |||
| 1425 | - | ||||
| 1426 | - | core.PuregoSafeRegister(&xProximityEventGLibType, libs, "gdk_proximity_event_get_type") | |||
| 1427 | - | ||||
| 1428 | - | core.PuregoSafeRegister(&xScrollEventGLibType, libs, "gdk_scroll_event_get_type") | |||
| 1429 | - | ||||
| 1430 | - | core.PuregoSafeRegister(&xScrollEventGetDeltas, libs, "gdk_scroll_event_get_deltas") | |||
| 1431 | - | core.PuregoSafeRegister(&xScrollEventGetDirection, libs, "gdk_scroll_event_get_direction") | |||
| 1432 | - | core.PuregoSafeRegister(&xScrollEventGetRelativeDirection, libs, "gdk_scroll_event_get_relative_direction") | |||
| 1433 | - | core.PuregoSafeRegister(&xScrollEventGetUnit, libs, "gdk_scroll_event_get_unit") | |||
| 1434 | - | core.PuregoSafeRegister(&xScrollEventIsStop, libs, "gdk_scroll_event_is_stop") | |||
| 1435 | - | ||||
| 1436 | - | core.PuregoSafeRegister(&xTouchEventGLibType, libs, "gdk_touch_event_get_type") | |||
| 1437 | - | ||||
| 1438 | - | core.PuregoSafeRegister(&xTouchEventGetEmulatingPointer, libs, "gdk_touch_event_get_emulating_pointer") | |||
| 1439 | - | ||||
| 1440 | - | core.PuregoSafeRegister(&xTouchpadEventGLibType, libs, "gdk_touchpad_event_get_type") | |||
| 1441 | - | ||||
| 1442 | - | core.PuregoSafeRegister(&xTouchpadEventGetDeltas, libs, "gdk_touchpad_event_get_deltas") | |||
| 1443 | - | core.PuregoSafeRegister(&xTouchpadEventGetGesturePhase, libs, "gdk_touchpad_event_get_gesture_phase") | |||
| 1444 | - | core.PuregoSafeRegister(&xTouchpadEventGetNFingers, libs, "gdk_touchpad_event_get_n_fingers") | |||
| 1445 | - | core.PuregoSafeRegister(&xTouchpadEventGetPinchAngleDelta, libs, "gdk_touchpad_event_get_pinch_angle_delta") | |||
| 1446 | - | core.PuregoSafeRegister(&xTouchpadEventGetPinchScale, libs, "gdk_touchpad_event_get_pinch_scale") | |||
| 1447 | } | 1449 | } | ||