gtk: implement quick-terminal-screen for Linux/Wayland (#11117)

This commit is contained in:
Leah Amelia Chen
2026-03-16 06:30:02 +00:00
committed by GitHub
4 changed files with 220 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ const std = @import("std");
const c = @cImport({
@cInclude("gtk4-layer-shell.h");
});
const gdk = @import("gdk");
const gtk = @import("gtk");
pub const ShellLayer = enum(c_uint) {
@@ -61,6 +62,10 @@ pub fn setKeyboardMode(window: *gtk.Window, mode: KeyboardMode) void {
c.gtk_layer_set_keyboard_mode(@ptrCast(window), @intFromEnum(mode));
}
pub fn setMonitor(window: *gtk.Window, monitor: ?*gdk.Monitor) void {
c.gtk_layer_set_monitor(@ptrCast(window), @ptrCast(monitor));
}
pub fn setNamespace(window: *gtk.Window, name: [:0]const u8) void {
c.gtk_layer_set_namespace(@ptrCast(window), name.ptr);
}