mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Moving MouseButton from msg to script_traits
This commit is contained in:
parent
b26c7bd7ea
commit
374bd5be27
13 changed files with 31 additions and 25 deletions
|
@ -40,7 +40,7 @@ use gfx_traits::LayerId;
|
|||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use libc::c_void;
|
||||
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId, WindowSizeData};
|
||||
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData, MouseButton};
|
||||
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData};
|
||||
use msg::constellation_msg::{PipelineNamespaceId, SubpageId};
|
||||
use msg::webdriver_msg::WebDriverScriptCommand;
|
||||
use net_traits::ResourceThread;
|
||||
|
@ -189,6 +189,17 @@ pub enum TouchEventType {
|
|||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize, Serialize)]
|
||||
pub struct TouchId(pub i32);
|
||||
|
||||
/// 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,
|
||||
}
|
||||
|
||||
/// The types of mouse events
|
||||
#[derive(Deserialize, HeapSizeOf, Serialize)]
|
||||
pub enum MouseEventType {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue