mirror of
https://github.com/servo/servo.git
synced 2025-06-28 11:03:39 +01:00
1. converted the first comments in servo/lib.rs into doc comments.
2. moved doc comment of impl Browser to pub struct Browser.
This commit is contained in:
parent
f4aa5b42ea
commit
fd7c895094
1 changed files with 19 additions and 18 deletions
|
@ -2,20 +2,20 @@
|
|||
* 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/. */
|
||||
|
||||
// Servo, the mighty web browser engine from the future.
|
||||
//
|
||||
// This is a very simple library that wires all of Servo's components
|
||||
// together as type `Browser`, along with a generic client
|
||||
// implementing the `WindowMethods` trait, to create a working web
|
||||
// browser.
|
||||
//
|
||||
// The `Browser` type is responsible for configuring a
|
||||
// `Constellation`, which does the heavy lifting of coordinating all
|
||||
// of Servo's internal subsystems, including the `ScriptTask` and the
|
||||
// `LayoutTask`, as well maintains the navigation context.
|
||||
//
|
||||
// The `Browser` is fed events from a generic type that implements the
|
||||
// `WindowMethods` trait.
|
||||
/// Servo, the mighty web browser engine from the future.
|
||||
///
|
||||
/// This is a very simple library that wires all of Servo's components
|
||||
/// together as type `Browser`, along with a generic client
|
||||
/// implementing the `WindowMethods` trait, to create a working web
|
||||
/// browser.
|
||||
///
|
||||
/// The `Browser` type is responsible for configuring a
|
||||
/// `Constellation`, which does the heavy lifting of coordinating all
|
||||
/// of Servo's internal subsystems, including the `ScriptTask` and the
|
||||
/// `LayoutTask`, as well maintains the navigation context.
|
||||
///
|
||||
/// The `Browser` is fed events from a generic type that implements the
|
||||
/// `WindowMethods` trait.
|
||||
|
||||
extern crate gaol;
|
||||
extern crate libc;
|
||||
|
@ -103,10 +103,6 @@ pub use export::script_traits;
|
|||
pub use export::style;
|
||||
pub use export::url;
|
||||
|
||||
pub struct Browser {
|
||||
compositor: Box<CompositorEventListener + 'static>,
|
||||
}
|
||||
|
||||
/// The in-process interface to Servo.
|
||||
///
|
||||
/// It does everything necessary to render the web, primarily
|
||||
|
@ -118,6 +114,11 @@ pub struct Browser {
|
|||
/// application Servo is embedded in. Clients then create an event
|
||||
/// loop to pump messages between the embedding application and
|
||||
/// various browser components.
|
||||
|
||||
pub struct Browser {
|
||||
compositor: Box<CompositorEventListener + 'static>,
|
||||
}
|
||||
|
||||
impl Browser {
|
||||
pub fn new<Window>(window: Option<Rc<Window>>) -> Browser
|
||||
where Window: WindowMethods + 'static {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue