Begin work to add wallpaper support to beansprout
Added pixman and zigimg dependencies
Set up in build.zig, added to both exe and exe_check
Add new protocols:
river-layer-shell-v1
wlr-layer-shell-unstable-v1
xdg-shell (dep of wlr-layer-shell-unstable-v1)
Update Context.zig to hold wl_output, wl_shm, and a WallpaperImage
Also re-ordered all of its fields into alphabetical order
Context.create() now takes a Context.Options struct so that it takes
one arg instead of many smaller args.
Added new WallpaperImage.zig, but it's not yet actually used
This commit is contained in:
parent
e5d439e27d
commit
fb8817ebf9
7 changed files with 718 additions and 26 deletions
35
src/main.zig
35
src/main.zig
|
|
@ -2,11 +2,15 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
/// Wayland globals that we need to bind to
|
||||
/// Wayland globals that we need to bind listen in alphabetical order
|
||||
const Globals = struct {
|
||||
wl_compositor: ?*wl.Compositor = null,
|
||||
river_layer_shell_v1: ?*river.LayerShellV1 = null,
|
||||
river_window_manager_v1: ?*river.WindowManagerV1 = null,
|
||||
river_xkb_bindings_v1: ?*river.XkbBindingsV1 = null,
|
||||
wl_compositor: ?*wl.Compositor = null,
|
||||
wl_output: ?*wl.Output = null,
|
||||
wl_shm: ?*wl.Shm = null,
|
||||
zwlr_layer_shell_v1: ?*zwlr.LayerShellV1 = null,
|
||||
};
|
||||
|
||||
pub fn main() !void {
|
||||
|
|
@ -30,20 +34,28 @@ pub fn main() !void {
|
|||
fatal("Initial roundtrip failed: E{s}", .{@tagName(errno)});
|
||||
}
|
||||
|
||||
const wl_compositor = globals.wl_compositor orelse utils.interfaceNotAdvertised(wl.Compositor);
|
||||
const river_layer_shell_v1 = globals.river_layer_shell_v1 orelse utils.interfaceNotAdvertised(river.LayerShellV1);
|
||||
const river_window_manager_v1 = globals.river_window_manager_v1 orelse utils.interfaceNotAdvertised(river.WindowManagerV1);
|
||||
const river_xkb_bindings_v1 = globals.river_xkb_bindings_v1 orelse utils.interfaceNotAdvertised(river.XkbBindingsV1);
|
||||
const wl_compositor = globals.wl_compositor orelse utils.interfaceNotAdvertised(wl.Compositor);
|
||||
const wl_output = globals.wl_output orelse utils.interfaceNotAdvertised(wl.Output);
|
||||
const wl_shm = globals.wl_shm orelse utils.interfaceNotAdvertised(wl.Shm);
|
||||
const zwlr_layer_shell_v1 = globals.zwlr_layer_shell_v1 orelse utils.interfaceNotAdvertised(zwlr.LayerShellV1);
|
||||
|
||||
const config = try Config.create();
|
||||
defer config.destroy();
|
||||
const context = try Context.create(
|
||||
wl_display,
|
||||
wl_registry,
|
||||
wl_compositor,
|
||||
river_window_manager_v1,
|
||||
river_xkb_bindings_v1,
|
||||
config,
|
||||
);
|
||||
const context = try Context.create(.{
|
||||
.wl_compositor = wl_compositor,
|
||||
.wl_display = wl_display,
|
||||
.wl_output = wl_output,
|
||||
.wl_registry = wl_registry,
|
||||
.wl_shm = wl_shm,
|
||||
.river_layer_shell_v1 = river_layer_shell_v1,
|
||||
.river_window_manager_v1 = river_window_manager_v1,
|
||||
.river_xkb_bindings_v1 = river_xkb_bindings_v1,
|
||||
.zwlr_layer_shell_v1 = zwlr_layer_shell_v1,
|
||||
.config = config,
|
||||
});
|
||||
defer context.destroy();
|
||||
|
||||
while (true) {
|
||||
|
|
@ -86,6 +98,7 @@ const process = std.process;
|
|||
const wayland = @import("wayland");
|
||||
const river = wayland.client.river;
|
||||
const wl = wayland.client.wl;
|
||||
const zwlr = wayland.client.zwlr;
|
||||
|
||||
const utils = @import("utils.zig");
|
||||
const Config = @import("Config.zig");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue