gtk: update zig-gobject to get improved gobject accessors

This commit is contained in:
Jeffrey C. Ollie
2025-07-19 09:58:37 -05:00
committed by Mitchell Hashimoto
parent 1ec4383931
commit 22b2344f50
10 changed files with 48 additions and 30 deletions

View File

@ -55,8 +55,8 @@
.gobject = .{ .gobject = .{
// https://github.com/jcollie/ghostty-gobject based on zig_gobject // https://github.com/jcollie/ghostty-gobject based on zig_gobject
// Temporary until we generate them at build time automatically. // Temporary until we generate them at build time automatically.
.url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.0-2025-03-18-21-1/ghostty-gobject-0.14.0-2025-03-18-21-1.tar.zst", .url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.1-2025-07-19-27-1/ghostty-gobject-0.14.1-2025-07-19-27-1.tar.zst",
.hash = "gobject-0.2.0-Skun7IWDlQAOKu4BV7LapIxL9Imbq1JRmzvcIkazvAxR", .hash = "gobject-0.3.0-Skun7KzYnAAsvbz0JzKA4LBdXbLqj0eNXHoKAIE0HkOl",
.lazy = true, .lazy = true,
}, },

6
build.zig.zon.json generated
View File

@ -24,10 +24,10 @@
"url": "https://deps.files.ghostty.org/glslang-12201278a1a05c0ce0b6eb6026c65cd3e9247aa041b1c260324bf29cee559dd23ba1.tar.gz", "url": "https://deps.files.ghostty.org/glslang-12201278a1a05c0ce0b6eb6026c65cd3e9247aa041b1c260324bf29cee559dd23ba1.tar.gz",
"hash": "sha256-FKLtu1Ccs+UamlPj9eQ12/WXFgS0uDPmPmB26MCpl7U=" "hash": "sha256-FKLtu1Ccs+UamlPj9eQ12/WXFgS0uDPmPmB26MCpl7U="
}, },
"gobject-0.2.0-Skun7IWDlQAOKu4BV7LapIxL9Imbq1JRmzvcIkazvAxR": { "gobject-0.3.0-Skun7KzYnAAsvbz0JzKA4LBdXbLqj0eNXHoKAIE0HkOl": {
"name": "gobject", "name": "gobject",
"url": "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.0-2025-03-18-21-1/ghostty-gobject-0.14.0-2025-03-18-21-1.tar.zst", "url": "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.1-2025-07-19-27-1/ghostty-gobject-0.14.1-2025-07-19-27-1.tar.zst",
"hash": "sha256-hWcpl0Wd3XydT+RY7+VIoxXPhCzele1Ip76YSh+KmLI=" "hash": "sha256-c4szPFC+L2H8ZQ3g7aoVi+lPmF4I6STxN9+fBhxaap8="
}, },
"N-V-__8AALiNBAA-_0gprYr92CjrMj1I5bqNu0TSJOnjFNSr": { "N-V-__8AALiNBAA-_0gprYr92CjrMj1I5bqNu0TSJOnjFNSr": {
"name": "gtk4_layer_shell", "name": "gtk4_layer_shell",

6
build.zig.zon.nix generated
View File

@ -122,11 +122,11 @@ in
}; };
} }
{ {
name = "gobject-0.2.0-Skun7IWDlQAOKu4BV7LapIxL9Imbq1JRmzvcIkazvAxR"; name = "gobject-0.3.0-Skun7KzYnAAsvbz0JzKA4LBdXbLqj0eNXHoKAIE0HkOl";
path = fetchZigArtifact { path = fetchZigArtifact {
name = "gobject"; name = "gobject";
url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.0-2025-03-18-21-1/ghostty-gobject-0.14.0-2025-03-18-21-1.tar.zst"; url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.1-2025-07-19-27-1/ghostty-gobject-0.14.1-2025-07-19-27-1.tar.zst";
hash = "sha256-hWcpl0Wd3XydT+RY7+VIoxXPhCzele1Ip76YSh+KmLI="; hash = "sha256-c4szPFC+L2H8ZQ3g7aoVi+lPmF4I6STxN9+fBhxaap8=";
}; };
} }
{ {

2
build.zig.zon.txt generated
View File

@ -27,7 +27,7 @@ https://deps.files.ghostty.org/wuffs-122037b39d577ec2db3fd7b2130e7b69ef6cc1807d6
https://deps.files.ghostty.org/zig_js-12205a66d423259567764fa0fc60c82be35365c21aeb76c5a7dc99698401f4f6fefc.tar.gz https://deps.files.ghostty.org/zig_js-12205a66d423259567764fa0fc60c82be35365c21aeb76c5a7dc99698401f4f6fefc.tar.gz
https://deps.files.ghostty.org/ziglyph-b89d43d1e3fb01b6074bc1f7fc980324b04d26a5.tar.gz https://deps.files.ghostty.org/ziglyph-b89d43d1e3fb01b6074bc1f7fc980324b04d26a5.tar.gz
https://deps.files.ghostty.org/zlib-1220fed0c74e1019b3ee29edae2051788b080cd96e90d56836eea857b0b966742efb.tar.gz https://deps.files.ghostty.org/zlib-1220fed0c74e1019b3ee29edae2051788b080cd96e90d56836eea857b0b966742efb.tar.gz
https://github.com/jcollie/ghostty-gobject/releases/download/0.14.0-2025-03-18-21-1/ghostty-gobject-0.14.0-2025-03-18-21-1.tar.zst https://github.com/jcollie/ghostty-gobject/releases/download/0.14.1-2025-07-19-27-1/ghostty-gobject-0.14.1-2025-07-19-27-1.tar.zst
https://github.com/mbadolato/iTerm2-Color-Schemes/archive/92f20650771384b82f981fb0f249e5fbdcb69e9f.tar.gz https://github.com/mbadolato/iTerm2-Color-Schemes/archive/92f20650771384b82f981fb0f249e5fbdcb69e9f.tar.gz
https://github.com/mitchellh/libxev/archive/7f803181b158a10fec8619f793e3b4df515566cb.tar.gz https://github.com/mitchellh/libxev/archive/7f803181b158a10fec8619f793e3b4df515566cb.tar.gz
https://github.com/mitchellh/zig-objc/archive/c9e917a4e15a983b672ca779c7985d738a2d517c.tar.gz https://github.com/mitchellh/zig-objc/archive/c9e917a4e15a983b672ca779c7985d738a2d517c.tar.gz

View File

@ -31,9 +31,9 @@
}, },
{ {
"type": "archive", "type": "archive",
"url": "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.0-2025-03-18-21-1/ghostty-gobject-0.14.0-2025-03-18-21-1.tar.zst", "url": "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.1-2025-07-19-27-1/ghostty-gobject-0.14.1-2025-07-19-27-1.tar.zst",
"dest": "vendor/p/gobject-0.2.0-Skun7IWDlQAOKu4BV7LapIxL9Imbq1JRmzvcIkazvAxR", "dest": "vendor/p/gobject-0.3.0-Skun7KzYnAAsvbz0JzKA4LBdXbLqj0eNXHoKAIE0HkOl",
"sha256": "85672997459ddd7c9d4fe458efe548a315cf842cde95ed48a7be984a1f8a98b2" "sha256": "738b333c50be2f61fc650de0edaa158be94f985e08e924f137df9f061c5a6a9f"
}, },
{ {
"type": "archive", "type": "archive",

View File

@ -71,10 +71,13 @@ pub const Application = extern struct {
.{ .{
.nick = "Config", .nick = "Config",
.blurb = "The current active configuration for the application.", .blurb = "The current active configuration for the application.",
.default = null, .accessor = gobject.ext.typedAccessor(
.accessor = .{ Self,
?*Config,
.{
.getter = Self.getPropConfig, .getter = Self.getPropConfig,
}, },
),
}, },
); );
}; };

View File

@ -42,10 +42,13 @@ pub const Config = extern struct {
.{ .{
.nick = "Diagnostics Buffer", .nick = "Diagnostics Buffer",
.blurb = "A TextBuffer that contains the diagnostics.", .blurb = "A TextBuffer that contains the diagnostics.",
.default = null, .accessor = gobject.ext.typedAccessor(
.accessor = .{ Self,
?*gtk.TextBuffer,
.{
.getter = Self.diagnosticsBuffer, .getter = Self.diagnosticsBuffer,
}, },
),
}, },
); );
@ -57,9 +60,13 @@ pub const Config = extern struct {
.nick = "has-diagnostics", .nick = "has-diagnostics",
.blurb = "Whether the configuration has diagnostics.", .blurb = "Whether the configuration has diagnostics.",
.default = false, .default = false,
.accessor = .{ .accessor = gobject.ext.typedAccessor(
Self,
bool,
.{
.getter = Self.hasDiagnostics, .getter = Self.hasDiagnostics,
}, },
),
}, },
); );
}; };

View File

@ -35,11 +35,14 @@ pub const ConfigErrorsDialog = extern struct {
.{ .{
.nick = "config", .nick = "config",
.blurb = "The configuration that this dialog is showing errors for.", .blurb = "The configuration that this dialog is showing errors for.",
.default = null, .accessor = gobject.ext.typedAccessor(
.accessor = .{ Self,
?*Config,
.{
.getter = Self.getConfig, .getter = Self.getConfig,
.setter = Self.setConfig, .setter = Self.setConfig,
}, },
),
}, },
); );
}; };

View File

@ -43,7 +43,6 @@ pub const Surface = extern struct {
.{ .{
.nick = "Config", .nick = "Config",
.blurb = "The configuration that this surface is using.", .blurb = "The configuration that this surface is using.",
.default = null,
.accessor = gobject.ext.privateFieldAccessor( .accessor = gobject.ext.privateFieldAccessor(
Self, Self,
Private, Private,

View File

@ -238,7 +238,13 @@ const Command = extern struct {
?[:0]const u8, ?[:0]const u8,
.{ .{
.default = null, .default = null,
.accessor = .{ .getter = &accessor.getter }, .accessor = gobject.ext.typedAccessor(
Command,
?[:0]const u8,
.{
.getter = &accessor.getter,
},
),
}, },
); );
} }