From 65060cf1a2baa007e3078a8dc5226305a4837171 Mon Sep 17 00:00:00 2001 From: MaulingMonkey Date: Sat, 20 Jan 2024 21:38:02 -0800 Subject: [PATCH] =?UTF-8?q?doc:=20`[learn.microsoft.com]`=20=E2=86=92=20`[?= =?UTF-8?q?microsoft.com]`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/values/hwnd.rs | 20 ++++++++++---------- src/values/non_null_hwnd.rs | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/values/hwnd.rs b/src/values/hwnd.rs index cfaa7e2..34a0f88 100644 --- a/src/values/hwnd.rs +++ b/src/values/hwnd.rs @@ -7,7 +7,7 @@ use core::ptr::NonNull; -/// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/learnwin32/what-is-a-window-)\] +/// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/learnwin32/what-is-a-window-)\] /// `HWND` /// — /// A weak handle to a "window" on this computer. @@ -46,7 +46,7 @@ impl From> for HWND { fn from(hwnd: Option) -> #[allow(dead_code)] impl HWND { #[inline(always)] const fn from_constant(hwnd: isize) -> Self { Self(hwnd as _) } - /// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/winmsg/window-features#message-only-windows)\] + /// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/winmsg/window-features#message-only-windows)\] /// `HWND_MESSAGE = -3` /// /// Can be passed to [`CreateWindowW`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-createwindoww) etc. as `hWndParent` to create a message-only window, which: @@ -56,21 +56,21 @@ impl From> for HWND { fn from(hwnd: Option) -> /// * Does not receive broadcast messages pub const MESSAGE : Self = Self::from_constant(-3); - /// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos#parameters)\] + /// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos#parameters)\] /// `HWND_NOTOPMOST = -2` /// /// Can be passed to [`SetWindowPos`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos) etc. as /// `hWndInsertAfter` to (conditionally) place the window above all non-topmost windows (without *becoming* a topmost window.) pub const NOTOPMOST : Self = Self::from_constant(-2); - /// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos#parameters)\] + /// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos#parameters)\] /// `HWND_TOPMOST = -1` /// /// Can be passed to [`SetWindowPos`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos) etc. as /// `hWndInsertAfter` to (conditionally) place the window above all non-topmost windows (*becoming* a topmost window.) pub const TOPMOST : Self = Self::from_constant(-1); - /// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos#parameters)\] + /// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos#parameters)\] /// `HWND_TOP = 0` /// /// Can be passed to [`SetWindowPos`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos) etc. as @@ -83,7 +83,7 @@ impl From> for HWND { fn from(hwnd: Option) -> /// * [`SetWindowPos`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos) will interpret `0` as "place the window at the top of the Z order" pub const TOP : Self = Self::from_constant(0); - /// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mapwindowpoints#parameters)\] + /// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mapwindowpoints#parameters)\] /// `HWND_DESKTOP = 0` /// /// Can be passed to [`MapWindowPoints`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mapwindowpoints#parameters) as @@ -96,7 +96,7 @@ impl From> for HWND { fn from(hwnd: Option) -> /// * [`SetWindowPos`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos) will interpret `0` as "place the window at the top of the Z order" pub const DESKTOP : Self = Self::from_constant(0); - /// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/learnwin32/what-is-a-window-)\] + /// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/learnwin32/what-is-a-window-)\] /// `0` / `nullptr` /// /// **N.B.:** `0` / `nullptr` / `HWND_TOP` / `HWND_DESKTOP` can have wildly different meanings depending on which API it is passed to: @@ -106,14 +106,14 @@ impl From> for HWND { fn from(hwnd: Option) -> /// * [`SetWindowPos`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos) will interpret `0` as "place the window at the top of the Z order" pub const NULL : Self = Self::from_constant(0); - /// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos#parameters)\] + /// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos#parameters)\] /// `HWND_BOTTOM = 1` /// /// Can be passed to [`SetWindowPos`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos) etc. as /// `hWndInsertAfter` to (conditionally) place the window below all other windows (losing *topmost* status if it had it.) pub const BOTTOM : Self = Self::from_constant(1); - /// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage#parameters)\] + /// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage#parameters)\] /// `HWND_BROADCAST = 0xFFFF` /// /// Can be passed to [`SendMessage`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage#parameters) etc. as @@ -139,7 +139,7 @@ impl From> for HWND { fn from(hwnd: Option) -> #[inline(always)] pub(crate) fn to_nz_usize (self) -> Option { NonZeroUsize::new(self.0 as _) } } -/// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowlongptrw)\] +/// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowlongptrw)\] /// GetWindowsLongPtrW pub(crate) fn get_window_long_ptr_w(hwnd: impl Into, index: impl Into) -> isize { #[link(name = "user32")] extern "system" { diff --git a/src/values/non_null_hwnd.rs b/src/values/non_null_hwnd.rs index 3caf55e..fd19c32 100644 --- a/src/values/non_null_hwnd.rs +++ b/src/values/non_null_hwnd.rs @@ -6,7 +6,7 @@ use core::ptr::NonNull; -/// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/learnwin32/what-is-a-window-)\] +/// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/learnwin32/what-is-a-window-)\] /// `__attribute__((nonnull)) HWND` /// — /// A weak handle to a "window" on this computer. @@ -44,7 +44,7 @@ impl From for Option { fn from(hwnd: HWND) -> Self { NonN #[allow(dead_code)] impl NonNullHWND { #[inline(always)] const fn from_constant(hwnd: isize) -> Self { match NonZeroUsize::new(hwnd as _) { Some(v) => Self(v), None => panic!("invalid constant") } } - /// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/winmsg/window-features#message-only-windows)\] + /// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/winmsg/window-features#message-only-windows)\] /// `HWND_MESSAGE = -3` /// /// Can be passed to [`CreateWindowW`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-createwindoww) etc. as `hWndParent` to create a message-only window, which: @@ -61,7 +61,7 @@ impl From for Option { fn from(hwnd: HWND) -> Self { NonN //pub const NULL : Self = Self::from_constant(0); // nullptr - cannot be a NonNullHWND. //pub const BOTTOM : Self = Self::from_constant(1); // SetWindowPos param - not all values can be NonNullHWND, so expose none of them as NonNullHWND. - /// \[[learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage#parameters)\] + /// \[[microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage#parameters)\] /// `HWND_BROADCAST = 0xFFFF` /// /// Can be passed to [`SendMessage`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage#parameters) etc. as