aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/msg
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/msg')
-rw-r--r--src/components/msg/compositor_msg.rs29
-rw-r--r--src/components/msg/constellation_msg.rs10
-rw-r--r--src/components/msg/msg.rs8
3 files changed, 24 insertions, 23 deletions
diff --git a/src/components/msg/compositor_msg.rs b/src/components/msg/compositor_msg.rs
index af0c7a9ddc7..f6058c16e6a 100644
--- a/src/components/msg/compositor_msg.rs
+++ b/src/components/msg/compositor_msg.rs
@@ -17,25 +17,25 @@ use constellation_msg::PipelineId;
pub struct LayerBuffer {
/// The native surface which can be shared between threads or processes. On Mac this is an
/// `IOSurface`; on Linux this is an X Pixmap; on Android this is an `EGLImageKHR`.
- native_surface: NativeSurface,
+ pub native_surface: NativeSurface,
/// The rect in the containing RenderLayer that this represents.
- rect: Rect<f32>,
+ pub rect: Rect<f32>,
/// The rect in pixels that will be drawn to the screen.
- screen_pos: Rect<uint>,
+ pub screen_pos: Rect<uint>,
/// The scale at which this tile is rendered
- resolution: f32,
+ pub resolution: f32,
/// NB: stride is in pixels, like OpenGL GL_UNPACK_ROW_LENGTH.
- stride: uint,
+ pub stride: uint,
}
/// A set of layer buffers. This is an atomic unit used to switch between the front and back
/// buffers.
pub struct LayerBufferSet {
- buffers: ~[~LayerBuffer]
+ pub buffers: ~[~LayerBuffer]
}
impl LayerBufferSet {
@@ -68,7 +68,7 @@ pub enum ReadyState {
/// A newtype struct for denoting the age of messages; prevents race conditions.
#[deriving(Eq)]
-pub struct Epoch(uint);
+pub struct Epoch(pub uint);
impl Epoch {
pub fn next(&mut self) {
@@ -78,7 +78,7 @@ impl Epoch {
}
#[deriving(Clone, Eq)]
-pub struct LayerId(uint, uint);
+pub struct LayerId(pub uint, pub uint);
impl Show for LayerId {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
@@ -108,13 +108,13 @@ pub enum ScrollPolicy {
/// buffer contents of the layer itself.
pub struct LayerMetadata {
/// An opaque ID. This is usually the address of the flow and index of the box within it.
- id: LayerId,
+ pub id: LayerId,
/// The position and size of the layer in pixels.
- position: Rect<uint>,
+ pub position: Rect<uint>,
/// The background color of the layer.
- background_color: Color,
+ pub background_color: Color,
/// The scrolling policy of this layer.
- scroll_policy: ScrollPolicy,
+ pub scroll_policy: ScrollPolicy,
}
/// The interface used by the renderer to acquire draw targets for each render frame and
@@ -158,8 +158,9 @@ pub trait ScriptListener : Clone {
fn dup(&self) -> ~ScriptListener;
}
-impl<S: Encoder> Encodable<S> for ~ScriptListener {
- fn encode(&self, _s: &mut S) {
+impl<E, S: Encoder<E>> Encodable<S, E> for ~ScriptListener {
+ fn encode(&self, _s: &mut S) -> Result<(), E> {
+ Ok(())
}
}
diff --git a/src/components/msg/constellation_msg.rs b/src/components/msg/constellation_msg.rs
index b577f25ef7b..7a312fab10b 100644
--- a/src/components/msg/constellation_msg.rs
+++ b/src/components/msg/constellation_msg.rs
@@ -11,7 +11,7 @@ use std::comm::{channel, Sender, Receiver};
use url::Url;
#[deriving(Clone)]
-pub struct ConstellationChan(Sender<Msg>);
+pub struct ConstellationChan(pub Sender<Msg>);
impl ConstellationChan {
pub fn new() -> (Receiver<Msg>, ConstellationChan) {
@@ -29,8 +29,8 @@ pub enum IFrameSandboxState {
// We pass this info to various tasks, so it lives in a separate, cloneable struct.
#[deriving(Clone)]
pub struct Failure {
- pipeline_id: PipelineId,
- subpage_id: Option<SubpageId>,
+ pub pipeline_id: PipelineId,
+ pub subpage_id: Option<SubpageId>,
}
/// Messages from the compositor and script to the constellation.
@@ -61,7 +61,7 @@ pub enum NavigationDirection {
}
#[deriving(Clone, Eq, TotalEq, Hash, Encodable)]
-pub struct PipelineId(uint);
+pub struct PipelineId(pub uint);
#[deriving(Clone, Eq, TotalEq, Hash, Encodable)]
-pub struct SubpageId(uint);
+pub struct SubpageId(pub uint);
diff --git a/src/components/msg/msg.rs b/src/components/msg/msg.rs
index c3e332746f3..3b4c49c3acf 100644
--- a/src/components/msg/msg.rs
+++ b/src/components/msg/msg.rs
@@ -2,10 +2,10 @@
* 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/. */
-#[crate_id = "github.com/mozilla/servo#msg:0.1"];
-#[crate_type = "lib"];
-#[crate_type = "dylib"];
-#[crate_type = "rlib"];
+#![crate_id = "github.com/mozilla/servo#msg:0.1"]
+#![crate_type = "lib"]
+#![crate_type = "dylib"]
+#![crate_type = "rlib"]
extern crate azure;
extern crate geom;