diff --git a/rio-window/Cargo.toml b/rio-window/Cargo.toml index 4c55d3a6..959977af 100644 --- a/rio-window/Cargo.toml +++ b/rio-window/Cargo.toml @@ -10,7 +10,6 @@ edition.workspace = true license.workspace = true keywords.workspace = true -# Features are documented in either `lib.rs` or under `winit::platform`. [features] default = ["x11", "wayland", "wayland-dlopen", "wayland-csd-adwaita"] x11 = ["x11-dl", "bytemuck", "percent-encoding", "xkbcommon-dl/x11", "x11rb"] diff --git a/rio-window/src/event_loop.rs b/rio-window/src/event_loop.rs index a281abfd..54f0d153 100644 --- a/rio-window/src/event_loop.rs +++ b/rio-window/src/event_loop.rs @@ -113,7 +113,7 @@ impl EventLoopBuilder { )] #[inline] pub fn build(&mut self) -> Result, EventLoopError> { - let _span = tracing::debug_span!("winit::EventLoopBuilder::build").entered(); + let _span = tracing::debug_span!("rio_window::EventLoopBuilder::build").entered(); if EVENT_LOOP_CREATED.swap(true, Ordering::Relaxed) { return Err(EventLoopError::RecreationAttempt); @@ -229,7 +229,7 @@ impl EventLoop { where F: FnMut(Event, &ActiveEventLoop), { - let _span = tracing::debug_span!("winit::EventLoop::run").entered(); + let _span = tracing::debug_span!("rio_window::EventLoop::run").entered(); self.event_loop.run(event_handler) } @@ -296,7 +296,7 @@ impl EventLoop { /// [`DeviceEvent`]: crate::event::DeviceEvent pub fn listen_device_events(&self, allowed: DeviceEvents) { let _span = tracing::debug_span!( - "winit::EventLoop::listen_device_events", + "rio_window::EventLoop::listen_device_events", allowed = ?allowed ) .entered(); @@ -326,7 +326,7 @@ impl EventLoop { window_attributes: WindowAttributes, ) -> Result { let _span = tracing::debug_span!( - "winit::EventLoop::create_window", + "rio_window::EventLoop::create_window", window_attributes = ?window_attributes ) .entered(); @@ -404,7 +404,7 @@ impl ActiveEventLoop { window_attributes: WindowAttributes, ) -> Result { let _span = tracing::debug_span!( - "winit::ActiveEventLoop::create_window", + "rio_window::ActiveEventLoop::create_window", window_attributes = ?window_attributes ) .entered(); @@ -418,7 +418,7 @@ impl ActiveEventLoop { &self, custom_cursor: CustomCursorSource, ) -> CustomCursor { - let _span = tracing::debug_span!("winit::ActiveEventLoop::create_custom_cursor",) + let _span = tracing::debug_span!("rio_window::ActiveEventLoop::create_custom_cursor",) .entered(); self.p.create_custom_cursor(custom_cursor) @@ -428,7 +428,7 @@ impl ActiveEventLoop { #[inline] pub fn available_monitors(&self) -> impl Iterator { let _span = - tracing::debug_span!("winit::ActiveEventLoop::available_monitors",).entered(); + tracing::debug_span!("rio_window::ActiveEventLoop::available_monitors",).entered(); #[allow(clippy::useless_conversion)] // false positive on some platforms self.p @@ -447,7 +447,7 @@ impl ActiveEventLoop { #[inline] pub fn primary_monitor(&self) -> Option { let _span = - tracing::debug_span!("winit::ActiveEventLoop::primary_monitor",).entered(); + tracing::debug_span!("rio_window::ActiveEventLoop::primary_monitor",).entered(); self.p .primary_monitor() @@ -467,7 +467,7 @@ impl ActiveEventLoop { /// [`DeviceEvent`]: crate::event::DeviceEvent pub fn listen_device_events(&self, allowed: DeviceEvents) { let _span = tracing::debug_span!( - "winit::ActiveEventLoop::listen_device_events", + "rio_window::ActiveEventLoop::listen_device_events", allowed = ?allowed ) .entered(); @@ -489,7 +489,7 @@ impl ActiveEventLoop { /// /// See [`LoopExiting`][Event::LoopExiting]. pub fn exit(&self) { - let _span = tracing::debug_span!("winit::ActiveEventLoop::exit",).entered(); + let _span = tracing::debug_span!("rio_window::ActiveEventLoop::exit",).entered(); self.p.exit() } @@ -584,7 +584,7 @@ impl EventLoopProxy { /// /// [`UserEvent(event)`]: Event::UserEvent pub fn send_event(&self, event: T) -> Result<(), EventLoopClosed> { - let _span = tracing::debug_span!("winit::EventLoopProxy::send_event",).entered(); + let _span = tracing::debug_span!("rio_window::EventLoopProxy::send_event",).entered(); self.event_loop_proxy.send_event(event) } diff --git a/rio-window/src/icon.rs b/rio-window/src/icon.rs index 0a2a2191..0aa9fbf0 100644 --- a/rio-window/src/icon.rs +++ b/rio-window/src/icon.rs @@ -130,7 +130,7 @@ impl Icon { /// `rgba.len() / 4`. Otherwise, this will return a `BadIcon` error. pub fn from_rgba(rgba: Vec, width: u32, height: u32) -> Result { let _span = - tracing::debug_span!("winit::Icon::from_rgba", width, height).entered(); + tracing::debug_span!("rio_window::Icon::from_rgba", width, height).entered(); Ok(Icon { inner: PlatformIcon::from_rgba(rgba, width, height)?, diff --git a/rio-window/src/platform/run_on_demand.rs b/rio-window/src/platform/run_on_demand.rs index ecb22395..f5797dda 100644 --- a/rio-window/src/platform/run_on_demand.rs +++ b/rio-window/src/platform/run_on_demand.rs @@ -96,8 +96,8 @@ impl ActiveEventLoop { } /// ```compile_fail -/// use winit::event_loop::EventLoop; -/// use winit::platform::run_on_demand::EventLoopExtRunOnDemand; +/// use rio_window::event_loop::EventLoop; +/// use rio_window::platform::run_on_demand::EventLoopExtRunOnDemand; /// /// let mut event_loop = EventLoop::new().unwrap(); /// event_loop.run_on_demand(|_, _| { diff --git a/rio-window/src/platform/windows.rs b/rio-window/src/platform/windows.rs index 01478413..b628d54e 100644 --- a/rio-window/src/platform/windows.rs +++ b/rio-window/src/platform/windows.rs @@ -184,9 +184,9 @@ pub trait EventLoopBuilderExtWindows { /// Disable process-wide DPI awareness. /// /// ``` - /// use winit::event_loop::EventLoopBuilder; + /// use rio_window::event_loop::EventLoopBuilder; /// #[cfg(target_os = "windows")] - /// use winit::platform::windows::EventLoopBuilderExtWindows; + /// use rio_window::platform::windows::EventLoopBuilderExtWindows; /// /// let mut builder = EventLoopBuilder::new(); /// #[cfg(target_os = "windows")] @@ -204,9 +204,9 @@ pub trait EventLoopBuilderExtWindows { /// /// ``` /// # use windows_sys::Win32::UI::WindowsAndMessaging::{ACCEL, CreateAcceleratorTableW, TranslateAcceleratorW, DispatchMessageW, TranslateMessage, MSG}; - /// use winit::event_loop::EventLoopBuilder; + /// use rio_window::event_loop::EventLoopBuilder; /// #[cfg(target_os = "windows")] - /// use winit::platform::windows::EventLoopBuilderExtWindows; + /// use rio_window::platform::windows::EventLoopBuilderExtWindows; /// /// let mut builder = EventLoopBuilder::new(); /// #[cfg(target_os = "windows")] @@ -335,11 +335,11 @@ pub trait WindowExtWindows { /// ## Example /// /// ```no_run - /// # use winit::window::Window; + /// # use rio_window::window::Window; /// # fn scope(window: Window) { /// use std::thread; - /// use winit::platform::windows::WindowExtWindows; - /// use winit::raw_window_handle::HasWindowHandle; + /// use rio_window::platform::windows::WindowExtWindows; + /// use rio_window::raw_window_handle::HasWindowHandle; /// /// // We can get the window handle on the current thread. /// let handle = window.window_handle().unwrap(); diff --git a/rio-window/src/platform/x11.rs b/rio-window/src/platform/x11.rs index 8017d4a3..4fcb7727 100644 --- a/rio-window/src/platform/x11.rs +++ b/rio-window/src/platform/x11.rs @@ -156,9 +156,9 @@ pub trait WindowAttributesExtX11 { /// Build window with base size hint. /// /// ``` - /// # use winit::dpi::{LogicalSize, PhysicalSize}; - /// # use winit::window::Window; - /// # use winit::platform::x11::WindowAttributesExtX11; + /// # use rio_window::dpi::{LogicalSize, PhysicalSize}; + /// # use rio_window::window::Window; + /// # use rio_window::platform::x11::WindowAttributesExtX11; /// // Specify the size in logical dimensions like this: /// Window::default_attributes().with_base_size(LogicalSize::new(400.0, 200.0)); /// @@ -172,9 +172,9 @@ pub trait WindowAttributesExtX11 { /// # Example /// /// ```no_run - /// use winit::window::Window; - /// use winit::event_loop::ActiveEventLoop; - /// use winit::platform::x11::{XWindow, WindowAttributesExtX11}; + /// use rio_window::window::Window; + /// use rio_window::event_loop::ActiveEventLoop; + /// use rio_window::platform::x11::{XWindow, WindowAttributesExtX11}; /// # fn create_window(event_loop: &ActiveEventLoop) -> Result<(), Box> { /// let parent_window_id = std::env::args().nth(1).unwrap().parse::()?; /// let window_attributes = Window::default_attributes().with_embed_parent_window(parent_window_id); diff --git a/rio-window/src/platform_impl/linux/wayland/window/mod.rs b/rio-window/src/platform_impl/linux/wayland/window/mod.rs index 887948f7..7c93998b 100644 --- a/rio-window/src/platform_impl/linux/wayland/window/mod.rs +++ b/rio-window/src/platform_impl/linux/wayland/window/mod.rs @@ -749,7 +749,7 @@ impl TryFrom<&str> for Theme { type Error = (); /// ``` - /// use winit::window::Theme; + /// use rio_window::window::Theme; /// /// assert_eq!("dark".try_into(), Ok(Theme::Dark)); /// assert_eq!("lIghT".try_into(), Ok(Theme::Light)); diff --git a/rio-window/src/platform_impl/windows/monitor.rs b/rio-window/src/platform_impl/windows/monitor.rs index c05a64c9..d9dac91c 100644 --- a/rio-window/src/platform_impl/windows/monitor.rs +++ b/rio-window/src/platform_impl/windows/monitor.rs @@ -23,7 +23,7 @@ pub struct VideoModeHandle { pub(crate) bit_depth: u16, pub(crate) refresh_rate_millihertz: u32, pub(crate) monitor: MonitorHandle, - // DEVMODEW is huge so we box it to avoid blowing up the size of winit::window::Fullscreen + // DEVMODEW is huge so we box it to avoid blowing up the size of rio_window::window::Fullscreen pub(crate) native_video_mode: Box, }