mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
doc: Add doc for compositor/webview/embedder related to window/rect/inner_size/rendering_context (#38110)
Add docs before actually fixing #38089, #38090, #37978, #38093. Testing: Just adding docs. --------- Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
parent
345733a5c5
commit
fe2c13c777
6 changed files with 10 additions and 5 deletions
|
@ -55,6 +55,8 @@ use crate::prefs::ServoShellPreferences;
|
|||
|
||||
pub struct Window {
|
||||
screen_size: Size2D<u32, DeviceIndependentPixel>,
|
||||
/// The inner size of the window in physical pixels which excludes OS decorations.
|
||||
/// It equals viewport size + (0, toolbar height).
|
||||
inner_size: Cell<PhysicalSize<u32>>,
|
||||
toolbar_height: Cell<Length<f32, DeviceIndependentPixel>>,
|
||||
monitor: winit::monitor::MonitorHandle,
|
||||
|
|
|
@ -40,6 +40,7 @@ pub trait WindowPortsMethods {
|
|||
fn winit_window(&self) -> Option<&winit::window::Window>;
|
||||
fn toolbar_height(&self) -> Length<f32, DeviceIndependentPixel>;
|
||||
fn set_toolbar_height(&self, height: Length<f32, DeviceIndependentPixel>);
|
||||
/// This returns [`RenderingContext`] matching the viewport.
|
||||
fn rendering_context(&self) -> Rc<dyn RenderingContext>;
|
||||
fn show_ime(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue