Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename glutin port to winit
  • Loading branch information
atouchet committed May 28, 2020
1 parent 693ff29 commit a33c75c
Show file tree
Hide file tree
Showing 24 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,6 +1,6 @@
[workspace]
members = [
"ports/glutin",
"ports/winit",
"ports/gstplugin",
"ports/libsimpleservo/capi/",
"ports/libsimpleservo/jniapi/",
Expand Down
2 changes: 1 addition & 1 deletion docs/HACKING_QUICKSTART.md
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/ORGANIZATION.md
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions etc/ci/check_no_panic.sh
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ports/gstplugin/resources.rs
Expand Up @@ -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

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ports/glutin/browser.rs → ports/winit/browser.rs
Expand Up @@ -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 {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions ports/glutin/main.rs → ports/winit/main.rs
Expand Up @@ -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");
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions python/servo/command_base.py
Expand Up @@ -696,7 +696,7 @@ def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit

# 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:
Expand Down Expand Up @@ -869,7 +869,7 @@ def run_cargo_build_like_command(
api = "capi"
port = path.join("libsimpleservo", api)
else:
port = "glutin"
port = "winit"
args += [
"--manifest-path",
path.join(self.context.topdir, "ports", port, "Cargo.toml"),
Expand Down

0 comments on commit a33c75c

Please sign in to comment.