Struct cognitive_wayland_frontend::engine::Engine
[−]
[src]
pub struct Engine { /* fields omitted */ }
This is main structure of wayland_frontend
crate.
For information about its role and place among other structures see crate-level documentation.
Methods
impl Engine
[src]
fn new(
coordinator: Box<FrontendsCoordinationTrait>,
settings: Settings,
keyboard_config: KeyboardConfig
) -> Self
coordinator: Box<FrontendsCoordinationTrait>,
settings: Settings,
keyboard_config: KeyboardConfig
) -> Self
Constructs new Engine
.
Sets display socket up. First tries default skylane
socket, if that fails tries
$XDG_RUNTIME_DIR/wayland-X
where X
is number from 0 to 9.
Panics if failed to set display socket up or to initialize keyboard state.
fn start(&mut self, sender: DirectSender<Perceptron>)
Starts Engine
: adds display socket to LocalDispatcher
.
fn receive(&mut self)
Reads client requests without blocking.
impl Engine
[src]
Public handlers for client related events.
fn handle_new_client(
&mut self,
sender: DirectSender<Perceptron>,
coordinator: Box<FrontendsCoordinationTrait>
)
&mut self,
sender: DirectSender<Perceptron>,
coordinator: Box<FrontendsCoordinationTrait>
)
Handles new client:
- accepts socket and adds it to Dispatcher
- creates proxy for new client and registers global Wayland objects.
- creates global display Wayland objects and bind it to client
fn terminate_client(&mut self, id: EventHandlerId)
Handles termination (socket hung up) of client.
fn process_events(&mut self, id: EventHandlerId)
Handles request from client associated with given id
.
Trait Implementations
impl Gateway for Engine
[src]
fn on_output_found(&mut self, bundle: DrmBundle)
Notifies output was found.
fn on_display_created(&mut self, output_info: OutputInfo)
Notifies display was created.
fn on_keyboard_input(&mut self, key: Key, _mods: Option<KeyMods>)
Notifies keyboard key was pressed.
fn on_surface_frame(&mut self, sid: SurfaceId, milliseconds: Milliseconds)
Notifies about redrawing surface.
fn on_pointer_focus_changed(
&self,
old_sid: SurfaceId,
new_sid: SurfaceId,
position: Position
)
&self,
old_sid: SurfaceId,
new_sid: SurfaceId,
position: Position
)
Notifies that pointer was moved from above one surface above another.
fn on_pointer_relative_motion(
&self,
sid: SurfaceId,
position: Position,
milliseconds: Milliseconds
)
&self,
sid: SurfaceId,
position: Position,
milliseconds: Milliseconds
)
Notifies that pointer moved.
Notifies mouse or touchpad button was pressed.
fn on_pointer_axis(&self, axis: Axis)
Notifies about pointer move.
fn on_keyboard_focus_changed(&mut self, old_sid: SurfaceId, new_sid: SurfaceId)
Notifies about keyboard focus change.
fn on_transfer_offered(&mut self)
Handles change of offered transfer data.
fn on_transfer_requested(&mut self, mime_type: String, fd: RawFd)
Handles data transfer request to requesting client.
fn on_surface_reconfigured(
&self,
sid: SurfaceId,
size: Size,
state_flags: SurfaceState
)
&self,
sid: SurfaceId,
size: Size,
state_flags: SurfaceState
)
Notifies about change of size or state of surface.
fn on_screenshot_done(&mut self)
Notifies that screenshot data are ready.