autocommit 2022-04-23 00:55:20 CEST
This commit is contained in:
parent
436f383cd6
commit
e3b3d848c3
32 changed files with 1773 additions and 2451 deletions
642
src/tree.rs
642
src/tree.rs
|
|
@ -19,16 +19,17 @@ use {
|
|||
},
|
||||
};
|
||||
pub use {
|
||||
container::*, display::*, float::*, fullscreen::*, output::*, placeholder::*, toplevel::*,
|
||||
walker::*, workspace::*,
|
||||
container::*, containing::*, display::*, float::*, output::*, placeholder::*, stacked::*,
|
||||
toplevel::*, walker::*, workspace::*,
|
||||
};
|
||||
|
||||
mod container;
|
||||
mod containing;
|
||||
mod display;
|
||||
mod float;
|
||||
mod fullscreen;
|
||||
mod output;
|
||||
mod placeholder;
|
||||
mod stacked;
|
||||
mod toplevel;
|
||||
mod walker;
|
||||
mod workspace;
|
||||
|
|
@ -79,634 +80,195 @@ impl FindTreeResult {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait SizedNode: Sized + 'static {
|
||||
fn id(&self) -> NodeId;
|
||||
fn seat_state(&self) -> &NodeSeatState;
|
||||
fn destroy_node(&self, detach: bool);
|
||||
fn visit(self: &Rc<Self>, visitor: &mut dyn NodeVisitor);
|
||||
fn visit_children(&self, visitor: &mut dyn NodeVisitor);
|
||||
fn visible(&self) -> bool;
|
||||
fn parent(&self) -> Option<Rc<dyn Node>>;
|
||||
pub trait Node: 'static {
|
||||
fn node_id(&self) -> NodeId;
|
||||
fn node_seat_state(&self) -> &NodeSeatState;
|
||||
fn node_visit(self: Rc<Self>, visitor: &mut dyn NodeVisitor);
|
||||
fn node_visit_children(&self, visitor: &mut dyn NodeVisitor);
|
||||
fn node_visible(&self) -> bool;
|
||||
fn node_absolute_position(&self) -> Rect;
|
||||
|
||||
fn last_active_child(self: &Rc<Self>) -> Rc<dyn Node> {
|
||||
self.clone()
|
||||
}
|
||||
|
||||
fn set_visible(&self, visible: bool) {
|
||||
let _ = visible;
|
||||
}
|
||||
|
||||
fn get_workspace(&self) -> Option<Rc<WorkspaceNode>> {
|
||||
None
|
||||
}
|
||||
|
||||
fn child_title_changed(self: &Rc<Self>, child: &dyn Node, title: &str) {
|
||||
fn node_child_title_changed(self: Rc<Self>, child: &dyn Node, title: &str) {
|
||||
let _ = child;
|
||||
let _ = title;
|
||||
}
|
||||
|
||||
fn get_parent_mono(&self) -> Option<bool> {
|
||||
None
|
||||
}
|
||||
|
||||
fn get_parent_split(&self) -> Option<ContainerSplit> {
|
||||
None
|
||||
}
|
||||
|
||||
fn set_parent_mono(&self, mono: bool) {
|
||||
let _ = mono;
|
||||
}
|
||||
|
||||
fn set_parent_split(&self, split: ContainerSplit) {
|
||||
let _ = split;
|
||||
}
|
||||
|
||||
fn get_mono(&self) -> Option<bool> {
|
||||
None
|
||||
}
|
||||
|
||||
fn get_split(&self) -> Option<ContainerSplit> {
|
||||
None
|
||||
}
|
||||
|
||||
fn set_mono(self: &Rc<Self>, child: Option<&dyn Node>) {
|
||||
let _ = child;
|
||||
}
|
||||
|
||||
fn set_split(self: &Rc<Self>, split: ContainerSplit) {
|
||||
let _ = split;
|
||||
}
|
||||
|
||||
fn create_split(self: &Rc<Self>, split: ContainerSplit) {
|
||||
let _ = split;
|
||||
}
|
||||
|
||||
fn focus_self(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn do_focus(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>, direction: Direction) {
|
||||
fn node_do_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, direction: Direction) {
|
||||
let _ = seat;
|
||||
let _ = direction;
|
||||
}
|
||||
|
||||
fn close(self: &Rc<Self>) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
fn move_focus(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>, direction: Direction) {
|
||||
let _ = seat;
|
||||
let _ = direction;
|
||||
}
|
||||
|
||||
fn move_self(self: &Rc<Self>, direction: Direction) {
|
||||
let _ = direction;
|
||||
}
|
||||
|
||||
fn move_focus_from_child(
|
||||
self: &Rc<Self>,
|
||||
seat: &Rc<WlSeatGlobal>,
|
||||
child: &dyn Node,
|
||||
direction: Direction,
|
||||
) {
|
||||
let _ = seat;
|
||||
let _ = direction;
|
||||
let _ = child;
|
||||
}
|
||||
|
||||
fn move_child(self: &Rc<Self>, child: Rc<dyn Node>, direction: Direction) {
|
||||
let _ = direction;
|
||||
let _ = child;
|
||||
}
|
||||
|
||||
fn absolute_position(&self) -> Rect {
|
||||
Rect::new_empty(0, 0)
|
||||
}
|
||||
|
||||
fn absolute_position_constrains_input(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn active_changed(&self, active: bool) {
|
||||
fn node_active_changed(&self, active: bool) {
|
||||
let _ = active;
|
||||
}
|
||||
|
||||
fn key(&self, seat: &WlSeatGlobal, key: u32, state: u32) {
|
||||
let _ = seat;
|
||||
let _ = key;
|
||||
let _ = state;
|
||||
}
|
||||
|
||||
fn mods(&self, seat: &WlSeatGlobal, mods: ModifierState) {
|
||||
let _ = seat;
|
||||
let _ = mods;
|
||||
}
|
||||
|
||||
fn button(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>, button: u32, state: KeyState, serial: u32) {
|
||||
let _ = seat;
|
||||
let _ = button;
|
||||
let _ = state;
|
||||
let _ = serial;
|
||||
}
|
||||
|
||||
fn axis_event(self: &Rc<Self>, seat: &WlSeatGlobal, event: &PendingScroll) {
|
||||
let _ = seat;
|
||||
let _ = event;
|
||||
}
|
||||
|
||||
fn focus(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn focus_parent(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn toggle_floating(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn unfocus(&self, seat: &WlSeatGlobal) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn 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>) -> FindTreeResult {
|
||||
let _ = x;
|
||||
let _ = y;
|
||||
let _ = tree;
|
||||
FindTreeResult::Other
|
||||
}
|
||||
|
||||
fn replace_child(self: &Rc<Self>, old: &dyn Node, new: Rc<dyn Node>) {
|
||||
let _ = old;
|
||||
let _ = new;
|
||||
}
|
||||
|
||||
fn remove_child(self: &Rc<Self>, child: &dyn Node) {
|
||||
self.remove_child2(child, false);
|
||||
}
|
||||
|
||||
fn remove_child2(self: &Rc<Self>, child: &dyn Node, preserve_focus: bool) {
|
||||
let _ = child;
|
||||
let _ = preserve_focus;
|
||||
}
|
||||
|
||||
fn child_size_changed(&self, child: &dyn Node, width: i32, height: i32) {
|
||||
fn node_child_size_changed(&self, child: &dyn Node, width: i32, height: i32) {
|
||||
let _ = (child, width, height);
|
||||
}
|
||||
|
||||
fn child_active_changed(self: &Rc<Self>, child: &dyn Node, active: bool, depth: u32) {
|
||||
fn node_child_active_changed(self: Rc<Self>, child: &dyn Node, active: bool, depth: u32) {
|
||||
let _ = (child, active, depth);
|
||||
}
|
||||
|
||||
fn leave(&self, seat: &WlSeatGlobal) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn pointer_enter(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
let _ = seat;
|
||||
let _ = x;
|
||||
let _ = y;
|
||||
}
|
||||
|
||||
fn pointer_unfocus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn pointer_focus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn pointer_motion(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
let _ = seat;
|
||||
let _ = x;
|
||||
let _ = y;
|
||||
}
|
||||
|
||||
fn render(&self, renderer: &mut Renderer, x: i32, y: i32) {
|
||||
fn node_render(&self, renderer: &mut Renderer, x: i32, y: i32) {
|
||||
let _ = renderer;
|
||||
let _ = x;
|
||||
let _ = y;
|
||||
}
|
||||
|
||||
fn into_float(self: &Rc<Self>) -> Option<Rc<FloatNode>> {
|
||||
fn node_client(&self) -> Option<Rc<Client>> {
|
||||
None
|
||||
}
|
||||
|
||||
fn into_container(self: &Rc<Self>) -> Option<Rc<ContainerNode>> {
|
||||
fn node_client_id(&self) -> Option<ClientId> {
|
||||
self.node_client().map(|c| c.id)
|
||||
}
|
||||
|
||||
fn node_toplevel(self: Rc<Self>) -> Option<Rc<dyn ToplevelNode>> {
|
||||
None
|
||||
}
|
||||
|
||||
fn into_workspace(self: &Rc<Self>) -> Option<Rc<WorkspaceNode>> {
|
||||
None
|
||||
// EVENT HANDLERS
|
||||
|
||||
fn node_on_key(&self, seat: &WlSeatGlobal, key: u32, state: u32) {
|
||||
let _ = seat;
|
||||
let _ = key;
|
||||
let _ = state;
|
||||
}
|
||||
|
||||
fn is_container(&self) -> bool {
|
||||
false
|
||||
fn node_on_mods(&self, seat: &WlSeatGlobal, mods: ModifierState) {
|
||||
let _ = seat;
|
||||
let _ = mods;
|
||||
}
|
||||
|
||||
fn is_output(&self) -> bool {
|
||||
false
|
||||
fn node_on_button(
|
||||
self: Rc<Self>,
|
||||
seat: &Rc<WlSeatGlobal>,
|
||||
button: u32,
|
||||
state: KeyState,
|
||||
serial: u32,
|
||||
) {
|
||||
let _ = seat;
|
||||
let _ = button;
|
||||
let _ = state;
|
||||
let _ = serial;
|
||||
}
|
||||
|
||||
fn into_output(self: &Rc<Self>) -> Option<Rc<OutputNode>> {
|
||||
None
|
||||
fn node_on_axis_event(self: Rc<Self>, seat: &WlSeatGlobal, event: &PendingScroll) {
|
||||
let _ = seat;
|
||||
let _ = event;
|
||||
}
|
||||
|
||||
fn accepts_child(&self, node: &dyn Node) -> bool {
|
||||
let _ = node;
|
||||
false
|
||||
fn node_on_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn insert_child(self: &Rc<Self>, node: Rc<dyn Node>, direction: Direction) {
|
||||
let _ = node;
|
||||
let _ = direction;
|
||||
fn node_on_unfocus(&self, seat: &WlSeatGlobal) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn is_float(&self) -> bool {
|
||||
false
|
||||
fn node_on_leave(&self, seat: &WlSeatGlobal) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn is_workspace(&self) -> bool {
|
||||
false
|
||||
fn node_on_pointer_enter(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
let _ = seat;
|
||||
let _ = x;
|
||||
let _ = y;
|
||||
}
|
||||
|
||||
fn change_extents(self: &Rc<Self>, rect: &Rect) {
|
||||
let _ = rect;
|
||||
fn node_on_pointer_unfocus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn set_workspace(self: &Rc<Self>, ws: &Rc<WorkspaceNode>) {
|
||||
let _ = ws;
|
||||
fn node_on_pointer_focus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
let _ = seat;
|
||||
}
|
||||
|
||||
fn set_parent(self: &Rc<Self>, parent: Rc<dyn Node>) {
|
||||
let _ = parent;
|
||||
fn node_on_pointer_motion(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
let _ = seat;
|
||||
let _ = x;
|
||||
let _ = y;
|
||||
}
|
||||
|
||||
fn client(&self) -> Option<Rc<Client>> {
|
||||
None
|
||||
}
|
||||
|
||||
fn client_id(&self) -> Option<ClientId> {
|
||||
self.client().map(|c| c.id)
|
||||
}
|
||||
|
||||
fn into_surface(self: &Rc<Self>) -> Option<Rc<WlSurface>> {
|
||||
None
|
||||
}
|
||||
|
||||
fn dnd_drop(&self, dnd: &Dnd) {
|
||||
fn node_on_dnd_drop(&self, dnd: &Dnd) {
|
||||
let _ = dnd;
|
||||
}
|
||||
|
||||
fn dnd_leave(&self, dnd: &Dnd) {
|
||||
fn node_on_dnd_leave(&self, dnd: &Dnd) {
|
||||
let _ = dnd;
|
||||
}
|
||||
|
||||
fn dnd_enter(&self, dnd: &Dnd, x: Fixed, y: Fixed, serial: u32) {
|
||||
fn node_on_dnd_enter(&self, dnd: &Dnd, x: Fixed, y: Fixed, serial: u32) {
|
||||
let _ = dnd;
|
||||
let _ = x;
|
||||
let _ = y;
|
||||
let _ = serial;
|
||||
}
|
||||
|
||||
fn dnd_motion(&self, dnd: &Dnd, x: Fixed, y: Fixed) {
|
||||
fn node_on_dnd_motion(&self, dnd: &Dnd, x: Fixed, y: Fixed) {
|
||||
let _ = dnd;
|
||||
let _ = x;
|
||||
let _ = y;
|
||||
}
|
||||
|
||||
fn is_xwayland_surface(&self) -> bool {
|
||||
false
|
||||
}
|
||||
// TYPE CONVERTERS
|
||||
|
||||
fn fullscreen(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn set_fullscreen(self: &Rc<Self>, fullscreen: bool) {
|
||||
let _ = fullscreen;
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Node {
|
||||
fn node_id(&self) -> NodeId;
|
||||
fn node_seat_state(&self) -> &NodeSeatState;
|
||||
fn node_destroy(&self, detach: bool);
|
||||
fn node_visit(self: Rc<Self>, visitor: &mut dyn NodeVisitor);
|
||||
fn node_visit_children(&self, visitor: &mut dyn NodeVisitor);
|
||||
fn node_visible(&self) -> bool;
|
||||
fn node_parent(&self) -> Option<Rc<dyn Node>>;
|
||||
fn node_last_active_child(self: Rc<Self>) -> Rc<dyn Node>;
|
||||
fn node_set_visible(&self, visible: bool);
|
||||
fn node_get_workspace(&self) -> Option<Rc<WorkspaceNode>>;
|
||||
fn node_child_title_changed(self: Rc<Self>, child: &dyn Node, title: &str);
|
||||
fn node_get_parent_mono(&self) -> Option<bool>;
|
||||
fn node_get_parent_split(&self) -> Option<ContainerSplit>;
|
||||
fn node_set_parent_mono(&self, mono: bool);
|
||||
fn node_set_parent_split(&self, split: ContainerSplit);
|
||||
fn node_get_mono(&self) -> Option<bool>;
|
||||
fn node_get_split(&self) -> Option<ContainerSplit>;
|
||||
fn node_set_mono(self: Rc<Self>, child: Option<&dyn Node>);
|
||||
fn node_set_split(self: Rc<Self>, split: ContainerSplit);
|
||||
fn node_create_split(self: Rc<Self>, split: ContainerSplit);
|
||||
fn node_focus_self(self: Rc<Self>, seat: &Rc<WlSeatGlobal>);
|
||||
fn node_do_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, direction: Direction);
|
||||
fn node_close(self: Rc<Self>);
|
||||
fn node_move_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, direction: Direction);
|
||||
fn node_move_self(self: Rc<Self>, direction: Direction);
|
||||
fn node_move_focus_from_child(
|
||||
self: Rc<Self>,
|
||||
seat: &Rc<WlSeatGlobal>,
|
||||
child: &dyn Node,
|
||||
direction: Direction,
|
||||
);
|
||||
fn node_move_child(self: Rc<Self>, child: Rc<dyn Node>, direction: Direction);
|
||||
fn node_absolute_position(&self) -> Rect;
|
||||
fn node_absolute_position_constrains_input(&self) -> bool;
|
||||
fn node_active_changed(&self, active: bool);
|
||||
fn node_key(&self, seat: &WlSeatGlobal, key: u32, state: u32);
|
||||
fn node_mods(&self, seat: &WlSeatGlobal, mods: ModifierState);
|
||||
fn node_button(
|
||||
self: Rc<Self>,
|
||||
seat: &Rc<WlSeatGlobal>,
|
||||
button: u32,
|
||||
state: KeyState,
|
||||
serial: u32,
|
||||
);
|
||||
fn node_axis_event(self: Rc<Self>, seat: &WlSeatGlobal, event: &PendingScroll);
|
||||
fn node_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>);
|
||||
fn node_focus_parent(&self, seat: &Rc<WlSeatGlobal>);
|
||||
fn node_toggle_floating(self: Rc<Self>, seat: &Rc<WlSeatGlobal>);
|
||||
fn node_unfocus(&self, seat: &WlSeatGlobal);
|
||||
fn node_find_tree_at(&self, x: i32, y: i32, tree: &mut Vec<FoundNode>) -> FindTreeResult;
|
||||
fn node_replace_child(self: Rc<Self>, old: &dyn Node, new: Rc<dyn Node>);
|
||||
fn node_remove_child(self: Rc<Self>, child: &dyn Node);
|
||||
fn node_remove_child2(self: Rc<Self>, child: &dyn Node, preserve_focus: bool);
|
||||
fn node_child_size_changed(&self, child: &dyn Node, width: i32, height: i32);
|
||||
fn node_child_active_changed(self: Rc<Self>, child: &dyn Node, active: bool, depth: u32);
|
||||
fn node_leave(&self, seat: &WlSeatGlobal);
|
||||
fn node_pointer_enter(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed);
|
||||
fn node_pointer_unfocus(&self, seat: &Rc<WlSeatGlobal>);
|
||||
fn node_pointer_focus(&self, seat: &Rc<WlSeatGlobal>);
|
||||
fn node_pointer_motion(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed);
|
||||
fn node_render(&self, renderer: &mut Renderer, x: i32, y: i32);
|
||||
fn node_into_float(self: Rc<Self>) -> Option<Rc<FloatNode>>;
|
||||
fn node_into_container(self: Rc<Self>) -> Option<Rc<ContainerNode>>;
|
||||
fn node_into_workspace(self: Rc<Self>) -> Option<Rc<WorkspaceNode>>;
|
||||
fn node_is_container(&self) -> bool;
|
||||
fn node_is_output(&self) -> bool;
|
||||
fn node_into_output(self: Rc<Self>) -> Option<Rc<OutputNode>>;
|
||||
fn node_accepts_child(&self, node: &dyn Node) -> bool;
|
||||
fn node_insert_child(self: Rc<Self>, node: Rc<dyn Node>, direction: Direction);
|
||||
fn node_is_float(&self) -> bool;
|
||||
fn node_is_workspace(&self) -> bool;
|
||||
fn node_change_extents(self: Rc<Self>, rect: &Rect);
|
||||
fn node_set_workspace(self: Rc<Self>, ws: &Rc<WorkspaceNode>);
|
||||
fn node_set_parent(self: Rc<Self>, parent: Rc<dyn Node>);
|
||||
fn node_client(&self) -> Option<Rc<Client>>;
|
||||
fn node_client_id(&self) -> Option<ClientId>;
|
||||
fn node_is_xwayland_surface(&self) -> bool;
|
||||
fn node_into_surface(self: Rc<Self>) -> Option<Rc<WlSurface>>;
|
||||
fn node_dnd_drop(&self, dnd: &Dnd);
|
||||
fn node_dnd_leave(&self, dnd: &Dnd);
|
||||
fn node_dnd_enter(&self, dnd: &Dnd, x: Fixed, y: Fixed, serial: u32);
|
||||
fn node_dnd_motion(&self, dnd: &Dnd, x: Fixed, y: Fixed);
|
||||
fn node_set_fullscreen(self: Rc<Self>, fullscreen: bool);
|
||||
fn node_fullscreen(&self) -> bool;
|
||||
}
|
||||
|
||||
impl<T: SizedNode> Node for T {
|
||||
fn node_id(&self) -> NodeId {
|
||||
<Self as SizedNode>::id(self)
|
||||
}
|
||||
fn node_seat_state(&self) -> &NodeSeatState {
|
||||
<Self as SizedNode>::seat_state(self)
|
||||
}
|
||||
fn node_destroy(&self, detach: bool) {
|
||||
<Self as SizedNode>::destroy_node(self, detach)
|
||||
}
|
||||
fn node_visit(self: Rc<Self>, visitor: &mut dyn NodeVisitor) {
|
||||
<Self as SizedNode>::visit(&self, visitor)
|
||||
}
|
||||
fn node_visit_children(&self, visitor: &mut dyn NodeVisitor) {
|
||||
<Self as SizedNode>::visit_children(self, visitor)
|
||||
}
|
||||
fn node_visible(&self) -> bool {
|
||||
<Self as SizedNode>::visible(self)
|
||||
}
|
||||
fn node_parent(&self) -> Option<Rc<dyn Node>> {
|
||||
<Self as SizedNode>::parent(self)
|
||||
}
|
||||
fn node_last_active_child(self: Rc<Self>) -> Rc<dyn Node> {
|
||||
<Self as SizedNode>::last_active_child(&self)
|
||||
}
|
||||
fn node_set_visible(&self, visible: bool) {
|
||||
<Self as SizedNode>::set_visible(self, visible)
|
||||
}
|
||||
fn node_get_workspace(&self) -> Option<Rc<WorkspaceNode>> {
|
||||
<Self as SizedNode>::get_workspace(self)
|
||||
}
|
||||
fn node_child_title_changed(self: Rc<Self>, child: &dyn Node, title: &str) {
|
||||
<Self as SizedNode>::child_title_changed(&self, child, title)
|
||||
}
|
||||
fn node_get_parent_mono(&self) -> Option<bool> {
|
||||
<Self as SizedNode>::get_parent_mono(self)
|
||||
}
|
||||
fn node_get_parent_split(&self) -> Option<ContainerSplit> {
|
||||
<Self as SizedNode>::get_parent_split(self)
|
||||
}
|
||||
fn node_set_parent_mono(&self, mono: bool) {
|
||||
<Self as SizedNode>::set_parent_mono(self, mono)
|
||||
}
|
||||
fn node_set_parent_split(&self, split: ContainerSplit) {
|
||||
<Self as SizedNode>::set_parent_split(self, split)
|
||||
}
|
||||
fn node_get_mono(&self) -> Option<bool> {
|
||||
<Self as SizedNode>::get_mono(self)
|
||||
}
|
||||
fn node_get_split(&self) -> Option<ContainerSplit> {
|
||||
<Self as SizedNode>::get_split(self)
|
||||
}
|
||||
fn node_set_mono(self: Rc<Self>, child: Option<&dyn Node>) {
|
||||
<Self as SizedNode>::set_mono(&self, child)
|
||||
}
|
||||
fn node_set_split(self: Rc<Self>, split: ContainerSplit) {
|
||||
<Self as SizedNode>::set_split(&self, split)
|
||||
}
|
||||
fn node_create_split(self: Rc<Self>, split: ContainerSplit) {
|
||||
<Self as SizedNode>::create_split(&self, split)
|
||||
}
|
||||
fn node_focus_self(self: Rc<Self>, seat: &Rc<WlSeatGlobal>) {
|
||||
<Self as SizedNode>::focus_self(&self, seat)
|
||||
}
|
||||
fn node_do_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, direction: Direction) {
|
||||
<Self as SizedNode>::do_focus(&self, seat, direction)
|
||||
}
|
||||
fn node_close(self: Rc<Self>) {
|
||||
<Self as SizedNode>::close(&self)
|
||||
}
|
||||
fn node_move_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, direction: Direction) {
|
||||
<Self as SizedNode>::move_focus(&self, seat, direction)
|
||||
}
|
||||
fn node_move_self(self: Rc<Self>, direction: Direction) {
|
||||
<Self as SizedNode>::move_self(&self, direction)
|
||||
}
|
||||
fn node_move_focus_from_child(
|
||||
self: Rc<Self>,
|
||||
seat: &Rc<WlSeatGlobal>,
|
||||
child: &dyn Node,
|
||||
direction: Direction,
|
||||
) {
|
||||
<Self as SizedNode>::move_focus_from_child(&self, seat, child, direction)
|
||||
}
|
||||
fn node_move_child(self: Rc<Self>, child: Rc<dyn Node>, direction: Direction) {
|
||||
<Self as SizedNode>::move_child(&self, child, direction)
|
||||
}
|
||||
fn node_absolute_position(&self) -> Rect {
|
||||
<Self as SizedNode>::absolute_position(self)
|
||||
}
|
||||
fn node_absolute_position_constrains_input(&self) -> bool {
|
||||
<Self as SizedNode>::absolute_position_constrains_input(self)
|
||||
}
|
||||
fn node_active_changed(&self, active: bool) {
|
||||
<Self as SizedNode>::active_changed(self, active)
|
||||
}
|
||||
fn node_key(&self, seat: &WlSeatGlobal, key: u32, state: u32) {
|
||||
<Self as SizedNode>::key(self, seat, key, state)
|
||||
}
|
||||
fn node_mods(&self, seat: &WlSeatGlobal, mods: ModifierState) {
|
||||
<Self as SizedNode>::mods(self, seat, mods)
|
||||
}
|
||||
fn node_button(
|
||||
self: Rc<Self>,
|
||||
seat: &Rc<WlSeatGlobal>,
|
||||
button: u32,
|
||||
state: KeyState,
|
||||
serial: u32,
|
||||
) {
|
||||
<Self as SizedNode>::button(&self, seat, button, state, serial)
|
||||
}
|
||||
fn node_axis_event(self: Rc<Self>, seat: &WlSeatGlobal, event: &PendingScroll) {
|
||||
<Self as SizedNode>::axis_event(&self, seat, event)
|
||||
}
|
||||
fn node_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>) {
|
||||
<Self as SizedNode>::focus(&self, seat)
|
||||
}
|
||||
fn node_focus_parent(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
<Self as SizedNode>::focus_parent(self, seat)
|
||||
}
|
||||
fn node_toggle_floating(self: Rc<Self>, seat: &Rc<WlSeatGlobal>) {
|
||||
<Self as SizedNode>::toggle_floating(&self, seat)
|
||||
}
|
||||
fn node_unfocus(&self, seat: &WlSeatGlobal) {
|
||||
<Self as SizedNode>::unfocus(self, seat)
|
||||
}
|
||||
fn node_find_tree_at(&self, x: i32, y: i32, tree: &mut Vec<FoundNode>) -> FindTreeResult {
|
||||
<Self as SizedNode>::find_tree_at(self, x, y, tree)
|
||||
}
|
||||
fn node_replace_child(self: Rc<Self>, old: &dyn Node, new: Rc<dyn Node>) {
|
||||
<Self as SizedNode>::replace_child(&self, old, new)
|
||||
}
|
||||
fn node_remove_child(self: Rc<Self>, child: &dyn Node) {
|
||||
<Self as SizedNode>::remove_child(&self, child)
|
||||
}
|
||||
fn node_remove_child2(self: Rc<Self>, child: &dyn Node, preserve_focus: bool) {
|
||||
<Self as SizedNode>::remove_child2(&self, child, preserve_focus)
|
||||
}
|
||||
fn node_child_size_changed(&self, child: &dyn Node, width: i32, height: i32) {
|
||||
<Self as SizedNode>::child_size_changed(self, child, width, height)
|
||||
}
|
||||
fn node_child_active_changed(self: Rc<Self>, child: &dyn Node, active: bool, depth: u32) {
|
||||
<Self as SizedNode>::child_active_changed(&self, child, active, depth)
|
||||
}
|
||||
fn node_leave(&self, seat: &WlSeatGlobal) {
|
||||
<Self as SizedNode>::leave(self, seat)
|
||||
}
|
||||
fn node_pointer_enter(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
<Self as SizedNode>::pointer_enter(&self, seat, x, y)
|
||||
}
|
||||
fn node_pointer_unfocus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
<Self as SizedNode>::pointer_unfocus(self, seat)
|
||||
}
|
||||
fn node_pointer_focus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
<Self as SizedNode>::pointer_focus(self, seat)
|
||||
}
|
||||
fn node_pointer_motion(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
<Self as SizedNode>::pointer_motion(&self, seat, x, y)
|
||||
}
|
||||
fn node_render(&self, renderer: &mut Renderer, x: i32, y: i32) {
|
||||
<Self as SizedNode>::render(self, renderer, x, y)
|
||||
}
|
||||
fn node_into_float(self: Rc<Self>) -> Option<Rc<FloatNode>> {
|
||||
<Self as SizedNode>::into_float(&self)
|
||||
None
|
||||
}
|
||||
|
||||
fn node_into_container(self: Rc<Self>) -> Option<Rc<ContainerNode>> {
|
||||
<Self as SizedNode>::into_container(&self)
|
||||
None
|
||||
}
|
||||
|
||||
fn node_into_workspace(self: Rc<Self>) -> Option<Rc<WorkspaceNode>> {
|
||||
<Self as SizedNode>::into_workspace(&self)
|
||||
}
|
||||
fn node_is_container(&self) -> bool {
|
||||
<Self as SizedNode>::is_container(self)
|
||||
}
|
||||
fn node_is_output(&self) -> bool {
|
||||
<Self as SizedNode>::is_output(self)
|
||||
None
|
||||
}
|
||||
|
||||
fn node_into_output(self: Rc<Self>) -> Option<Rc<OutputNode>> {
|
||||
<Self as SizedNode>::into_output(&self)
|
||||
}
|
||||
fn node_accepts_child(&self, node: &dyn Node) -> bool {
|
||||
<Self as SizedNode>::accepts_child(self, node)
|
||||
}
|
||||
fn node_insert_child(self: Rc<Self>, node: Rc<dyn Node>, direction: Direction) {
|
||||
<Self as SizedNode>::insert_child(&self, node, direction)
|
||||
}
|
||||
fn node_is_float(&self) -> bool {
|
||||
<Self as SizedNode>::is_float(self)
|
||||
}
|
||||
fn node_is_workspace(&self) -> bool {
|
||||
<Self as SizedNode>::is_workspace(self)
|
||||
}
|
||||
fn node_change_extents(self: Rc<Self>, rect: &Rect) {
|
||||
<Self as SizedNode>::change_extents(&self, rect)
|
||||
}
|
||||
fn node_set_workspace(self: Rc<Self>, ws: &Rc<WorkspaceNode>) {
|
||||
<Self as SizedNode>::set_workspace(&self, ws)
|
||||
}
|
||||
fn node_set_parent(self: Rc<Self>, parent: Rc<dyn Node>) {
|
||||
<Self as SizedNode>::set_parent(&self, parent)
|
||||
}
|
||||
fn node_client(&self) -> Option<Rc<Client>> {
|
||||
<Self as SizedNode>::client(self)
|
||||
}
|
||||
fn node_client_id(&self) -> Option<ClientId> {
|
||||
<Self as SizedNode>::client_id(self)
|
||||
}
|
||||
fn node_is_xwayland_surface(&self) -> bool {
|
||||
<Self as SizedNode>::is_xwayland_surface(self)
|
||||
None
|
||||
}
|
||||
|
||||
fn node_into_surface(self: Rc<Self>) -> Option<Rc<WlSurface>> {
|
||||
<Self as SizedNode>::into_surface(&self)
|
||||
None
|
||||
}
|
||||
fn node_dnd_drop(&self, dnd: &Dnd) {
|
||||
<Self as SizedNode>::dnd_drop(self, dnd)
|
||||
|
||||
fn node_into_containing_node(self: Rc<Self>) -> Option<Rc<dyn ContainingNode>> {
|
||||
None
|
||||
}
|
||||
fn node_dnd_leave(&self, dnd: &Dnd) {
|
||||
<Self as SizedNode>::dnd_leave(self, dnd)
|
||||
|
||||
// TYPE CHECKERS
|
||||
|
||||
fn node_is_container(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn node_dnd_enter(&self, dnd: &Dnd, x: Fixed, y: Fixed, serial: u32) {
|
||||
<Self as SizedNode>::dnd_enter(self, dnd, x, y, serial)
|
||||
|
||||
fn node_is_output(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn node_dnd_motion(&self, dnd: &Dnd, x: Fixed, y: Fixed) {
|
||||
<Self as SizedNode>::dnd_motion(self, dnd, x, y)
|
||||
|
||||
fn node_is_float(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn node_set_fullscreen(self: Rc<Self>, fullscreen: bool) {
|
||||
<Self as SizedNode>::set_fullscreen(&self, fullscreen)
|
||||
|
||||
fn node_is_workspace(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn node_fullscreen(&self) -> bool {
|
||||
<Self as SizedNode>::fullscreen(self)
|
||||
|
||||
fn node_is_xwayland_surface(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn node_is_placeholder(&self) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue