Struct cognitive_exhibitor::Exhibitor
[−]
[src]
pub struct Exhibitor<C> where
C: ExhibitorCoordinationTrait, { /* fields omitted */ }
Exhibitor
manages tasks related to drawing and compositing surfaces.
Methods
impl<C> Exhibitor<C> where
C: ExhibitorCoordinationTrait + Clone,
[src]
C: ExhibitorCoordinationTrait + Clone,
General methods.
fn new(
coordinator: C,
strategist: Strategist,
compositor_config: CompositorConfig
) -> Self
coordinator: C,
strategist: Strategist,
compositor_config: CompositorConfig
) -> Self
Exhibitor
constructor.
impl<C> Exhibitor<C> where
C: ExhibitorCoordinationTrait + Clone,
[src]
C: ExhibitorCoordinationTrait + Clone,
Notification handlers.
fn on_notify(&mut self)
Handles notification about needed redraw.
fn on_suspend(&self)
Handles notification about deactivation of seat.
fn on_wakeup(&mut self)
Handles notification about activation of seat.
Wakes up each display.
fn on_output_found(&mut self, output: Box<Output>)
This method is called when new output was found.
fn on_pageflip(&mut self, id: i32)
This method is called when pageflip occurred.
id
is ID of output that scheduled the pageflip.
fn on_command(&mut self, command: Command)
This method is called when a command was requested to be executed by compositor.
fn on_cursor_surface_change(&mut self, sid: SurfaceId)
This method is called when changing cursor surface was requested.
fn on_background_surface_change(&mut self, sid: SurfaceId)
This method is called when changing background surface was requested.
TODO: Make change background request be display specific.
fn on_surface_ready(&mut self, sid: SurfaceId)
This method is called when new surface is ready to be managed.
fn on_dock_surface(&mut self, sid: SurfaceId, size: Size, display_id: i32)
Dock given surface with given size on given display.
TODO: Currently dock will shown on top. Make it possible to dock it on arbitrary edge.
fn on_surface_destroyed(&mut self, sid: SurfaceId)
This method is called when surface was destroyed.
fn on_keyboard_focus_changed(&mut self, sid: SurfaceId)
This method is called when keyboard focus changed.
fn take_screenshot(&mut self, id: i32)
This method is called when screenshot was requested.
impl<C> Exhibitor<C> where
C: ExhibitorCoordinationTrait,
[src]
C: ExhibitorCoordinationTrait,
Input handlers.
fn on_motion(&mut self, vector: Vector)
Handle pointer motion event.
fn on_position(&mut self, position: OptionalPosition)
Handle pointer position event.
Handle pointer button event.
fn on_position_reset(&self)
Handle pointer position reset event.
fn on_mode_switched(&mut self, active: bool, mode: InteractionMode)
Handles interaction mode switch.
Exhibitor is concerned only about visual mode. When switched on it starts dragging surface under cursor along the cursor.
impl<C> Exhibitor<C> where
C: ExhibitorCoordinationTrait,
[src]
C: ExhibitorCoordinationTrait,
Getters
fn get_root(&self) -> Frame
Returns root frame.
fn get_selection(&self) -> Frame
Returns selected frame.
impl<C> Exhibitor<C> where
C: ExhibitorCoordinationTrait,
[src]
C: ExhibitorCoordinationTrait,
Other helper methods
fn choose_new_display_position(&self) -> Position
Chooses new display position.
New position is always chosen to be right to most right display.
TODO: Choosing new display position should be configurable, scriptable and cacheable. TODO: Handle reposition of displays when display is lost.