mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Moving MouseEventType from msg to script_traits
This commit is contained in:
parent
a5a7a8318c
commit
a2bf5b6b51
6 changed files with 22 additions and 17 deletions
|
@ -40,9 +40,8 @@ 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, SubpageId};
|
||||
use msg::constellation_msg::{MouseButton, MouseEventType};
|
||||
use msg::constellation_msg::{MozBrowserEvent, PipelineNamespaceId};
|
||||
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData, MouseButton};
|
||||
use msg::constellation_msg::{MozBrowserEvent, PipelineNamespaceId, SubpageId};
|
||||
use msg::webdriver_msg::WebDriverScriptCommand;
|
||||
use net_traits::ResourceThread;
|
||||
use net_traits::image_cache_thread::ImageCacheThread;
|
||||
|
@ -167,6 +166,17 @@ pub enum TouchEventType {
|
|||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize, Serialize)]
|
||||
pub struct TouchId(pub i32);
|
||||
|
||||
/// The types of mouse events
|
||||
#[derive(Deserialize, HeapSizeOf, Serialize)]
|
||||
pub enum MouseEventType {
|
||||
/// Mouse button clicked
|
||||
Click,
|
||||
/// Mouse button down
|
||||
MouseDown,
|
||||
/// Mouse button up
|
||||
MouseUp,
|
||||
}
|
||||
|
||||
/// Events from the compositor that the script thread needs to know about
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum CompositorEvent {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue