aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/compositor_interface.rs
diff options
context:
space:
mode:
authorTim Kuehn <tkuehn@cmu.edu>2013-06-07 16:43:03 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-06-12 11:02:52 -0700
commit7b284621930299a625b53a744f3ee9fd2493e17e (patch)
tree5077df0a78ec09f97301318ea71cb4c618ed57b6 /src/components/script/compositor_interface.rs
parent1fbfd7d45e8950eef6713cf063ded756bf17f1bd (diff)
downloadservo-7b284621930299a625b53a744f3ee9fd2493e17e.tar.gz
servo-7b284621930299a625b53a744f3ee9fd2493e17e.zip
Send status messages to the compositor
Diffstat (limited to 'src/components/script/compositor_interface.rs')
-rw-r--r--src/components/script/compositor_interface.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/components/script/compositor_interface.rs b/src/components/script/compositor_interface.rs
new file mode 100644
index 00000000000..78e74f5fee1
--- /dev/null
+++ b/src/components/script/compositor_interface.rs
@@ -0,0 +1,19 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! The high-level interface from script to compositor. Using this abstract interface helps reduce
+/// coupling between these two components
+
+pub enum ReadyState {
+ /// Informs the compositor that a page is loading. Used for setting status
+ Loading,
+ /// Informs the compositor that a page is rendering. Used for setting status
+ Rendering,
+ /// Informs the compositor that a page is finished loading. Used for setting status
+ FinishedLoading,
+}
+
+pub trait CompositorInterface: Clone {
+ fn send_compositor_msg(&self, ReadyState);
+}