mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Minor refactoring of mouse event types
* Move some types into the `msg` crate so they can be shared more. * Use MouseEventType instead of duplicating it in other enums.
This commit is contained in:
parent
2be60be062
commit
8c4fed42b0
13 changed files with 43 additions and 64 deletions
|
@ -307,6 +307,24 @@ pub enum ScriptMsg {
|
|||
ViewportConstrained(PipelineId, ViewportConstraints),
|
||||
}
|
||||
|
||||
#[derive(Deserialize, HeapSizeOf, Serialize)]
|
||||
pub enum MouseEventType {
|
||||
Click,
|
||||
MouseDown,
|
||||
MouseUp,
|
||||
}
|
||||
|
||||
/// The mouse button involved in the event.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
pub enum MouseButton {
|
||||
/// The left mouse button.
|
||||
Left,
|
||||
/// The middle mouse button.
|
||||
Middle,
|
||||
/// The right mouse button.
|
||||
Right,
|
||||
}
|
||||
|
||||
/// Messages from the paint task to the constellation.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum PaintMsg {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue