diff --git a/Cargo.toml b/Cargo.toml index 732729bf3d4..c431a8f1707 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] members = [ - "ports/glutin", + "ports/winit", "ports/gstplugin", "ports/libsimpleservo/capi/", "ports/libsimpleservo/jniapi/", diff --git a/docs/HACKING_QUICKSTART.md b/docs/HACKING_QUICKSTART.md index f669bd3815a..025120aaa41 100644 --- a/docs/HACKING_QUICKSTART.md +++ b/docs/HACKING_QUICKSTART.md @@ -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: diff --git a/docs/ORGANIZATION.md b/docs/ORGANIZATION.md index b08df989d94..690b7c59cf3 100644 --- a/docs/ORGANIZATION.md +++ b/docs/ORGANIZATION.md @@ -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 diff --git a/etc/ci/check_no_panic.sh b/etc/ci/check_no_panic.sh index be59f5ddef1..a4bead60cec 100755 --- a/etc/ci/check_no_panic.sh +++ b/etc/ci/check_no_panic.sh @@ -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 diff --git a/ports/gstplugin/resources.rs b/ports/gstplugin/resources.rs index eba01e72631..9d84f28338e 100644 --- a/ports/gstplugin/resources.rs +++ b/ports/gstplugin/resources.rs @@ -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 diff --git a/ports/glutin/Cargo.toml b/ports/winit/Cargo.toml similarity index 100% rename from ports/glutin/Cargo.toml rename to ports/winit/Cargo.toml diff --git a/ports/glutin/app.rs b/ports/winit/app.rs similarity index 100% rename from ports/glutin/app.rs rename to ports/winit/app.rs diff --git a/ports/glutin/backtrace.rs b/ports/winit/backtrace.rs similarity index 100% rename from ports/glutin/backtrace.rs rename to ports/winit/backtrace.rs diff --git a/ports/glutin/browser.rs b/ports/winit/browser.rs similarity index 99% rename from ports/glutin/browser.rs rename to ports/winit/browser.rs index c97a1fa504a..6371a39c056 100644 --- a/ports/glutin/browser.rs +++ b/ports/winit/browser.rs @@ -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 { diff --git a/ports/glutin/build.rs b/ports/winit/build.rs similarity index 100% rename from ports/glutin/build.rs rename to ports/winit/build.rs diff --git a/ports/glutin/embedder.rs b/ports/winit/embedder.rs similarity index 100% rename from ports/glutin/embedder.rs rename to ports/winit/embedder.rs diff --git a/ports/glutin/events_loop.rs b/ports/winit/events_loop.rs similarity index 100% rename from ports/glutin/events_loop.rs rename to ports/winit/events_loop.rs diff --git a/ports/glutin/headed_window.rs b/ports/winit/headed_window.rs similarity index 100% rename from ports/glutin/headed_window.rs rename to ports/winit/headed_window.rs diff --git a/ports/glutin/headless_window.rs b/ports/winit/headless_window.rs similarity index 100% rename from ports/glutin/headless_window.rs rename to ports/winit/headless_window.rs diff --git a/ports/glutin/keyutils.rs b/ports/winit/keyutils.rs similarity index 100% rename from ports/glutin/keyutils.rs rename to ports/winit/keyutils.rs diff --git a/ports/glutin/main.rs b/ports/winit/main.rs similarity index 86% rename from ports/glutin/main.rs rename to ports/winit/main.rs index 85c237c55db..a508e32f740 100644 --- a/ports/glutin/main.rs +++ b/ports/winit/main.rs @@ -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"); diff --git a/ports/glutin/main2.rs b/ports/winit/main2.rs similarity index 100% rename from ports/glutin/main2.rs rename to ports/winit/main2.rs diff --git a/ports/glutin/platform/macos/Info.plist b/ports/winit/platform/macos/Info.plist similarity index 100% rename from ports/glutin/platform/macos/Info.plist rename to ports/winit/platform/macos/Info.plist diff --git a/ports/glutin/platform/macos/count_threads.c b/ports/winit/platform/macos/count_threads.c similarity index 100% rename from ports/glutin/platform/macos/count_threads.c rename to ports/winit/platform/macos/count_threads.c diff --git a/ports/glutin/platform/macos/mod.rs b/ports/winit/platform/macos/mod.rs similarity index 100% rename from ports/glutin/platform/macos/mod.rs rename to ports/winit/platform/macos/mod.rs diff --git a/ports/glutin/platform/windows/servo.exe.manifest b/ports/winit/platform/windows/servo.exe.manifest similarity index 100% rename from ports/glutin/platform/windows/servo.exe.manifest rename to ports/winit/platform/windows/servo.exe.manifest diff --git a/ports/glutin/resources.rs b/ports/winit/resources.rs similarity index 100% rename from ports/glutin/resources.rs rename to ports/winit/resources.rs diff --git a/ports/glutin/window_trait.rs b/ports/winit/window_trait.rs similarity index 100% rename from ports/glutin/window_trait.rs rename to ports/winit/window_trait.rs diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 65619102a7d..e3942ef66e0 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -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"),