Skip to content

Commit 1366720

Browse files
authored
Fix typos (#380)
1 parent 8c38fb7 commit 1366720

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/lib.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ pub type Result<T> = std::result::Result<T, Error>;
5757
/// much higher resolution which would result in that the window is very small.
5858
#[derive(Clone, Copy, Debug)]
5959
pub enum Scale {
60-
/// This mode checks your current screen resolution and will caluclate the largest window size
60+
/// This mode checks your current screen resolution and will calculate the largest window size
6161
/// that can be used within that limit and resize it. Useful if you have a small buffer to
6262
/// display on a high resolution screen.
6363
FitScreen,
64-
/// 1X scale (which means leave the corrdinates sent into Window::new untouched)
64+
/// 1X scale (which means leave the coordinates sent into Window::new untouched)
6565
X1,
6666
/// 2X window scale (Example: 320 x 200 -> 640 x 400)
6767
X2,
@@ -84,7 +84,7 @@ pub enum KeyRepeat {
8484
No,
8585
}
8686

87-
/// The various mouse buttons that are availible
87+
/// The various mouse buttons that are available
8888
#[derive(PartialEq, Clone, Copy, Debug)]
8989
pub enum MouseButton {
9090
/// Left mouse button
@@ -102,7 +102,7 @@ pub enum MouseMode {
102102
Pass,
103103
/// Clamp the mouse coordinates within the window
104104
Clamp,
105-
/// Discared if the mouse is outside the window
105+
/// Discard if the mouse is outside the window
106106
Discard,
107107
}
108108

@@ -145,11 +145,11 @@ pub enum CursorStyle {
145145
Crosshair,
146146
/// Closed hand which useful for dragging things, may use default hand on unsupported OSes.
147147
ClosedHand,
148-
/// Open hand which useful for indicating drangable things, may use default hand on unsupported OSes.
148+
/// Open hand which useful for indicating draggable things, may use default hand on unsupported OSes.
149149
OpenHand,
150-
/// Rezining left-rigth direction
150+
/// Resizing left-right direction
151151
ResizeLeftRight,
152-
/// Rezining up-down direction
152+
/// Resizing up-down direction
153153
ResizeUpDown,
154154
/// Resize in all directions
155155
ResizeAll,
@@ -207,7 +207,7 @@ pub enum ScaleMode {
207207
}
208208

209209
/// WindowOptions is creation settings for the window. By default the settings are defined for
210-
/// displayng a 32-bit buffer (no scaling of window is possible)
210+
/// displaying a 32-bit buffer (no scaling of window is possible)
211211
#[derive(Clone, Copy, Debug)]
212212
pub struct WindowOptions {
213213
/// If the window should be borderless (default: false)
@@ -279,7 +279,7 @@ impl Window {
279279
///};
280280
/// ```
281281
///
282-
/// Open up a window that is resizeable
282+
/// Open up a window that is resizable
283283
///
284284
/// ```no_run
285285
/// # use minifb::*;
@@ -319,7 +319,7 @@ impl Window {
319319
///};
320320
/// ```
321321
///
322-
/// Open up a window that is resizeable
322+
/// Open up a window that is resizable
323323
/// TODO: Enable web canvas resizing
324324
///
325325
/// ```no_run
@@ -394,7 +394,7 @@ impl Window {
394394
}
395395

396396
/// Returns the native handle for a window which is an opaque pointer/handle which
397-
/// dependens on the current operating system:
397+
/// depends on the current operating system:
398398
///
399399
/// ```text
400400
/// Windows HWND
@@ -863,13 +863,13 @@ impl Window {
863863
self.0.is_active()
864864
}
865865

866-
/// Set input callback to recive callback on char input
866+
/// Set input callback to receive callback on char input
867867
#[inline]
868868
pub fn set_input_callback(&mut self, callback: Box<dyn InputCallback>) {
869869
self.0.set_input_callback(callback)
870870
}
871871

872-
/// This allows adding menus to your windows. As menus behaves a bit diffrently depending on
872+
/// This allows adding menus to your windows. As menus behaves a bit differently depending on
873873
/// Operating system here is how it works.
874874
///
875875
/// ```text
@@ -1104,7 +1104,7 @@ impl MenuItem<'_> {
11041104
}
11051105
}
11061106

1107-
/// Sets a shortcut key and modifer (and returns itself)
1107+
/// Sets a shortcut key and modifier (and returns itself)
11081108
///
11091109
/// # Examples
11101110
///

src/os/macos/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static KEY_MAPPINGS: [Key; 128] = [
9595
/* 4b */ Key::Unknown,
9696
/* 4c */ Key::Enter,
9797
/* 4d */ Key::Unknown,
98-
/* 4e */ Key::Unknown, // Subtrackt
98+
/* 4e */ Key::Unknown, // Subtract
9999
/* 4f */ Key::Unknown, // F18
100100
/* 50 */ Key::Unknown, // F19
101101
/* 51 */ Key::Equal,

src/os/posix/wayland.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl DisplayInfo {
209209
Format::Xrgb8888
210210
};
211211

212-
// Retrive shm buffer for writing
212+
// Retrieve shm buffer for writing
213213
let mut buf_pool = BufferPool::new(shm.clone(), format);
214214
let (mut tempfile, buffer) = buf_pool
215215
.get_buffer(size)

src/os/wasm/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub struct Window {
5353
bg_color: u32,
5454
window_scale: usize,
5555
canvas: HtmlCanvasElement,
56-
// 2D context is created lazily since its creation preculdes creation of webgl & webgpu contexts.
56+
// 2D context is created lazily since its creation precludes creation of webgl & webgpu contexts.
5757
context2d: Option<Context2D>,
5858
mouse_state: Rc<MouseState>,
5959
key_handler: Rc<RefCell<KeyHandler>>,

0 commit comments

Comments
 (0)