Remove feature description in FEATURES.md (#3479)
It easily becomes out of date.
This commit is contained in:
parent
4d2a0dd2b3
commit
35379f305a
5 changed files with 40 additions and 220 deletions
34
src/event.rs
34
src/event.rs
|
|
@ -175,18 +175,23 @@ pub enum WindowEvent {
|
|||
/// The window has been destroyed.
|
||||
Destroyed,
|
||||
|
||||
/// A file has been dropped into the window.
|
||||
///
|
||||
/// When the user drops multiple files at once, this event will be emitted for each file
|
||||
/// separately.
|
||||
DroppedFile(PathBuf),
|
||||
|
||||
/// A file is being hovered over the window.
|
||||
///
|
||||
/// When the user hovers multiple files at once, this event will be emitted for each file
|
||||
/// separately.
|
||||
HoveredFile(PathBuf),
|
||||
|
||||
/// A file has been dropped into the window.
|
||||
///
|
||||
/// When the user drops multiple files at once, this event will be emitted for each file
|
||||
/// separately.
|
||||
///
|
||||
/// The support for this is known to be incomplete, see [#720] for more
|
||||
/// information.
|
||||
///
|
||||
/// [#720]: https://github.com/rust-windowing/winit/issues/720
|
||||
DroppedFile(PathBuf),
|
||||
|
||||
/// A file was hovered, but has exited the window.
|
||||
///
|
||||
/// There will be a single `HoveredFileCancelled` event triggered even if multiple files were
|
||||
|
|
@ -207,6 +212,7 @@ pub enum WindowEvent {
|
|||
/// - **Windows:** The shift key overrides NumLock. In other words, while shift is held down,
|
||||
/// numpad keys act as if NumLock wasn't active. When this is used, the OS sends fake key
|
||||
/// events which are not marked as `is_synthetic`.
|
||||
/// - **iOS:** Unsupported.
|
||||
KeyboardInput {
|
||||
device_id: Option<DeviceId>,
|
||||
event: KeyEvent,
|
||||
|
|
@ -410,10 +416,18 @@ pub enum WindowEvent {
|
|||
|
||||
/// Touchpad pressure event.
|
||||
///
|
||||
/// At the moment, only supported on Apple forcetouch-capable macbooks.
|
||||
/// The parameters are: pressure level (value between 0 and 1 representing how hard the
|
||||
/// touchpad is being pressed) and stage (integer representing the click level).
|
||||
TouchpadPressure { device_id: Option<DeviceId>, pressure: f32, stage: i64 },
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// - **macOS**: Only supported on Apple forcetouch-capable macbooks.
|
||||
/// - **Android / iOS / Wayland / X11 / Windows / Orbital / Web:** Unsupported.
|
||||
TouchpadPressure {
|
||||
device_id: Option<DeviceId>,
|
||||
/// Value between 0 and 1 representing how hard the touchpad is being
|
||||
/// pressed.
|
||||
pressure: f32,
|
||||
/// Represents the click level.
|
||||
stage: i64,
|
||||
},
|
||||
|
||||
/// The window's scale factor has changed.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -1,18 +1,12 @@
|
|||
//! Types useful for interacting with a user's monitors.
|
||||
//!
|
||||
//! If you want to get basic information about a monitor, you can use the
|
||||
//! [`MonitorHandle`] type. This is retrieved from one of the following
|
||||
//! methods, which return an iterator of [`MonitorHandle`]:
|
||||
//! - [`ActiveEventLoop::available_monitors`][crate::event_loop::ActiveEventLoop::available_monitors].
|
||||
//! - [`Window::available_monitors`][crate::window::Window::available_monitors].
|
||||
use std::num::{NonZeroU16, NonZeroU32};
|
||||
|
||||
use crate::dpi::{PhysicalPosition, PhysicalSize};
|
||||
use crate::platform_impl;
|
||||
|
||||
/// Describes a fullscreen video mode of a monitor.
|
||||
/// A handle to a fullscreen video mode of a specific monitor.
|
||||
///
|
||||
/// Can be acquired with [`MonitorHandle::video_modes`].
|
||||
/// This can be acquired with [`MonitorHandle::video_modes`].
|
||||
#[derive(Clone, PartialEq, Eq, Hash)]
|
||||
pub struct VideoModeHandle {
|
||||
pub(crate) video_mode: platform_impl::VideoModeHandle,
|
||||
|
|
@ -92,7 +86,15 @@ impl std::fmt::Display for VideoModeHandle {
|
|||
|
||||
/// Handle to a monitor.
|
||||
///
|
||||
/// Allows you to retrieve information about a given monitor and can be used in [`Window`] creation.
|
||||
/// Allows you to retrieve basic information and metadata about a monitor.
|
||||
///
|
||||
/// Can be used in [`Window`] creation to place the window on a specific
|
||||
/// monitor.
|
||||
///
|
||||
/// This can be retrieved from one of the following methods, which return an
|
||||
/// iterator of [`MonitorHandle`]s:
|
||||
/// - [`ActiveEventLoop::available_monitors`](crate::event_loop::ActiveEventLoop::available_monitors).
|
||||
/// - [`Window::available_monitors`](crate::window::Window::available_monitors).
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@ pub trait Window: AsAny + Send + Sync {
|
|||
/// - **Web / iOS / Android:** Unsupported. Always returns [`WindowButtons::all`].
|
||||
fn enabled_buttons(&self) -> WindowButtons;
|
||||
|
||||
/// Sets the window to minimized or back
|
||||
/// Minimize the window, or put it back from the minimized state.
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
|
|
@ -945,7 +945,7 @@ pub trait Window: AsAny + Send + Sync {
|
|||
/// - **iOS / Android / Web:** Unsupported.
|
||||
fn is_maximized(&self) -> bool;
|
||||
|
||||
/// Sets the window to fullscreen or back.
|
||||
/// Set the window's fullscreen state.
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
|
|
@ -1433,6 +1433,9 @@ impl From<ResizeDirection> for CursorIcon {
|
|||
/// Fullscreen modes.
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum Fullscreen {
|
||||
/// This changes the video mode of the monitor for fullscreen windows and,
|
||||
/// if applicable, captures the monitor for exclusive use by this
|
||||
/// application.
|
||||
Exclusive(VideoModeHandle),
|
||||
|
||||
/// Providing `None` to `Borderless` will fullscreen on the current monitor.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue