mirror of
https://github.com/servo/servo.git
synced 2025-07-28 01:30:32 +01:00
Introduce a MouseButton enum.
This commit is contained in:
parent
85808c1cdd
commit
6b127a8df8
16 changed files with 57 additions and 20 deletions
|
@ -2,8 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(int_uint)]
|
||||
|
||||
extern crate devtools_traits;
|
||||
extern crate geom;
|
||||
extern crate libc;
|
||||
|
@ -81,13 +79,21 @@ pub enum ConstellationControlMsg {
|
|||
unsafe impl Send for ConstellationControlMsg {
|
||||
}
|
||||
|
||||
/// The mouse button involved in the event.
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum MouseButton {
|
||||
Left,
|
||||
Middle,
|
||||
Right,
|
||||
}
|
||||
|
||||
/// Events from the compositor that the script task needs to know about
|
||||
pub enum CompositorEvent {
|
||||
ResizeEvent(WindowSizeData),
|
||||
ReflowEvent(SmallVec1<UntrustedNodeAddress>),
|
||||
ClickEvent(uint, Point2D<f32>),
|
||||
MouseDownEvent(uint, Point2D<f32>),
|
||||
MouseUpEvent(uint, Point2D<f32>),
|
||||
ClickEvent(MouseButton, Point2D<f32>),
|
||||
MouseDownEvent(MouseButton, Point2D<f32>),
|
||||
MouseUpEvent(MouseButton, Point2D<f32>),
|
||||
MouseMoveEvent(Point2D<f32>),
|
||||
KeyEvent(Key, KeyState, KeyModifiers),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue