aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 93db6cd52d2..a4d07966028 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -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 {