autocommit 2022-03-13 22:20:31 CET
This commit is contained in:
parent
156bd5b042
commit
a15a02a95c
38 changed files with 63 additions and 66 deletions
|
|
@ -1,150 +0,0 @@
|
|||
use crate::keyboard::keymap::Keymap;
|
||||
use crate::keyboard::mods::Modifiers;
|
||||
use crate::keyboard::syms::KeySym;
|
||||
use crate::theme::Color;
|
||||
use crate::{Axis, Direction, InputDevice, LogLevel, Seat};
|
||||
use bincode::{BorrowDecode, Decode, Encode};
|
||||
|
||||
#[derive(Encode, BorrowDecode, Debug)]
|
||||
pub enum ServerMessage {
|
||||
Configure,
|
||||
Response {
|
||||
response: Response,
|
||||
},
|
||||
NewInputDevice {
|
||||
device: InputDevice,
|
||||
},
|
||||
DelInputDevice {
|
||||
device: InputDevice,
|
||||
},
|
||||
InvokeShortcut {
|
||||
seat: Seat,
|
||||
mods: Modifiers,
|
||||
sym: KeySym,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Encode, BorrowDecode, Debug)]
|
||||
pub enum ClientMessage<'a> {
|
||||
Log {
|
||||
level: LogLevel,
|
||||
msg: &'a str,
|
||||
file: Option<&'a str>,
|
||||
line: Option<u32>,
|
||||
},
|
||||
CreateSeat {
|
||||
name: &'a str,
|
||||
},
|
||||
Quit,
|
||||
SetSeat {
|
||||
device: InputDevice,
|
||||
seat: Seat,
|
||||
},
|
||||
ParseKeymap {
|
||||
keymap: &'a str,
|
||||
},
|
||||
SeatSetKeymap {
|
||||
seat: Seat,
|
||||
keymap: Keymap,
|
||||
},
|
||||
SeatGetRepeatRate {
|
||||
seat: Seat,
|
||||
},
|
||||
SeatSetRepeatRate {
|
||||
seat: Seat,
|
||||
rate: i32,
|
||||
delay: i32,
|
||||
},
|
||||
GetSplit {
|
||||
seat: Seat,
|
||||
},
|
||||
SetSplit {
|
||||
seat: Seat,
|
||||
axis: Axis,
|
||||
},
|
||||
RemoveSeat {
|
||||
seat: Seat,
|
||||
},
|
||||
GetSeats,
|
||||
GetInputDevices {
|
||||
seat: Option<Seat>,
|
||||
},
|
||||
AddShortcut {
|
||||
seat: Seat,
|
||||
mods: Modifiers,
|
||||
sym: KeySym,
|
||||
},
|
||||
RemoveShortcut {
|
||||
seat: Seat,
|
||||
mods: Modifiers,
|
||||
sym: KeySym,
|
||||
},
|
||||
Run {
|
||||
prog: &'a str,
|
||||
args: Vec<String>,
|
||||
env: Vec<(String, String)>,
|
||||
},
|
||||
Focus {
|
||||
seat: Seat,
|
||||
direction: Direction,
|
||||
},
|
||||
Move {
|
||||
seat: Seat,
|
||||
direction: Direction,
|
||||
},
|
||||
GrabKb {
|
||||
kb: InputDevice,
|
||||
grab: bool,
|
||||
},
|
||||
GetTitleHeight,
|
||||
GetBorderWidth,
|
||||
SetTitleHeight {
|
||||
height: i32,
|
||||
},
|
||||
SetBorderWidth {
|
||||
width: i32,
|
||||
},
|
||||
SetTitleColor {
|
||||
color: Color,
|
||||
},
|
||||
SetTitleUnderlineColor {
|
||||
color: Color,
|
||||
},
|
||||
SetBorderColor {
|
||||
color: Color,
|
||||
},
|
||||
SetBackgroundColor {
|
||||
color: Color,
|
||||
},
|
||||
CreateSplit {
|
||||
seat: Seat,
|
||||
axis: Axis,
|
||||
},
|
||||
FocusParent {
|
||||
seat: Seat,
|
||||
},
|
||||
ToggleFloating {
|
||||
seat: Seat,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, Debug)]
|
||||
pub enum Response {
|
||||
None,
|
||||
GetSeats { seats: Vec<Seat> },
|
||||
GetSplit { axis: Axis },
|
||||
GetRepeatRate { rate: i32, delay: i32 },
|
||||
ParseKeymap { keymap: Keymap },
|
||||
CreateSeat { seat: Seat },
|
||||
GetInputDevices { devices: Vec<InputDevice> },
|
||||
GetTitleHeight { height: i32 },
|
||||
GetBorderWidth { width: i32 },
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, Debug)]
|
||||
pub enum InitMessage {
|
||||
V1(V1InitMessage),
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, Debug)]
|
||||
pub struct V1InitMessage {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue