mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-15 18:31:58 +00:00
gtk: the Future is Now
This commit is contained in:
@@ -542,7 +542,7 @@ pub const InitialSize = extern struct {
|
||||
|
||||
/// Make this a valid gobject if we're in a GTK environment.
|
||||
pub const getGObjectType = switch (build_config.app_runtime) {
|
||||
.@"gtk-ng" => @import("gobject").ext.defineBoxed(
|
||||
.gtk => @import("gobject").ext.defineBoxed(
|
||||
InitialSize,
|
||||
.{ .name = "GhosttyApprtInitialSize" },
|
||||
),
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
const internal_os = @import("../os/main.zig");
|
||||
|
||||
// The required comptime API for any apprt.
|
||||
pub const App = @import("gtk-ng/App.zig");
|
||||
pub const Surface = @import("gtk-ng/Surface.zig");
|
||||
pub const App = @import("gtk/App.zig");
|
||||
pub const Surface = @import("gtk/Surface.zig");
|
||||
pub const resourcesDir = internal_os.resourcesDir;
|
||||
|
||||
// The exported API, custom for the apprt.
|
||||
pub const class = @import("gtk-ng/class.zig");
|
||||
pub const WeakRef = @import("gtk-ng/weak_ref.zig").WeakRef;
|
||||
pub const class = @import("gtk/class.zig");
|
||||
pub const WeakRef = @import("gtk/weak_ref.zig").WeakRef;
|
||||
|
||||
test {
|
||||
@import("std").testing.refAllDecls(@This());
|
||||
_ = @import("gtk-ng/ext.zig");
|
||||
_ = @import("gtk/ext.zig");
|
||||
}
|
||||
@@ -14,10 +14,10 @@ pub const app_id = "com.mitchellh.ghostty";
|
||||
/// The path to the Blueprint files. The folder structure is expected to be
|
||||
/// `{version}/{name}.blp` where `version` is the major and minor
|
||||
/// minimum adwaita version.
|
||||
pub const ui_path = "src/apprt/gtk-ng/ui";
|
||||
pub const ui_path = "src/apprt/gtk/ui";
|
||||
|
||||
/// The path to the CSS files.
|
||||
pub const css_path = "src/apprt/gtk-ng/css";
|
||||
pub const css_path = "src/apprt/gtk/css";
|
||||
|
||||
/// The possible icon sizes we'll embed into the gresource file.
|
||||
/// If any size doesn't exist then it will be an error. We could
|
||||
@@ -39,13 +39,13 @@ pub const Clipboard = enum(Backing) {
|
||||
// Our backing isn't is as small as we can in Zig, but a full
|
||||
// C int if we're binding to C APIs.
|
||||
const Backing = switch (build_config.app_runtime) {
|
||||
.@"gtk-ng" => c_int,
|
||||
.gtk => c_int,
|
||||
else => u2,
|
||||
};
|
||||
|
||||
/// Make this a valid gobject if we're in a GTK environment.
|
||||
pub const getGObjectType = switch (build_config.app_runtime) {
|
||||
.@"gtk-ng" => @import("gobject").ext.defineEnum(
|
||||
.gtk => @import("gobject").ext.defineEnum(
|
||||
Clipboard,
|
||||
.{ .name = "GhosttyApprtClipboard" },
|
||||
),
|
||||
@@ -74,7 +74,7 @@ pub const ClipboardRequest = union(ClipboardRequestType) {
|
||||
|
||||
/// Make this a valid gobject if we're in a GTK environment.
|
||||
pub const getGObjectType = switch (build_config.app_runtime) {
|
||||
.@"gtk-ng" => @import("gobject").ext.defineBoxed(
|
||||
.gtk => @import("gobject").ext.defineBoxed(
|
||||
ClipboardRequest,
|
||||
.{ .name = "GhosttyClipboardRequest" },
|
||||
),
|
||||
|
||||
@@ -111,7 +111,7 @@ pub const Message = union(enum) {
|
||||
|
||||
/// Make this a valid gobject if we're in a GTK environment.
|
||||
pub const getGObjectType = switch (build_config.app_runtime) {
|
||||
.@"gtk-ng",
|
||||
.gtk,
|
||||
=> @import("gobject").ext.defineBoxed(
|
||||
ChildExited,
|
||||
.{ .name = "GhosttyApprtChildExited" },
|
||||
|
||||
Reference in New Issue
Block a user