seat: add framework to select toplevels
This commit is contained in:
parent
e4e090d3a2
commit
17a0dfed5e
31 changed files with 603 additions and 131 deletions
19
src/tree.rs
19
src/tree.rs
|
|
@ -100,6 +100,12 @@ impl FindTreeResult {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Eq, PartialEq)]
|
||||
pub enum FindTreeUsecase {
|
||||
None,
|
||||
SelectToplevel,
|
||||
}
|
||||
|
||||
pub trait Node: 'static {
|
||||
fn node_id(&self) -> NodeId;
|
||||
fn node_seat_state(&self) -> &NodeSeatState;
|
||||
|
|
@ -122,10 +128,17 @@ pub trait Node: 'static {
|
|||
let _ = active;
|
||||
}
|
||||
|
||||
fn node_find_tree_at(&self, x: i32, y: i32, tree: &mut Vec<FoundNode>) -> FindTreeResult {
|
||||
fn node_find_tree_at(
|
||||
&self,
|
||||
x: i32,
|
||||
y: i32,
|
||||
tree: &mut Vec<FoundNode>,
|
||||
usecase: FindTreeUsecase,
|
||||
) -> FindTreeResult {
|
||||
let _ = x;
|
||||
let _ = y;
|
||||
let _ = tree;
|
||||
let _ = usecase;
|
||||
FindTreeResult::Other
|
||||
}
|
||||
|
||||
|
|
@ -296,6 +309,10 @@ pub trait Node: 'static {
|
|||
None
|
||||
}
|
||||
|
||||
fn node_into_toplevel(self: Rc<Self>) -> Option<Rc<dyn ToplevelNode>> {
|
||||
None
|
||||
}
|
||||
|
||||
// TYPE CHECKERS
|
||||
|
||||
fn node_is_container(&self) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue