mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 14:20:05 -04:00
chore: Use cspell to fix some typos
Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
13
.cspell.json
Normal file
13
.cspell.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
||||||
|
"version": "0.2",
|
||||||
|
"dictionaryDefinitions": [
|
||||||
|
{
|
||||||
|
"name": "project-words",
|
||||||
|
"path": "./project-words.txt",
|
||||||
|
"addWords": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dictionaries": ["project-words"],
|
||||||
|
"ignorePaths": ["/target", "/project-words.txt"]
|
||||||
|
}
|
||||||
38
project-words.txt
Normal file
38
project-words.txt
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
adwaita
|
||||||
|
apartmentthreaded
|
||||||
|
bitflags
|
||||||
|
borderless
|
||||||
|
clipchildren
|
||||||
|
coinit
|
||||||
|
crossfont
|
||||||
|
dbus
|
||||||
|
dlopen
|
||||||
|
donotround
|
||||||
|
dwmwcp
|
||||||
|
dwmsbt
|
||||||
|
fullscreen
|
||||||
|
glutin
|
||||||
|
hittest
|
||||||
|
hmenu
|
||||||
|
hmonitor
|
||||||
|
hwnd
|
||||||
|
kwin
|
||||||
|
mainwindow
|
||||||
|
noredirectionbitmap
|
||||||
|
notitle
|
||||||
|
preedit
|
||||||
|
randr
|
||||||
|
repr
|
||||||
|
roundsmall
|
||||||
|
rustdoc
|
||||||
|
systembackdrop
|
||||||
|
tabbedwindow
|
||||||
|
transientwindow
|
||||||
|
winit
|
||||||
|
xext
|
||||||
|
xlib
|
||||||
|
xrandr
|
||||||
|
xrender
|
||||||
|
xresources
|
||||||
|
xpresent
|
||||||
|
xscrnsaver
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ## Client-side decorations
|
//! ## Client-side decorations
|
||||||
//!
|
//!
|
||||||
//! Winit provides client-side decorations by default, but the behaviour can
|
//! Winit provides client-side decorations by default, but the behavior can
|
||||||
//! be controlled with the following feature flags:
|
//! be controlled with the following feature flags:
|
||||||
//!
|
//!
|
||||||
//! * `wayland-csd-adwaita` (default).
|
//! * `wayland-csd-adwaita` (default).
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ pub trait WindowExtWebSys {
|
|||||||
/// would prevent that.
|
/// would prevent that.
|
||||||
///
|
///
|
||||||
/// Some events are impossible to prevent. E.g. Firefox allows to access the native browser
|
/// Some events are impossible to prevent. E.g. Firefox allows to access the native browser
|
||||||
/// context menu with Shift+Rightclick.
|
/// context menu with Shift+Right-click.
|
||||||
fn set_prevent_default(&self, prevent_default: bool);
|
fn set_prevent_default(&self, prevent_default: bool);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ pub trait CustomCursorExtWebSys {
|
|||||||
/// but browser support for image formats is inconsistent. Using [PNG] is recommended.
|
/// but browser support for image formats is inconsistent. Using [PNG] is recommended.
|
||||||
///
|
///
|
||||||
/// [PNG]: https://en.wikipedia.org/wiki/PNG
|
/// [PNG]: https://en.wikipedia.org/wiki/PNG
|
||||||
fn from_url(url: String, hotspot_x: u16, hotspot_y: u16) -> CustomCursorSource;
|
fn from_url(url: String, hot_spot_x: u16, hot_spot_y: u16) -> CustomCursorSource;
|
||||||
|
|
||||||
/// Crates a new animated cursor from multiple [`CustomCursor`]s.
|
/// Crates a new animated cursor from multiple [`CustomCursor`]s.
|
||||||
/// Supplied `cursors` can't be empty or other animations.
|
/// Supplied `cursors` can't be empty or other animations.
|
||||||
@@ -289,12 +289,12 @@ impl CustomCursorExtWebSys for CustomCursor {
|
|||||||
self.inner.animation
|
self.inner.animation
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_url(url: String, hotspot_x: u16, hotspot_y: u16) -> CustomCursorSource {
|
fn from_url(url: String, hot_spot_x: u16, hot_spot_y: u16) -> CustomCursorSource {
|
||||||
CustomCursorSource {
|
CustomCursorSource {
|
||||||
inner: PlatformCustomCursorSource::Url {
|
inner: PlatformCustomCursorSource::Url {
|
||||||
url,
|
url,
|
||||||
hotspot_x,
|
hot_spot_x,
|
||||||
hotspot_y,
|
hot_spot_y,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -330,7 +330,7 @@ impl fmt::Display for BadAnimation {
|
|||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::Empty => write!(f, "No cursors supplied"),
|
Self::Empty => write!(f, "No cursors supplied"),
|
||||||
Self::Animation => write!(f, "A supplied cursor is an animtion"),
|
Self::Animation => write!(f, "A supplied cursor is an animation"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,11 +157,11 @@ pub trait EventLoopBuilderExtWindows {
|
|||||||
/// #[cfg(target_os = "windows")]
|
/// #[cfg(target_os = "windows")]
|
||||||
/// builder.with_msg_hook(|msg|{
|
/// builder.with_msg_hook(|msg|{
|
||||||
/// let msg = msg as *const MSG;
|
/// let msg = msg as *const MSG;
|
||||||
/// # let accels: Vec<ACCEL> = Vec::new();
|
/// # let accelerators: Vec<ACCEL> = Vec::new();
|
||||||
/// let translated = unsafe {
|
/// let translated = unsafe {
|
||||||
/// TranslateAcceleratorW(
|
/// TranslateAcceleratorW(
|
||||||
/// (*msg).hwnd,
|
/// (*msg).hwnd,
|
||||||
/// CreateAcceleratorTableW(accels.as_ptr() as _, 1),
|
/// CreateAcceleratorTableW(accelerators.as_ptr() as _, 1),
|
||||||
/// msg,
|
/// msg,
|
||||||
/// ) == 1
|
/// ) == 1
|
||||||
/// };
|
/// };
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ use crate::dpi::Size;
|
|||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
pub enum WindowType {
|
pub enum WindowType {
|
||||||
/// A desktop feature. This can include a single window containing desktop icons with the same dimensions as the
|
/// A desktop feature. This can include a single window containing desktop icons with the same dimensions as the
|
||||||
/// screen, allowing the desktop environment to have full control of the desktop, without the need for proxying
|
/// screen, allowing the desktop environment to have full control of the desktop, without the need for proxy-ing
|
||||||
/// root window clicks.
|
/// root window clicks.
|
||||||
Desktop,
|
Desktop,
|
||||||
/// A dock or panel feature. Typically a Window Manager would keep such windows on top of all other windows.
|
/// A dock or panel feature. Typically a Window Manager would keep such windows on top of all other windows.
|
||||||
Dock,
|
Dock,
|
||||||
/// Toolbar windows. "Torn off" from the main application.
|
/// Toolbar windows. "Torn off" from the main application.
|
||||||
Toolbar,
|
Toolbar,
|
||||||
/// Pinnable menu windows. "Torn off" from the main application.
|
/// Pin-able menu windows. "Torn off" from the main application.
|
||||||
Menu,
|
Menu,
|
||||||
/// A small persistent utility window, such as a palette or toolbox.
|
/// A small persistent utility window, such as a palette or toolbox.
|
||||||
Utility,
|
Utility,
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ pub(crate) enum CustomCursorSource {
|
|||||||
Image(CursorImage),
|
Image(CursorImage),
|
||||||
Url {
|
Url {
|
||||||
url: String,
|
url: String,
|
||||||
hotspot_x: u16,
|
hot_spot_x: u16,
|
||||||
hotspot_y: u16,
|
hot_spot_y: u16,
|
||||||
},
|
},
|
||||||
Animation {
|
Animation {
|
||||||
duration: Duration,
|
duration: Duration,
|
||||||
@@ -88,8 +88,8 @@ impl CustomCursor {
|
|||||||
),
|
),
|
||||||
CustomCursorSource::Url {
|
CustomCursorSource::Url {
|
||||||
url,
|
url,
|
||||||
hotspot_x,
|
hot_spot_x: hotspot_x,
|
||||||
hotspot_y,
|
hot_spot_y: hotspot_y,
|
||||||
} => Self::build_spawn(
|
} => Self::build_spawn(
|
||||||
event_loop,
|
event_loop,
|
||||||
from_url(UrlType::Plain(url), hotspot_x, hotspot_y),
|
from_url(UrlType::Plain(url), hotspot_x, hotspot_y),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// A poly-fill for `lazy_cell`
|
// A poly-fill for `lazy_cell`
|
||||||
// Replace with std::sync::LazyLock when https://github.com/rust-lang/rust/issues/109736 is stablized.
|
// Replace with std::sync::LazyLock when https://github.com/rust-lang/rust/issues/109736 is stabilized.
|
||||||
|
|
||||||
// This isn't used on every platform, which can come up as dead code warnings.
|
// This isn't used on every platform, which can come up as dead code warnings.
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ pub struct Window {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Debug for Window {
|
impl fmt::Debug for Window {
|
||||||
fn fmt(&self, fmtr: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
fmtr.pad("Window { .. }")
|
formatter.pad("Window { .. }")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1026,7 +1026,7 @@ impl Window {
|
|||||||
|
|
||||||
/// Sets whether the window is resizable or not.
|
/// Sets whether the window is resizable or not.
|
||||||
///
|
///
|
||||||
/// Note that making the window unresizable doesn't exempt you from handling [`WindowEvent::Resized`], as that
|
/// Note that making the window un-resizable doesn't exempt you from handling [`WindowEvent::Resized`], as that
|
||||||
/// event can still be triggered by DPI scaling, entering fullscreen mode, etc. Also, the
|
/// event can still be triggered by DPI scaling, entering fullscreen mode, etc. Also, the
|
||||||
/// window could still be resized by calling [`Window::request_inner_size`].
|
/// window could still be resized by calling [`Window::request_inner_size`].
|
||||||
///
|
///
|
||||||
@@ -1235,7 +1235,7 @@ impl Window {
|
|||||||
/// Sets the window icon.
|
/// Sets the window icon.
|
||||||
///
|
///
|
||||||
/// On Windows and X11, this is typically the small icon in the top-left
|
/// On Windows and X11, this is typically the small icon in the top-left
|
||||||
/// corner of the titlebar.
|
/// corner of the title bar.
|
||||||
///
|
///
|
||||||
/// ## Platform-specific
|
/// ## Platform-specific
|
||||||
///
|
///
|
||||||
@@ -1375,7 +1375,7 @@ impl Window {
|
|||||||
/// is already focused. How requesting for user attention manifests is platform dependent,
|
/// is already focused. How requesting for user attention manifests is platform dependent,
|
||||||
/// see [`UserAttentionType`] for details.
|
/// see [`UserAttentionType`] for details.
|
||||||
///
|
///
|
||||||
/// Providing `None` will unset the request for user attention. Unsetting the request for
|
/// Providing `None` will unset the request for user attention. Un-setting the request for
|
||||||
/// user attention might not be done automatically by the WM when the window receives input.
|
/// user attention might not be done automatically by the WM when the window receives input.
|
||||||
///
|
///
|
||||||
/// ## Platform-specific
|
/// ## Platform-specific
|
||||||
|
|||||||
Reference in New Issue
Block a user