aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-10-02 03:11:50 -0400
committerJosh Matthews <josh@joshmatthews.net>2014-11-13 11:24:14 -0500
commit1c64dabb150da4152957b2c6e16f30d5201328e1 (patch)
tree49d29180fe6e536ec817432acc11fb210de00199 /components/script_traits/lib.rs
parentc5e1b0d32e17fad29799023c85e2e73ac89c3af7 (diff)
downloadservo-1c64dabb150da4152957b2c6e16f30d5201328e1.tar.gz
servo-1c64dabb150da4152957b2c6e16f30d5201328e1.zip
Pass all key events to the current constellation frame.
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index beedd0895d3..e0e300307fe 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -25,7 +25,7 @@ extern crate serialize;
use devtools_traits::DevtoolsControlChan;
use libc::c_void;
use servo_msg::constellation_msg::{ConstellationChan, PipelineId, Failure, WindowSizeData};
-use servo_msg::constellation_msg::{LoadData, SubpageId};
+use servo_msg::constellation_msg::{LoadData, SubpageId, Key, KeyState};
use servo_msg::compositor_msg::ScriptListener;
use servo_net::image_cache_task::ImageCacheTask;
use servo_net::resource_task::ResourceTask;
@@ -74,7 +74,8 @@ pub enum CompositorEvent {
ClickEvent(uint, Point2D<f32>),
MouseDownEvent(uint, Point2D<f32>),
MouseUpEvent(uint, Point2D<f32>),
- MouseMoveEvent(Point2D<f32>)
+ MouseMoveEvent(Point2D<f32>),
+ KeyEvent(Key, KeyState),
}
/// An opaque wrapper around script<->layout channels to avoid leaking message types into