Make Seat a toplevel struct
This commit is contained in:
parent
4c97531860
commit
7ddcebbbab
19 changed files with 236 additions and 238 deletions
|
@ -1,4 +1,4 @@
|
|||
const Seat = @import("seat.zig").Seat;
|
||||
const Seat = @import("seat.zig");
|
||||
|
||||
pub const Direction = enum {
|
||||
Next,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const c = @import("../c.zig");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Close the focused view, if any.
|
||||
pub fn close_view(seat: *Seat, arg: Arg) void {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const c = @import("../c.zig");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Exit the compositor, terminating the wayland session.
|
||||
pub fn exitCompositor(seat: *Seat, arg: Arg) void {
|
||||
|
|
|
@ -3,7 +3,7 @@ const std = @import("std");
|
|||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Output = @import("../output.zig").Output;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Focus either the next or the previous output, depending on the bool passed.
|
||||
/// Does nothing if there is only one output.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const c = @import("../c.zig");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Switch focus to the passed tags.
|
||||
pub fn focusTags(seat: *Seat, arg: Arg) void {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const c = @import("../c.zig");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
const View = @import("../view.zig").View;
|
||||
const ViewStack = @import("../view_stack.zig").ViewStack;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ const c = @import("../c.zig");
|
|||
const std = @import("std");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Modify the number of master views
|
||||
pub fn modifyMasterCount(seat: *Seat, arg: Arg) void {
|
||||
|
|
|
@ -2,7 +2,7 @@ const c = @import("../c.zig");
|
|||
const std = @import("std");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Modify the percent of the width of the screen that the master views occupy.
|
||||
pub fn modifyMasterFactor(seat: *Seat, arg: Arg) void {
|
||||
|
|
|
@ -3,7 +3,7 @@ const std = @import("std");
|
|||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Output = @import("../output.zig").Output;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Send the focused view to the the next or the previous output, depending on
|
||||
/// the bool passed. Does nothing if there is only one output.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const c = @import("../c.zig");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Set the tags of the focused view.
|
||||
pub fn setViewTags(seat: *Seat, arg: Arg) void {
|
||||
|
|
|
@ -3,7 +3,7 @@ const std = @import("std");
|
|||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Log = @import("../log.zig").Log;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Spawn a program.
|
||||
pub fn spawn(seat: *Seat, arg: Arg) void {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const c = @import("../c.zig");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Make the focused view float or stop floating, depending on its current
|
||||
/// state.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const c = @import("../c.zig");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Toggle focus of the passsed tags.
|
||||
pub fn toggleTags(seat: *Seat, arg: Arg) void {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const c = @import("../c.zig");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
|
||||
/// Toggle the passed tags of the focused view
|
||||
pub fn toggleViewTags(seat: *Seat, arg: Arg) void {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const c = @import("../c.zig");
|
||||
|
||||
const Arg = @import("../command.zig").Arg;
|
||||
const Seat = @import("../seat.zig").Seat;
|
||||
const Seat = @import("../seat.zig");
|
||||
const View = @import("../view.zig").View;
|
||||
const ViewStack = @import("../view_stack.zig").ViewStack;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ const c = @import("c.zig");
|
|||
const LayerSurface = @import("layer_surface.zig").LayerSurface;
|
||||
const Log = @import("log.zig").Log;
|
||||
const Output = @import("output.zig").Output;
|
||||
const Seat = @import("seat.zig").Seat;
|
||||
const Seat = @import("seat.zig");
|
||||
const View = @import("view.zig").View;
|
||||
const ViewStack = @import("view_stack.zig").ViewStack;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ const std = @import("std");
|
|||
const c = @import("c.zig");
|
||||
|
||||
const Log = @import("log.zig").Log;
|
||||
const Seat = @import("seat.zig").Seat;
|
||||
const Seat = @import("seat.zig");
|
||||
const Server = @import("server.zig");
|
||||
|
||||
const default_seat_name = "default";
|
||||
|
|
|
@ -2,7 +2,7 @@ const std = @import("std");
|
|||
const c = @import("c.zig");
|
||||
|
||||
const Log = @import("log.zig").Log;
|
||||
const Seat = @import("seat.zig").Seat;
|
||||
const Seat = @import("seat.zig");
|
||||
|
||||
pub const Keyboard = struct {
|
||||
const Self = @This();
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const Self = @This();
|
||||
|
||||
const c = @import("c.zig");
|
||||
const std = @import("std");
|
||||
|
||||
|
@ -15,9 +17,6 @@ const FocusTarget = union(enum) {
|
|||
none: void,
|
||||
};
|
||||
|
||||
pub const Seat = struct {
|
||||
const Self = @This();
|
||||
|
||||
input_manager: *InputManager,
|
||||
wlr_seat: *c.wlr_seat,
|
||||
|
||||
|
@ -280,4 +279,3 @@ pub const Seat = struct {
|
|||
);
|
||||
c.wlr_seat_set_selection(self.wlr_seat, event.source, event.serial);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue