mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Implement viewport functions for window #1718
This commit is contained in:
parent
9f85370885
commit
f0987380dd
14 changed files with 466 additions and 63 deletions
|
@ -9,6 +9,7 @@ use compositor_task::{CompositorProxy, CompositorReceiver};
|
|||
use euclid::point::TypedPoint2D;
|
||||
use euclid::scale_factor::ScaleFactor;
|
||||
use euclid::size::TypedSize2D;
|
||||
use euclid::{Size2D, Point2D};
|
||||
use layers::geometry::DevicePixel;
|
||||
use layers::platform::surface::NativeDisplay;
|
||||
use msg::constellation_msg::{Key, KeyState, KeyModifiers};
|
||||
|
@ -103,6 +104,13 @@ pub trait WindowMethods {
|
|||
/// Presents the window to the screen (perhaps by page flipping).
|
||||
fn present(&self);
|
||||
|
||||
/// Return the size of the window with head and borders and position of the window values
|
||||
fn client_window(&self) -> (Size2D<u32>, Point2D<i32>);
|
||||
/// Set the size inside of borders and head
|
||||
fn set_inner_size(&self, size: Size2D<u32>);
|
||||
/// Set the window position
|
||||
fn set_position(&self, point: Point2D<i32>);
|
||||
|
||||
/// Sets the page title for the current page.
|
||||
fn set_page_title(&self, title: Option<String>);
|
||||
/// Sets the load data for the current page.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue