ferroui_base/rendering/
i_presentation_source.rs1use super::{IHitTester, IRenderer};
2use crate::input::IInputRoot;
3use crate::layout::ILayoutRoot;
4use crate::platform::IPlatformSettings;
5use crate::{PixelPoint, Point, Ref, Size, Visual};
6use std::rc::Rc;
7
8pub trait IPresentationSource {
11 fn root_visual(&self) -> Option<Ref<Visual>>;
13
14 fn render_scaling(&self) -> f64;
16
17 fn renderer(&self) -> Rc<dyn IRenderer>;
19
20 fn layout_root(&self) -> Rc<dyn ILayoutRoot>;
22
23 fn client_size(&self) -> Size;
25
26 fn platform_settings(&self) -> Option<Rc<dyn IPlatformSettings>> {
28 None
29 }
30
31 fn hit_tester(&self) -> Rc<dyn IHitTester>;
33
34 fn input_root(&self) -> Rc<dyn IInputRoot>;
36
37 fn point_to_screen(&self, _point: Point) -> Option<PixelPoint> {
40 None
41 }
42
43 fn point_to_client(&self, _point: PixelPoint) -> Option<Point> {
46 None
47 }
48}