Rename glutin port to winit

This commit is contained in:
atouchet 2020-05-27 20:13:15 -07:00
parent 693ff29858
commit a33c75cbec
24 changed files with 12 additions and 13 deletions

View file

@ -1,6 +1,6 @@
[workspace]
members = [
"ports/glutin",
"ports/winit",
"ports/gstplugin",
"ports/libsimpleservo/capi/",
"ports/libsimpleservo/jniapi/",

View file

@ -102,7 +102,7 @@ See [Cargo's documentation about Cargo.toml and Cargo.lock files](https://doc.ru
As explained above, Servo depends on a lot of libraries, which makes it very modular. While working on a bug in Servo, you'll often end up in one of its dependencies. You will then want to compile your own version of the dependency (and maybe compiling against the HEAD of the library will fix the issue!).
For example, I'm trying to bring some cocoa events to Servo. The Servo window on Desktop is constructed with a library named [Glutin](https://github.com/tomaka/glutin). Glutin itself depends on a cocoa library named [cocoa-rs](https://github.com/servo/cocoa-rs). When building Servo, magically, all these dependencies are downloaded and built for you. But because I want to work on this cocoa event feature, I want Servo to use my own version of *glutin* and *cocoa-rs*.
For example, I'm trying to bring some cocoa events to Servo. The Servo window on Desktop is constructed with a library named [winit](https://github.com/rust-windowing/winit). winit itself depends on a cocoa library named [cocoa-rs](https://github.com/servo/cocoa-rs). When building Servo, magically, all these dependencies are downloaded and built for you. But because I want to work on this cocoa event feature, I want Servo to use my own version of *winit* and *cocoa-rs*.
This is how my projects are laid out:

View file

@ -63,7 +63,7 @@
* mach
* A command-line tool to help with developer tasks.
* ports
* glutin
* winit
* Embedding implementation for the `winit` windowing library.
* python
* servo

View file

@ -17,9 +17,9 @@ cd "$(git rev-parse --show-toplevel)"
PATHS=(
"components/compositing/compositor.rs"
"components/constellation/"
"ports/glutin/headed_window.rs"
"ports/glutin/headless_window.rs"
"ports/glutin/embedder.rs"
"ports/winit/headed_window.rs"
"ports/winit/headless_window.rs"
"ports/winit/embedder.rs"
)
# Make sure the paths exist

View file

@ -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 https://mozilla.org/MPL/2.0/. */
// This is a copy of the resource loader from the glutin port
// This is a copy of the resource loader from the winit port
// TODO: move this to somewhere where it can be shared.
// https://github.com/servo/servo/issues/24853

View file

@ -513,7 +513,7 @@ where
},
EmbedderMsg::MediaSessionEvent(_) => {
debug!("MediaSessionEvent received");
// TODO(ferjm): MediaSession support for Glutin based browsers.
// TODO(ferjm): MediaSession support for winit based browsers.
},
EmbedderMsg::OnDevtoolsStarted(port) => {
match port {

View file

@ -8,12 +8,11 @@
//! the compositor's `WindowMethods` to create a working web browser.
//!
//! This browser's implementation of `WindowMethods` is built on top
//! of [glutin], the cross-platform OpenGL utility and windowing
//! library.
//! of [winit], the cross-platform windowing library.
//!
//! For the engine itself look next door in `components/servo/lib.rs`.
//!
//! [glutin]: https://github.com/tomaka/glutin
//! [winit]: https://github.com/rust-windowing/winit
#[cfg(not(target_os = "android"))]
include!("main2.rs");

View file

@ -696,7 +696,7 @@ install them, let us know by filing a bug!")
# These are set because they are the variable names that build-apk
# expects. However, other submodules have makefiles that reference
# the env var names above. Once glutin is enabled and set as the
# the env var names above. Once winit is enabled and set as the
# default, we could modify the subproject makefiles to use the names
# below and remove the vars above, to avoid duplication.
if "ANDROID_SDK" in env:
@ -869,7 +869,7 @@ install them, let us know by filing a bug!")
api = "capi"
port = path.join("libsimpleservo", api)
else:
port = "glutin"
port = "winit"
args += [
"--manifest-path",
path.join(self.context.topdir, "ports", port, "Cargo.toml"),