Make Seat a toplevel struct

This commit is contained in:
Isaac Freund 2020-05-02 16:35:15 +02:00
parent 4c97531860
commit 7ddcebbbab
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11
19 changed files with 236 additions and 238 deletions

View file

@ -1,4 +1,4 @@
const Seat = @import("seat.zig").Seat; const Seat = @import("seat.zig");
pub const Direction = enum { pub const Direction = enum {
Next, Next,

View file

@ -1,7 +1,7 @@
const c = @import("../c.zig"); const c = @import("../c.zig");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Seat = @import("../seat.zig").Seat; const Seat = @import("../seat.zig");
/// Close the focused view, if any. /// Close the focused view, if any.
pub fn close_view(seat: *Seat, arg: Arg) void { pub fn close_view(seat: *Seat, arg: Arg) void {

View file

@ -1,7 +1,7 @@
const c = @import("../c.zig"); const c = @import("../c.zig");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Seat = @import("../seat.zig").Seat; const Seat = @import("../seat.zig");
/// Exit the compositor, terminating the wayland session. /// Exit the compositor, terminating the wayland session.
pub fn exitCompositor(seat: *Seat, arg: Arg) void { pub fn exitCompositor(seat: *Seat, arg: Arg) void {

View file

@ -3,7 +3,7 @@ const std = @import("std");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Output = @import("../output.zig").Output; 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. /// Focus either the next or the previous output, depending on the bool passed.
/// Does nothing if there is only one output. /// Does nothing if there is only one output.

View file

@ -1,7 +1,7 @@
const c = @import("../c.zig"); const c = @import("../c.zig");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Seat = @import("../seat.zig").Seat; const Seat = @import("../seat.zig");
/// Switch focus to the passed tags. /// Switch focus to the passed tags.
pub fn focusTags(seat: *Seat, arg: Arg) void { pub fn focusTags(seat: *Seat, arg: Arg) void {

View file

@ -1,7 +1,7 @@
const c = @import("../c.zig"); const c = @import("../c.zig");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Seat = @import("../seat.zig").Seat; const Seat = @import("../seat.zig");
const View = @import("../view.zig").View; const View = @import("../view.zig").View;
const ViewStack = @import("../view_stack.zig").ViewStack; const ViewStack = @import("../view_stack.zig").ViewStack;

View file

@ -2,7 +2,7 @@ const c = @import("../c.zig");
const std = @import("std"); const std = @import("std");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Seat = @import("../seat.zig").Seat; const Seat = @import("../seat.zig");
/// Modify the number of master views /// Modify the number of master views
pub fn modifyMasterCount(seat: *Seat, arg: Arg) void { pub fn modifyMasterCount(seat: *Seat, arg: Arg) void {

View file

@ -2,7 +2,7 @@ const c = @import("../c.zig");
const std = @import("std"); const std = @import("std");
const Arg = @import("../command.zig").Arg; 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. /// Modify the percent of the width of the screen that the master views occupy.
pub fn modifyMasterFactor(seat: *Seat, arg: Arg) void { pub fn modifyMasterFactor(seat: *Seat, arg: Arg) void {

View file

@ -3,7 +3,7 @@ const std = @import("std");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Output = @import("../output.zig").Output; 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 /// 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. /// the bool passed. Does nothing if there is only one output.

View file

@ -1,7 +1,7 @@
const c = @import("../c.zig"); const c = @import("../c.zig");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Seat = @import("../seat.zig").Seat; const Seat = @import("../seat.zig");
/// Set the tags of the focused view. /// Set the tags of the focused view.
pub fn setViewTags(seat: *Seat, arg: Arg) void { pub fn setViewTags(seat: *Seat, arg: Arg) void {

View file

@ -3,7 +3,7 @@ const std = @import("std");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Log = @import("../log.zig").Log; const Log = @import("../log.zig").Log;
const Seat = @import("../seat.zig").Seat; const Seat = @import("../seat.zig");
/// Spawn a program. /// Spawn a program.
pub fn spawn(seat: *Seat, arg: Arg) void { pub fn spawn(seat: *Seat, arg: Arg) void {

View file

@ -1,7 +1,7 @@
const c = @import("../c.zig"); const c = @import("../c.zig");
const Arg = @import("../command.zig").Arg; 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 /// Make the focused view float or stop floating, depending on its current
/// state. /// state.

View file

@ -1,7 +1,7 @@
const c = @import("../c.zig"); const c = @import("../c.zig");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Seat = @import("../seat.zig").Seat; const Seat = @import("../seat.zig");
/// Toggle focus of the passsed tags. /// Toggle focus of the passsed tags.
pub fn toggleTags(seat: *Seat, arg: Arg) void { pub fn toggleTags(seat: *Seat, arg: Arg) void {

View file

@ -1,7 +1,7 @@
const c = @import("../c.zig"); const c = @import("../c.zig");
const Arg = @import("../command.zig").Arg; 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 /// Toggle the passed tags of the focused view
pub fn toggleViewTags(seat: *Seat, arg: Arg) void { pub fn toggleViewTags(seat: *Seat, arg: Arg) void {

View file

@ -1,7 +1,7 @@
const c = @import("../c.zig"); const c = @import("../c.zig");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Seat = @import("../seat.zig").Seat; const Seat = @import("../seat.zig");
const View = @import("../view.zig").View; const View = @import("../view.zig").View;
const ViewStack = @import("../view_stack.zig").ViewStack; const ViewStack = @import("../view_stack.zig").ViewStack;

View file

@ -4,7 +4,7 @@ const c = @import("c.zig");
const LayerSurface = @import("layer_surface.zig").LayerSurface; const LayerSurface = @import("layer_surface.zig").LayerSurface;
const Log = @import("log.zig").Log; const Log = @import("log.zig").Log;
const Output = @import("output.zig").Output; const Output = @import("output.zig").Output;
const Seat = @import("seat.zig").Seat; const Seat = @import("seat.zig");
const View = @import("view.zig").View; const View = @import("view.zig").View;
const ViewStack = @import("view_stack.zig").ViewStack; const ViewStack = @import("view_stack.zig").ViewStack;

View file

@ -5,7 +5,7 @@ const std = @import("std");
const c = @import("c.zig"); const c = @import("c.zig");
const Log = @import("log.zig").Log; const Log = @import("log.zig").Log;
const Seat = @import("seat.zig").Seat; const Seat = @import("seat.zig");
const Server = @import("server.zig"); const Server = @import("server.zig");
const default_seat_name = "default"; const default_seat_name = "default";

View file

@ -2,7 +2,7 @@ const std = @import("std");
const c = @import("c.zig"); const c = @import("c.zig");
const Log = @import("log.zig").Log; const Log = @import("log.zig").Log;
const Seat = @import("seat.zig").Seat; const Seat = @import("seat.zig");
pub const Keyboard = struct { pub const Keyboard = struct {
const Self = @This(); const Self = @This();

View file

@ -1,3 +1,5 @@
const Self = @This();
const c = @import("c.zig"); const c = @import("c.zig");
const std = @import("std"); const std = @import("std");
@ -15,9 +17,6 @@ const FocusTarget = union(enum) {
none: void, none: void,
}; };
pub const Seat = struct {
const Self = @This();
input_manager: *InputManager, input_manager: *InputManager,
wlr_seat: *c.wlr_seat, 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); c.wlr_seat_set_selection(self.wlr_seat, event.source, event.serial);
} }
};