config: add get_connector_by_name
This commit is contained in:
parent
52b91654ca
commit
cf36da4077
4 changed files with 31 additions and 0 deletions
|
|
@ -560,6 +560,12 @@ impl ConfigClient {
|
|||
connector
|
||||
}
|
||||
|
||||
pub fn get_connector_by_name(&self, name: &str) -> Connector {
|
||||
let res = self.send_with_response(&ClientMessage::GetConnectorByName { name });
|
||||
get_response!(res, Connector(0), GetConnector { connector });
|
||||
connector
|
||||
}
|
||||
|
||||
pub fn get_seat_cursor_workspace(&self, seat: Seat) -> Workspace {
|
||||
let res = self.send_with_response(&ClientMessage::GetSeatCursorWorkspace { seat });
|
||||
get_response!(res, Workspace(0), GetSeatCursorWorkspace { workspace });
|
||||
|
|
|
|||
|
|
@ -849,6 +849,9 @@ pub enum ClientMessage<'a> {
|
|||
ConnectorSupportsArbitraryModes {
|
||||
connector: Connector,
|
||||
},
|
||||
GetConnectorByName {
|
||||
name: &'a str,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue