mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-31 17:11:22 +00:00
apprt/gtk-ng: toasts
This commit is contained in:
@@ -29,10 +29,27 @@ pub const IMEPos = struct {
|
||||
/// The clipboard type.
|
||||
///
|
||||
/// If this is changed, you must also update ghostty.h
|
||||
pub const Clipboard = enum(u2) {
|
||||
pub const Clipboard = enum(Backing) {
|
||||
standard = 0, // ctrl+c/v
|
||||
selection = 1,
|
||||
primary = 2,
|
||||
|
||||
// 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, .@"gtk-ng" => 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, .@"gtk-ng" => @import("gobject").ext.defineEnum(
|
||||
Clipboard,
|
||||
.{ .name = "GhosttyApprtClipboard" },
|
||||
),
|
||||
|
||||
.none => void,
|
||||
};
|
||||
};
|
||||
|
||||
pub const ClipboardRequestType = enum(u8) {
|
||||
|
||||
Reference in New Issue
Block a user