winit-core: drop broken docs

Generally, winit-core doesn't know about underlying platforms, though,
some general information which will true for any implementation was
left in place.
This commit is contained in:
Kirill Chibisov 2025-05-03 21:25:22 +09:00
parent 276597e009
commit cf5e422dc8
10 changed files with 29 additions and 100 deletions

View file

@ -132,6 +132,8 @@ impl EventLoop {
/// Run the application with the event loop on the calling thread.
///
/// The `app` is dropped when the event loop is shut down.
///
/// ## Event loop flow
///
/// This function internally handles the different parts of a traditional event-handling loop.

View file

@ -284,6 +284,7 @@ impl WindowExtIOS for dyn Window + '_ {
}
}
/// Ios specific window attributes.
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WindowAttributesIos {
pub(crate) scale_factor: Option<f64>,
@ -294,7 +295,6 @@ pub struct WindowAttributesIos {
pub(crate) preferred_screen_edges_deferring_system_gestures: ScreenEdge,
}
/// Additional methods on [`WindowAttributes`] that are specific to iOS.
impl WindowAttributesIos {
/// Sets the [`contentScaleFactor`] of the underlying [`UIWindow`] to `scale_factor`.
///

View file

@ -294,7 +294,7 @@ pub enum ActivationPolicy {
Prohibited,
}
/// [`WindowAttributes`] that are specific to MacOS.
/// Window attributes that are specific to MacOS.
///
/// **Note:** Properties dealing with the titlebar will be overwritten by the
/// [`WindowAttributes::with_decorations`] method:
@ -303,6 +303,8 @@ pub enum ActivationPolicy {
/// - `with_titlebar_hidden`
/// - `with_titlebar_buttons_hidden`
/// - `with_fullsize_content_view`
///
/// [`WindowAttributes::with_decorations`]: crate::window::WindowAttributes::with_decorations
#[derive(Clone, Debug, PartialEq)]
pub struct WindowAttributesMacOS {
pub(crate) movable_by_window_background: bool,

View file

@ -13,9 +13,9 @@
//! yourself.
//!
//! [canvas]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement
//! [with_canvas]: WindowAttributesExtWeb::with_canvas
//! [with_canvas]: WindowAttributesWeb::with_canvas
//! [get]: WindowExtWeb::canvas
//! [insert]: WindowAttributesExtWeb::with_append
//! [insert]: WindowAttributesWeb::with_append
#![cfg_attr(not(web_platform), doc = "[wasm_bindgen]: https://docs.rs/wasm-bindgen")]
//! [Rust and WebAssembly book]: https://rustwasm.github.io/book
//!
@ -139,7 +139,7 @@ pub struct WindowAttributesWeb {
impl WindowAttributesWeb {
/// Pass an [`HtmlCanvasElement`] to be used for this [`Window`]. If [`None`],
/// [`WindowAttributes::default()`] will create one.
/// the default one will be created.
///
/// In any case, the canvas won't be automatically inserted into the Web page.
///

View file

@ -242,7 +242,7 @@ pub trait WindowExtWindows {
///
/// A window must be enabled before it can be activated.
/// If an application has create a modal dialog box by disabling its owner window
/// (as described in [`WindowAttributesExtWindows::with_owner_window`]), the application must
/// (as described in [`WindowAttributesWindows::with_owner_window`]), the application must
/// enable the owner window before destroying the dialog box.
/// Otherwise, another window will receive the keyboard focus and be activated.
///
@ -502,6 +502,8 @@ impl WindowAttributesWindows {
/// - An owned window is hidden when its owner is minimized.
///
/// For more information, see <https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#owned-windows>
///
/// [`WindowAttributes::with_parent_window`]: crate::window::WindowAttributes::with_parent_window
pub fn with_owner_window(mut self, parent: HWND) -> Self {
self.owner = Some(parent);
self
@ -516,6 +518,8 @@ impl WindowAttributesWindows {
/// Note: Dark mode cannot be supported for win32 menus, it's simply not possible to change how
/// the menus look. If you use this, it is recommended that you combine it with
/// `with_theme(Some(Theme::Light))` to avoid a jarring effect.
#[rustfmt::skip]
///
#[cfg_attr(
windows_platform,
doc = "[`CreateMenu`]: windows_sys::Win32::UI::WindowsAndMessaging::CreateMenu"