mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Rename MouseWindowEvent variants.
This commit is contained in:
parent
65ee8166bd
commit
be683a0888
7 changed files with 25 additions and 28 deletions
|
@ -797,9 +797,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
|
||||
fn on_mouse_window_event_class(&self, mouse_window_event: MouseWindowEvent) {
|
||||
let point = match mouse_window_event {
|
||||
MouseWindowEvent::MouseWindowClickEvent(_, p) => p,
|
||||
MouseWindowEvent::MouseWindowMouseDownEvent(_, p) => p,
|
||||
MouseWindowEvent::MouseWindowMouseUpEvent(_, p) => p,
|
||||
MouseWindowEvent::Click(_, p) => p,
|
||||
MouseWindowEvent::MouseDown(_, p) => p,
|
||||
MouseWindowEvent::MouseUp(_, p) => p,
|
||||
};
|
||||
match self.find_topmost_layer_at_point(point / self.scene.scale) {
|
||||
Some(result) => result.layer.send_mouse_event(mouse_window_event, result.point),
|
||||
|
|
|
@ -318,11 +318,11 @@ impl CompositorLayer for Layer<CompositorData> {
|
|||
cursor: TypedPoint2D<LayerPixel, f32>) {
|
||||
let event_point = cursor.to_untyped();
|
||||
let message = match event {
|
||||
MouseWindowEvent::MouseWindowClickEvent(button, _) =>
|
||||
MouseWindowEvent::Click(button, _) =>
|
||||
ClickEvent(button, event_point),
|
||||
MouseWindowEvent::MouseWindowMouseDownEvent(button, _) =>
|
||||
MouseWindowEvent::MouseDown(button, _) =>
|
||||
MouseDownEvent(button, event_point),
|
||||
MouseWindowEvent::MouseWindowMouseUpEvent(button, _) =>
|
||||
MouseWindowEvent::MouseUp(button, _) =>
|
||||
MouseUpEvent(button, event_point),
|
||||
};
|
||||
let pipeline = &self.extra_data.borrow().pipeline;
|
||||
|
|
|
@ -19,9 +19,9 @@ use std::fmt::{FormatError, Formatter, Show};
|
|||
use std::rc::Rc;
|
||||
|
||||
pub enum MouseWindowEvent {
|
||||
MouseWindowClickEvent(uint, TypedPoint2D<DevicePixel, f32>),
|
||||
MouseWindowMouseDownEvent(uint, TypedPoint2D<DevicePixel, f32>),
|
||||
MouseWindowMouseUpEvent(uint, TypedPoint2D<DevicePixel, f32>),
|
||||
Click(uint, TypedPoint2D<DevicePixel, f32>),
|
||||
MouseDown(uint, TypedPoint2D<DevicePixel, f32>),
|
||||
MouseUp(uint, TypedPoint2D<DevicePixel, f32>),
|
||||
}
|
||||
|
||||
pub enum WindowNavigateMsg {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue