mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
servoshell: Port desktop servoshell to use delegate API (#35284)
Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
6b12499077
commit
5f08e4fa76
15 changed files with 1109 additions and 1258 deletions
|
@ -7,14 +7,13 @@
|
|||
|
||||
use std::rc::Rc;
|
||||
|
||||
use arboard::Clipboard;
|
||||
use euclid::{Length, Scale};
|
||||
use servo::compositing::windowing::WindowMethods;
|
||||
use servo::servo_geometry::DeviceIndependentPixel;
|
||||
use servo::webrender_api::units::{DeviceIntPoint, DeviceIntSize, DevicePixel};
|
||||
use servo::{Cursor, Servo};
|
||||
use servo::{Cursor, WebView};
|
||||
|
||||
use super::webview::{WebView, WebViewManager};
|
||||
use super::app_state::RunningAppState;
|
||||
|
||||
// This should vary by zoom level and maybe actual text size (focused or under cursor)
|
||||
pub const LINE_HEIGHT: f32 = 38.0;
|
||||
|
@ -31,13 +30,7 @@ pub trait WindowPortsMethods: WindowMethods {
|
|||
) -> Option<Scale<f32, DeviceIndependentPixel, DevicePixel>>;
|
||||
fn page_height(&self) -> f32;
|
||||
fn get_fullscreen(&self) -> bool;
|
||||
fn handle_winit_event(
|
||||
&self,
|
||||
servo: &Servo,
|
||||
clipboard: &mut Option<Clipboard>,
|
||||
webviews: &mut WebViewManager,
|
||||
event: winit::event::WindowEvent,
|
||||
);
|
||||
fn handle_winit_event(&self, state: Rc<RunningAppState>, event: winit::event::WindowEvent);
|
||||
fn is_animating(&self) -> bool;
|
||||
fn set_title(&self, _title: &str) {}
|
||||
/// Request a new inner size for the window, not including external decorations.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue