1
0
Fork 0
forked from wry/wry

autocommit 2022-03-11 18:15:21 CET

This commit is contained in:
Julian Orth 2022-03-11 18:15:21 +01:00
parent 0399772467
commit b1890894b2
30 changed files with 2909 additions and 504 deletions

View file

@ -284,6 +284,10 @@ impl Client {
*self.on_new_seat.borrow_mut() = Some(Rc::new(f));
}
pub fn quit(&self) {
self.send(&ClientMessage::Quit)
}
pub fn on_new_input_device<F: Fn(InputDevice) + 'static>(&self, f: F) {
*self.on_new_input_device.borrow_mut() = Some(Rc::new(f));
}

View file

@ -35,6 +35,7 @@ pub enum ClientMessage<'a> {
CreateSeat {
name: &'a str,
},
Quit,
SetSeat {
device: InputDevice,
seat: Seat,

View file

@ -163,6 +163,10 @@ pub fn on_new_input_device<F: Fn(InputDevice) + 'static>(f: F) {
get!().on_new_input_device(f)
}
pub fn quit() {
get!().quit()
}
pub struct Command {
prog: String,
args: Vec<String>,