config: allow retrieving the modes
This commit is contained in:
parent
2ab7b43f74
commit
558bea47b7
8 changed files with 73 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ use {
|
|||
_private::{
|
||||
bincode_ops,
|
||||
ipc::{ClientMessage, InitMessage, Response, ServerMessage},
|
||||
logging, Config, ConfigEntry, ConfigEntryGen, VERSION,
|
||||
logging, Config, ConfigEntry, ConfigEntryGen, WireMode, VERSION,
|
||||
},
|
||||
exec::Command,
|
||||
input::{acceleration::AccelProfile, capability::Capability, InputDevice, Seat},
|
||||
|
|
@ -570,6 +570,12 @@ impl Client {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn connector_modes(&self, connector: Connector) -> Vec<Mode> {
|
||||
let res = self.send_with_response(&ClientMessage::ConnectorModes { connector });
|
||||
get_response!(res, Vec::new(), ConnectorModes { modes });
|
||||
modes.into_iter().map(WireMode::to_mode).collect()
|
||||
}
|
||||
|
||||
pub fn connector_size(&self, connector: Connector) -> (i32, i32) {
|
||||
let res = self.send_with_response(&ClientMessage::ConnectorSize { connector });
|
||||
get_response!(res, (0, 0), ConnectorSize { width, height });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue