Trait FloatingSurfaceProvider
pub trait FloatingSurfaceProvider {
Show 15 methods
// Provided methods
fn on_floating_surface_focus_changed(
&mut self,
_id: Option<&str>,
_focused: bool,
) { ... }
fn on_floating_surface_ime_source_changed(&mut self, _id: Option<&str>) { ... }
fn on_floating_surface_event_source(&mut self, _id: Option<&str>) { ... }
fn floating_surface_accessibility(&self, _id: &str) -> Option<AccessNode> { ... }
fn perform_floating_surface_accessibility_action(
&mut self,
_id: &str,
_target: &str,
_action: &Action,
_state: &mut Edits<'_>,
_path: &ExId,
) -> bool { ... }
fn floating_surface_ime(&self, _id: &str) -> Option<(ImePurpose, Rect)> { ... }
fn take_floating_surface_request(
&mut self,
) -> Option<FloatingSurfaceRequest> { ... }
fn take_capture_studio_request(&mut self) -> Option<CaptureMode> { ... }
fn take_floating_surface_source_updates(&mut self) -> Vec<(String, Rect)> { ... }
fn draw_floating_surfaces(
&mut self,
_scene: &mut Scene,
_transform: Affine,
_text_renderer: &mut TextRenderer,
_theme: &Theme,
_presence: &PresenceCtx,
) { ... }
fn draw_floating_surface(
&mut self,
id: &str,
scene: &mut Scene,
transform: Affine,
text_renderer: &mut TextRenderer,
theme: &Theme,
presence: &PresenceCtx,
) -> bool { ... }
fn floating_surface_presentations(&self) -> Vec<FloatingSurfacePresentation> { ... }
fn active_floating_surface_ids(&self) -> Vec<String> { ... }
fn set_floating_surface_bounds(&mut self, _bounds: Rect) { ... }
fn on_floating_surface_host_message(
&mut self,
_message: &FloatingSurfaceHostMessage,
) { ... }
}Expand description
Optional capture and detachable-surface capability.
Provided Methods§
fn on_floating_surface_focus_changed(
&mut self,
_id: Option<&str>,
_focused: bool,
)
fn on_floating_surface_focus_changed( &mut self, _id: Option<&str>, _focused: bool, )
Route native keyboard focus to the exact presentation instance.
fn on_floating_surface_ime_source_changed(&mut self, _id: Option<&str>)
fn on_floating_surface_ime_source_changed(&mut self, _id: Option<&str>)
Keep the exact secondary presentation’s editor logically focused while the platform deliberately retains text-input focus on its source.
This is a host-authenticated input route, not a claim made by the app. The host clears it when the continuation ends or no longer validates.
fn on_floating_surface_event_source(&mut self, _id: Option<&str>)
fn on_floating_surface_event_source(&mut self, _id: Option<&str>)
Identify the native surface delivering the current input event. The host resets this immediately after dispatch; it grants no authority.
fn floating_surface_accessibility(&self, _id: &str) -> Option<AccessNode>
fn floating_surface_accessibility(&self, _id: &str) -> Option<AccessNode>
The retained semantic subtree presented in one secondary window.
fn perform_floating_surface_accessibility_action( &mut self, _id: &str, _target: &str, _action: &Action, _state: &mut Edits<'_>, _path: &ExId, ) -> bool
fn floating_surface_ime(&self, _id: &str) -> Option<(ImePurpose, Rect)>
fn floating_surface_ime(&self, _id: &str) -> Option<(ImePurpose, Rect)>
IME purpose and desktop-logical caret rect for one secondary window.
fn take_floating_surface_request(&mut self) -> Option<FloatingSurfaceRequest>
fn take_floating_surface_request(&mut self) -> Option<FloatingSurfaceRequest>
One-shot request to hand app content to the shared floating-surface
host. Shell and in-app hosts consume the same description, so PiP does
not require a second rendering/widget API.
fn take_capture_studio_request(&mut self) -> Option<CaptureMode>
fn take_capture_studio_request(&mut self) -> Option<CaptureMode>
One-shot request for the session shell’s shared capture/PiP chooser.
fn take_floating_surface_source_updates(&mut self) -> Vec<(String, Rect)>
fn take_floating_surface_source_updates(&mut self) -> Vec<(String, Rect)>
Rising-edge source-geometry updates for an adopted floating surface.
fn draw_floating_surfaces(
&mut self,
_scene: &mut Scene,
_transform: Affine,
_text_renderer: &mut TextRenderer,
_theme: &Theme,
_presence: &PresenceCtx,
)
fn draw_floating_surfaces( &mut self, _scene: &mut Scene, _transform: Affine, _text_renderer: &mut TextRenderer, _theme: &Theme, _presence: &PresenceCtx, )
Paint app-owned content whose presentation has moved into shell space.
fn draw_floating_surface(
&mut self,
id: &str,
scene: &mut Scene,
transform: Affine,
text_renderer: &mut TextRenderer,
theme: &Theme,
presence: &PresenceCtx,
) -> bool
fn draw_floating_surface( &mut self, id: &str, scene: &mut Scene, transform: Affine, text_renderer: &mut TextRenderer, theme: &Theme, presence: &PresenceCtx, ) -> bool
Paint exactly one app-owned presentation into its native window.
Native secondary windows are independent buffers. Painting the plural overlay pass into each one can duplicate sibling surfaces and lets content escape the window’s own clip.
fn floating_surface_presentations(&self) -> Vec<FloatingSurfacePresentation>
fn floating_surface_presentations(&self) -> Vec<FloatingSurfacePresentation>
Desktop-space presentations that need a native secondary window.
fn active_floating_surface_ids(&self) -> Vec<String>
fn active_floating_surface_ids(&self) -> Vec<String>
Stable IDs whose underlying activity still exists.
fn set_floating_surface_bounds(&mut self, _bounds: Rect)
fn set_floating_surface_bounds(&mut self, _bounds: Rect)
Push the shell’s authoritative combined-output bounds into the owner.
fn on_floating_surface_host_message(
&mut self,
_message: &FloatingSurfaceHostMessage,
)
fn on_floating_surface_host_message( &mut self, _message: &FloatingSurfaceHostMessage, )
Deliver an acknowledged shell lifecycle edge back to the owner.