mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
commit
c10bbbda97
19 changed files with 71 additions and 45 deletions
22
Makefile.in
22
Makefile.in
|
@ -186,28 +186,35 @@ DONE_net = $(B)src/components/net/libnet.dummy
|
|||
|
||||
DEPS_net = $(CRATE_net) $(SRC_net) $(DONE_SUBMODULES) $(DONE_util)
|
||||
|
||||
RFLAGS_gfx = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/net
|
||||
RFLAGS_msg = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES))
|
||||
SRC_msg = $(call rwildcard,$(S)src/components/msg/,*.rs)
|
||||
CRATE_msg = $(S)src/components/msg/msg.rc
|
||||
DONE_msg = $(B)src/components/msg/libmsg.dummy
|
||||
|
||||
DEPS_msg = $(CRATE_msg) $(SRC_msg) $(DONE_SUBMODULES)
|
||||
|
||||
RFLAGS_gfx = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/msg
|
||||
SRC_gfx = $(call rwildcard,$(S)src/components/gfx/,*.rs)
|
||||
CRATE_gfx = $(S)src/components/gfx/gfx.rc
|
||||
DONE_gfx = $(B)src/components/gfx/libgfx.dummy
|
||||
|
||||
DEPS_gfx = $(CRATE_gfx) $(SRC_gfx) $(DONE_SUBMODULES) $(DONE_util) $(DONE_net)
|
||||
DEPS_gfx = $(CRATE_gfx) $(SRC_gfx) $(DONE_SUBMODULES) $(DONE_util) $(DONE_net) $(DONE_msg)
|
||||
|
||||
RFLAGS_script = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/gfx
|
||||
RFLAGS_script = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/gfx -L $(B)src/components/msg
|
||||
WEBIDL_script = $(call rwildcard,$(S)src/components/script/,*.webidl)
|
||||
AUTOGEN_SRC_script = $(patsubst %.webidl, %Binding.rs, $(WEBIDL_script))
|
||||
SRC_script = $(call rwildcard,$(S)src/components/script/,*.rs) $(AUTOGEN_SRC_script)
|
||||
CRATE_script = $(S)src/components/script/script.rc
|
||||
DONE_script = $(B)src/components/script/libscript.dummy
|
||||
|
||||
DEPS_script = $(CRATE_script) $(SRC_script) $(DONE_SUBMODULES) $(DONE_util) $(DONE_net) $(DONE_gfx)
|
||||
DEPS_script = $(CRATE_script) $(SRC_script) $(DONE_SUBMODULES) $(DONE_util) $(DONE_net) $(DONE_gfx) $(DONE_msg)
|
||||
|
||||
RFLAGS_servo = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script
|
||||
RFLAGS_servo = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/msg
|
||||
|
||||
SRC_servo = $(call rwildcard,$(S)src/components/main/,*.rs)
|
||||
CRATE_servo = $(S)src/components/main/servo.rc
|
||||
|
||||
DEPS_servo = $(CRATE_servo) $(SRC_servo) $(DONE_SUBMODULES) $(DONE_util) $(DONE_gfx) $(DONE_script) $(DONE_net)
|
||||
DEPS_servo = $(CRATE_servo) $(SRC_servo) $(DONE_SUBMODULES) $(DONE_util) $(DONE_gfx) $(DONE_script) $(DONE_net) $(DONE_msg)
|
||||
|
||||
# rules that depend on having correct meta-target vars (DEPS_CLEAN, DEPS_servo, etc)
|
||||
include $(S)mk/check.mk
|
||||
|
@ -225,6 +232,9 @@ $(DONE_util): $(DEPS_util)
|
|||
$(DONE_net): $(DEPS_net)
|
||||
$(RUSTC) $(RFLAGS_net) -o $@ $< && touch $@
|
||||
|
||||
$(DONE_msg): $(DEPS_msg)
|
||||
$(RUSTC) $(RFLAGS_msg) -o $@ $< && touch $@
|
||||
|
||||
$(DONE_gfx): $(DEPS_gfx)
|
||||
$(RUSTC) $(RFLAGS_gfx) -o $@ $< && touch $@
|
||||
|
||||
|
|
1
configure
vendored
1
configure
vendored
|
@ -452,6 +452,7 @@ do
|
|||
done
|
||||
|
||||
make_dir ${CFG_BUILD_DIR}src/components/util
|
||||
make_dir ${CFG_BUILD_DIR}src/components/msg
|
||||
make_dir ${CFG_BUILD_DIR}src/components/net
|
||||
make_dir ${CFG_BUILD_DIR}src/components/gfx
|
||||
make_dir ${CFG_BUILD_DIR}src/components/script
|
||||
|
|
|
@ -28,6 +28,9 @@ clean-fast: $(DEPS_CLEAN_TARGETS_FAST) clean-servo
|
|||
clean-util:
|
||||
cd $(B)/src/components/util/ && rm -rf libutil*.dylib $(DONE_util)
|
||||
|
||||
clean-msg:
|
||||
cd $(B)/src/components/msg/ && rm -rf libmsg*.dylib $(DONE_msg)
|
||||
|
||||
clean-net:
|
||||
cd $(B)/src/components/net/ && rm -rf libnet*.dylib $(DONE_net)
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ extern mod stb_image;
|
|||
extern mod std;
|
||||
extern mod servo_net (name = "net");
|
||||
extern mod servo_util (name = "util");
|
||||
extern mod servo_msg (name = "msg");
|
||||
|
||||
// Eventually we would like the shaper to be pluggable, as many operating systems have their own
|
||||
// shapers. For now, however, this is a hard dependency.
|
||||
|
@ -39,7 +40,6 @@ priv mod render_context;
|
|||
|
||||
// Rendering
|
||||
pub mod color;
|
||||
pub mod compositor;
|
||||
pub mod display_list;
|
||||
pub mod geometry;
|
||||
pub mod render_task;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* 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/. */
|
||||
|
||||
use compositor::LayerBuffer;
|
||||
use servo_msg::compositor::LayerBuffer;
|
||||
use font_context::FontContext;
|
||||
use geometry::Au;
|
||||
use opts::Opts;
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
use azure::{AzFloat, AzGLContext};
|
||||
use azure::azure_hl::{B8G8R8A8, DrawTarget};
|
||||
use compositor::{RenderListener, IdleRenderState, RenderingRenderState, LayerBuffer, LayerBufferSet};
|
||||
use display_list::DisplayList;
|
||||
use servo_msg::compositor::{RenderListener, IdleRenderState, RenderingRenderState, LayerBuffer};
|
||||
use servo_msg::compositor::LayerBufferSet;
|
||||
use font_context::FontContext;
|
||||
use geom::matrix2d::Matrix2D;
|
||||
use geom::point::Point2D;
|
||||
|
|
|
@ -6,9 +6,11 @@ use platform::{Application, Window};
|
|||
use script::dom::event::{Event, ClickEvent, MouseDownEvent, MouseUpEvent, ResizeEvent};
|
||||
use script::script_task::{LoadMsg, SendEventMsg};
|
||||
use script::layout_interface::{LayoutChan, RouteScriptMsg};
|
||||
use script::compositor_interface::{ReadyState, ScriptListener};
|
||||
use windowing::{ApplicationMethods, WindowMethods, WindowMouseEvent, WindowClickEvent};
|
||||
use windowing::{WindowMouseDownEvent, WindowMouseUpEvent};
|
||||
use servo_msg::compositor::{RenderListener, LayerBufferSet, RenderState};
|
||||
use servo_msg::compositor::{ReadyState, ScriptListener};
|
||||
|
||||
use azure::azure_hl::{DataSourceSurface, DrawTarget, SourceSurfaceMethods, current_gl_context};
|
||||
use azure::azure::AzGLContext;
|
||||
use core::cell::Cell;
|
||||
|
@ -18,7 +20,6 @@ use core::util;
|
|||
use geom::matrix::identity;
|
||||
use geom::point::Point2D;
|
||||
use geom::size::Size2D;
|
||||
use gfx::compositor::{RenderListener, LayerBufferSet, RenderState};
|
||||
use layers::layers::{ARGB32Format, ContainerLayer, ContainerLayerKind, Format};
|
||||
use layers::layers::{ImageData, WithDataFn};
|
||||
use layers::layers::{TextureLayerKind, TextureLayer, TextureManager};
|
||||
|
|
|
@ -10,8 +10,8 @@ use core::comm::Port;
|
|||
use gfx::opts::Opts;
|
||||
use gfx::render_task::RenderChan;
|
||||
use gfx::render_task;
|
||||
use script::compositor_interface::{ScriptListener, ReadyState};
|
||||
use script::engine_interface::{EngineChan, ExitMsg, LoadUrlMsg, Msg};
|
||||
use servo_msg::compositor::{ScriptListener, ReadyState};
|
||||
use servo_msg::engine::{EngineChan, ExitMsg, LoadUrlMsg, Msg};
|
||||
use script::layout_interface::LayoutChan;
|
||||
use script::layout_interface;
|
||||
use script::script_task::{ExecuteMsg, LoadMsg, ScriptMsg, ScriptContext, ScriptChan};
|
||||
|
|
|
@ -15,11 +15,11 @@ use alert::{Alert, AlertMethods};
|
|||
use core::libc::c_int;
|
||||
use geom::point::Point2D;
|
||||
use geom::size::Size2D;
|
||||
use gfx::compositor::{IdleRenderState, RenderState, RenderingRenderState};
|
||||
use servo_msg::compositor::{IdleRenderState, RenderState, RenderingRenderState};
|
||||
use servo_msg::compositor::{FinishedLoading, Loading, PerformingLayout, ReadyState};
|
||||
use glut::glut::{ACTIVE_CTRL, DOUBLE, HAVE_PRECISE_MOUSE_WHEEL, WindowHeight, WindowWidth};
|
||||
use glut::glut;
|
||||
use glut::machack;
|
||||
use script::compositor_interface::{FinishedLoading, Loading, PerformingLayout, ReadyState};
|
||||
|
||||
static THROBBER: [char, ..8] = [ '⣾', '⣽', '⣻', '⢿', '⡿', '⣟', '⣯', '⣷' ];
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ extern mod newcss (name = "css");
|
|||
extern mod opengles;
|
||||
extern mod script;
|
||||
extern mod servo_net (name = "net");
|
||||
extern mod servo_msg (name = "msg");
|
||||
extern mod servo_util (name = "util");
|
||||
extern mod sharegl;
|
||||
extern mod stb_image;
|
||||
|
@ -35,7 +36,7 @@ extern mod core_text;
|
|||
|
||||
use compositing::{CompositorChan, CompositorTask};
|
||||
use engine::Engine;
|
||||
use script::engine_interface::{ExitMsg, LoadUrlMsg};
|
||||
use servo_msg::engine::{ExitMsg, LoadUrlMsg};
|
||||
|
||||
use gfx::opts;
|
||||
use servo_net::image_cache_task::ImageCacheTask;
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
use geom::point::Point2D;
|
||||
use geom::size::Size2D;
|
||||
use gfx::compositor::RenderState;
|
||||
use script::compositor_interface::ReadyState;
|
||||
use servo_msg::compositor::{ReadyState, RenderState};
|
||||
|
||||
pub enum WindowMouseEvent {
|
||||
WindowClickEvent(uint, Point2D<f32>),
|
||||
|
|
|
@ -40,3 +40,17 @@ pub trait RenderListener {
|
|||
fn set_render_state(&self, render_state: RenderState);
|
||||
}
|
||||
|
||||
pub enum ReadyState {
|
||||
/// Informs the compositor that a page is loading. Used for setting status
|
||||
Loading,
|
||||
/// Informs the compositor that a page is performing layout. Used for setting status
|
||||
PerformingLayout,
|
||||
/// Informs the compositor that a page is finished loading. Used for setting status
|
||||
FinishedLoading,
|
||||
}
|
||||
|
||||
/// The interface used by the script task to tell the compositor to update its ready state,
|
||||
/// which is used in displaying the appropriate message in the window's title.
|
||||
pub trait ScriptListener : Clone {
|
||||
fn set_ready_state(&self, ReadyState);
|
||||
}
|
18
src/components/msg/msg.rc
Normal file
18
src/components/msg/msg.rc
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* 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/. */
|
||||
|
||||
#[link(name = "msg",
|
||||
vers = "0.1",
|
||||
uuid = "4c6054e4-2a7b-4fae-b0c8-6d04416b2bf2",
|
||||
url = "http://servo.org/")];
|
||||
#[crate_type = "lib"];
|
||||
|
||||
|
||||
extern mod azure;
|
||||
extern mod core;
|
||||
extern mod geom;
|
||||
extern mod std;
|
||||
|
||||
pub mod compositor;
|
||||
pub mod engine;
|
|
@ -1,21 +0,0 @@
|
|||
/* 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 performing layout. Used for setting status
|
||||
PerformingLayout,
|
||||
/// Informs the compositor that a page is finished loading. Used for setting status
|
||||
FinishedLoading,
|
||||
}
|
||||
|
||||
/// The interface used by the script task to tell the compositor to update its ready state,
|
||||
/// which is used in displaying the appropriate message in the window's title.
|
||||
pub trait ScriptListener : Clone {
|
||||
fn set_ready_state(&self, ReadyState);
|
||||
}
|
|
@ -19,6 +19,7 @@ extern mod netsurfcss;
|
|||
extern mod newcss (name = "css");
|
||||
extern mod servo_net (name = "net");
|
||||
extern mod servo_util (name = "util");
|
||||
extern mod servo_msg (name = "msg");
|
||||
extern mod std;
|
||||
|
||||
pub mod dom {
|
||||
|
@ -64,8 +65,6 @@ pub mod html {
|
|||
pub mod hubbub_html_parser;
|
||||
}
|
||||
|
||||
pub mod compositor_interface;
|
||||
pub mod engine_interface;
|
||||
pub mod layout_interface;
|
||||
pub mod script_task;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/// The script task is the task that owns the DOM in memory, runs JavaScript, and spawns parsing
|
||||
/// and layout tasks.
|
||||
|
||||
use compositor_interface::{ReadyState, Loading, PerformingLayout, FinishedLoading};
|
||||
use servo_msg::compositor::{ReadyState, Loading, PerformingLayout, FinishedLoading};
|
||||
use dom::bindings::utils::GlobalStaticData;
|
||||
use dom::document::Document;
|
||||
use dom::element::Element;
|
||||
|
@ -17,7 +17,7 @@ use layout_interface::{HitTestResponse, LayoutQuery, LayoutResponse, LayoutChan}
|
|||
use layout_interface::{MatchSelectorsDocumentDamage, QueryMsg, Reflow, ReflowDocumentDamage};
|
||||
use layout_interface::{ReflowForDisplay, ReflowForScriptQuery, ReflowGoal, ReflowMsg};
|
||||
use layout_interface;
|
||||
use engine_interface::{EngineChan, LoadUrlMsg};
|
||||
use servo_msg::engine::{EngineChan, LoadUrlMsg};
|
||||
|
||||
use core::cast::transmute;
|
||||
use core::cell::Cell;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b754fd3d16f6acc80ae2252a310f8c71070366c3
|
||||
Subproject commit cf5641f5b0b7720e3841518ab7fbfafb4d2443a4
|
|
@ -1 +1 @@
|
|||
Subproject commit 5c00e2b7f471e70a892aeae36b4c77b78227823f
|
||||
Subproject commit 3f41e98925b9d4c0d4074046388e73f0e0032ab9
|
Loading…
Add table
Add a link
Reference in a new issue