Skip to content

Commit 35379f3

Browse files
authored
Remove feature description in FEATURES.md (#3479)
It easily becomes out of date.
1 parent 4d2a0dd commit 35379f3

File tree

5 files changed

+40
-220
lines changed

5 files changed

+40
-220
lines changed

.github/PULL_REQUEST_TEMPLATE.md

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
- [ ] Added an entry to the `changelog` module if knowledge of this change could be valuable to users
33
- [ ] Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
44
- [ ] Created or updated an example program if it would help users understand this functionality
5-
- [ ] Updated [feature matrix](https://github.com/rust-windowing/winit/blob/master/FEATURES.md), if new features were added or implemented

FEATURES.md

-198
Original file line numberDiff line numberDiff line change
@@ -47,201 +47,3 @@ through the implementation work necessary to function on all platforms. When one
4747
gets implemented across all platforms, a PR can be opened to upgrade the feature to a core feature.
4848
If that gets accepted, the platform-specific functions get deprecated and become permanently
4949
exposed through the core, cross-platform API.
50-
51-
# Features
52-
53-
## Extending this section
54-
55-
If your PR makes notable changes to Winit's features, please update this section as follows:
56-
57-
- If your PR adds a new feature, add a brief description to the relevant section. If the feature is a core
58-
feature, add a row to the feature matrix and describe what platforms the feature has been implemented on.
59-
60-
- If your PR begins a new API rework, add a row to the `Pending API Reworks` table. If the PR implements the
61-
API rework on all relevant platforms, please move it to the `Completed API Reworks` table.
62-
63-
- If your PR implements an already-existing feature on a new platform, either mark the feature as *completed*,
64-
or mark it as *mostly completed* and link to an issue describing the problems with the implementation.
65-
66-
## Core
67-
68-
### Windowing
69-
- **Window initialization**: Winit allows the creation of a window
70-
- **Providing pointer to init OpenGL**: Winit provides the necessary pointers to initialize a working opengl context
71-
- **Providing pointer to init Vulkan**: Same as OpenGL but for Vulkan
72-
- **Window decorations**: The windows created by winit are properly decorated, and the decorations can
73-
be deactivated
74-
- **Window decorations toggle**: Decorations can be turned on or off after window creation
75-
- **Window resizing**: The windows created by winit can be resized and generate the appropriate events
76-
when they are. The application can precisely control its window size if desired.
77-
- **Window resize increments**: When the window gets resized, the application can choose to snap the window's
78-
size to specific values.
79-
- **Window transparency**: Winit allows the creation of windows with a transparent background.
80-
- **Window maximization**: The windows created by winit can be maximized upon creation.
81-
- **Window maximization toggle**: The windows created by winit can be maximized and unmaximized after
82-
creation.
83-
- **Window minimization**: The windows created by winit can be minimized after creation.
84-
- **Fullscreen**: The windows created by winit can be put into fullscreen mode.
85-
- **Fullscreen toggle**: The windows created by winit can be switched to and from fullscreen after
86-
creation.
87-
- **Exclusive fullscreen**: Winit allows changing the video mode of the monitor
88-
for fullscreen windows and, if applicable, captures the monitor for exclusive
89-
use by this application.
90-
- **HiDPI support**: Winit assists developers in appropriately scaling HiDPI content.
91-
- **Popup / modal windows**: Windows can be created relative to the client area of other windows, and parent
92-
windows can be disabled in favor of popup windows. This feature also guarantees that popup windows
93-
get drawn above their owner.
94-
95-
96-
### System Information
97-
- **Monitor list**: Retrieve the list of monitors and their metadata, including which one is primary.
98-
- **Video mode query**: Monitors can be queried for their supported fullscreen video modes (consisting of resolution, refresh rate, and bit depth).
99-
100-
### Input Handling
101-
- **Mouse events**: Generating mouse events associated with pointer motion, click, and scrolling events.
102-
- **Mouse set location**: Forcibly changing the location of the pointer.
103-
- **Cursor locking**: Locking the cursor inside the window so it cannot move.
104-
- **Cursor confining**: Confining the cursor to the window bounds so it cannot leave them.
105-
- **Cursor icon**: Changing the cursor icon or hiding the cursor.
106-
- **Cursor image**: Changing the cursor to your own image.
107-
- **Cursor hittest**: Handle or ignore mouse events for a window.
108-
- **Touch events**: Single-touch events.
109-
- **Touch pressure**: Touch events contain information about the amount of force being applied.
110-
- **Multitouch**: Multi-touch events, including cancellation of a gesture.
111-
- **Keyboard events**: Properly processing keyboard events using the user-specified keymap and
112-
translating keypresses into UTF-8 characters, handling dead keys and IMEs.
113-
- **Drag & Drop**: Dragging content into winit, detecting when content enters, drops, or if the drop is cancelled.
114-
- **Raw Device Events**: Capturing input from input devices without any OS filtering.
115-
- **Gamepad/Joystick events**: Capturing input from gamepads and joysticks.
116-
- **Device movement events**: Capturing input from the device gyroscope and accelerometer.
117-
118-
## Platform
119-
### Windows
120-
* Setting the name of the internal window class
121-
* Setting the taskbar icon
122-
* Setting the parent window
123-
* Setting a menu bar
124-
* `WS_EX_NOREDIRECTIONBITMAP` support
125-
* Theme the title bar according to Windows 10 Dark Mode setting or set a preferred theme
126-
* Changing a system-drawn backdrop
127-
* Setting the window border color
128-
* Setting the title bar background color
129-
* Setting the title color
130-
* Setting the corner rounding preference
131-
132-
### macOS
133-
* Window activation policy
134-
* Window movable by background
135-
* Transparent titlebar
136-
* Hidden titlebar
137-
* Hidden titlebar buttons
138-
* Full-size content view
139-
* Accepts first mouse
140-
* Set a preferred theme and get current theme.
141-
142-
### Unix
143-
* Window urgency
144-
* X11 Window Class
145-
* X11 Override Redirect Flag
146-
* GTK Theme Variant
147-
* Base window size
148-
* Setting the X11 parent window
149-
150-
### iOS
151-
* Get the `UIScreen` object pointer
152-
* Setting the `UIView` hidpi factor
153-
* Valid orientations
154-
* Home indicator visibility
155-
* Status bar visibility and style
156-
* Deferring system gestures
157-
* Getting the preferred video mode
158-
159-
### Web
160-
* Get if the systems preferred color scheme is "dark"
161-
162-
## Compatibility Matrix
163-
164-
Legend:
165-
166-
- ✔️: Works as intended
167-
- ▢: Mostly works, but some bugs are known
168-
- ❌: Missing feature or large bugs making it unusable
169-
- **N/A**: Not applicable for this platform
170-
- ❓: Unknown status
171-
172-
### Windowing
173-
|Feature |Windows|MacOS |Linux x11 |Linux Wayland |Android|iOS |Web |Redox OS|
174-
|-------------------------------- | ----- | ---- | ------- | ----------- | ----- | ----- | -------- | ------ |
175-
|Window initialization |✔️ |✔️ |[#5] |✔️ |[#33]|[#33] |✔️ |✔️ |
176-
|Providing pointer to init OpenGL |✔️ |✔️ |✔️ |✔️ |✔️ |✔️ |**N/A**|✔️ |
177-
|Providing pointer to init Vulkan |✔️ |✔️ |✔️ |✔️ |✔️ ||**N/A**|**N/A** |
178-
|Window decorations |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|**N/A**|✔️ |
179-
|Window decorations toggle |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|**N/A**|**N/A** |
180-
|Window resizing |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|✔️ |✔️ |
181-
|Window resize increments |✔️ |✔️ |✔️ ||**N/A**|**N/A**|**N/A**|**N/A** |
182-
|Window transparency |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|N/A |✔️ |
183-
|Window blur ||||✔️ |**N/A**|**N/A**|N/A ||
184-
|Window maximization |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|**N/A**|**N/A** |
185-
|Window maximization toggle |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|**N/A**|**N/A** |
186-
|Window minimization |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|**N/A**|**N/A** |
187-
|Fullscreen |✔️ |✔️ |✔️ |✔️ |**N/A**|✔️ |✔️ |**N/A** |
188-
|Fullscreen toggle |✔️ |✔️ |✔️ |✔️ |**N/A**|✔️ |✔️ |**N/A** |
189-
|Exclusive fullscreen |✔️ |✔️ |✔️ |**N/A** ||✔️ |**N/A**|**N/A** |
190-
|HiDPI support |✔️ |✔️ |✔️ |✔️ |✔️ |✔️ |✔️ ||
191-
|Popup windows |||||||**N/A**|**N/A** |
192-
193-
### System information
194-
|Feature |Windows|MacOS |Linux x11|Linux Wayland|Android|iOS |Web |Redox OS|
195-
|---------------- | ----- | ---- | ------- | ----------- | ----- | ------- | -------- | ------ |
196-
|Monitor list |✔️ |✔️ |✔️ |✔️ |✔️ |✔️ |**N/A**||
197-
|Video mode query |✔️ |✔️ |✔️ |✔️ |✔️ |✔️ |**N/A**||
198-
199-
### Input handling
200-
|Feature |Windows |MacOS |Linux x11|Linux Wayland|Android|iOS |Web |Redox OS|
201-
|----------------------- | ----- | ---- | ------- | ----------- | ----- | ----- | -------- | ------ |
202-
|Mouse events |✔️ |[#63] |✔️ |✔️ |**N/A**|**N/A**|✔️ |✔️ |
203-
|Mouse set location |✔️ |✔️ |✔️ |✔️(when locked) |**N/A**|**N/A**|**N/A**|**N/A** |
204-
|Cursor locking ||✔️ ||✔️ |**N/A**|**N/A**|✔️ ||
205-
|Cursor confining |✔️ ||✔️ |✔️ |**N/A**|**N/A**|||
206-
|Cursor icon |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|✔️ |**N/A** |
207-
|Cursor image |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|✔️ |**N/A** |
208-
|Cursor hittest |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|||
209-
|Touch events |✔️ ||✔️ |✔️ |✔️ |✔️ |✔️ |**N/A** |
210-
|Touch pressure |✔️ |||||✔️ |✔️ |**N/A** |
211-
|Multitouch |✔️ ||✔️ |✔️ |✔️ |✔️ ||**N/A** |
212-
|Keyboard events |✔️ |✔️ |✔️ |✔️ |✔️ ||✔️ |✔️ |
213-
|Drag & Drop |[#720] |[#720] |[#720] |[#720] |**N/A**|**N/A**||**N/A** |
214-
|Raw Device Events |[#750] |[#750] |[#750] |||||**N/A** |
215-
|Gamepad/Joystick events |[#804] |||||||**N/A** |
216-
|Device movement events ||||||||**N/A** |
217-
|Drag window with cursor |✔️ |✔️ |✔️ |✔️ |**N/A**|**N/A**|**N/A** |**N/A** |
218-
|Resize with cursor |✔️ ||✔️ |✔️ |**N/A**|**N/A**|**N/A** |**N/A** |
219-
220-
### Pending API Reworks
221-
Changes in the API that have been agreed upon but aren't implemented across all platforms.
222-
223-
|Feature |Windows|MacOS |Linux x11|Linux Wayland|Android|iOS |Web |Redox OS|
224-
|------------------------------ | ----- | ---- | ------- | ----------- | ----- | ----- | -------- | ------ |
225-
|New API for HiDPI ([#315] [#319]) |✔️ |✔️ |✔️ |✔️ |✔️ |✔️ |||
226-
|Event Loop 2.0 ([#459]) |✔️ |✔️ |✔️ |✔️ |✔️ |✔️ ||✔️ |
227-
|Keyboard Input 2.0 ([#753]) |✔️ |✔️ |✔️ |✔️ |✔️ ||✔️ |✔️ |
228-
229-
### Completed API Reworks
230-
|Feature |Windows|MacOS |Linux x11|Linux Wayland|Android|iOS |Web |Redox OS|
231-
|------------------------------ | ----- | ---- | ------- | ----------- | ----- | ----- | -------- | ------ |
232-
233-
[#165]: https://github.com/rust-windowing/winit/issues/165
234-
[#219]: https://github.com/rust-windowing/winit/issues/219
235-
[#242]: https://github.com/rust-windowing/winit/issues/242
236-
[#306]: https://github.com/rust-windowing/winit/issues/306
237-
[#315]: https://github.com/rust-windowing/winit/issues/315
238-
[#319]: https://github.com/rust-windowing/winit/issues/319
239-
[#33]: https://github.com/rust-windowing/winit/issues/33
240-
[#459]: https://github.com/rust-windowing/winit/issues/459
241-
[#5]: https://github.com/rust-windowing/winit/issues/5
242-
[#63]: https://github.com/rust-windowing/winit/issues/63
243-
[#720]: https://github.com/rust-windowing/winit/issues/720
244-
[#721]: https://github.com/rust-windowing/winit/issues/721
245-
[#750]: https://github.com/rust-windowing/winit/issues/750
246-
[#753]: https://github.com/rust-windowing/winit/issues/753
247-
[#804]: https://github.com/rust-windowing/winit/issues/804

src/event.rs

+24-10
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,23 @@ pub enum WindowEvent {
175175
/// The window has been destroyed.
176176
Destroyed,
177177

178-
/// A file has been dropped into the window.
179-
///
180-
/// When the user drops multiple files at once, this event will be emitted for each file
181-
/// separately.
182-
DroppedFile(PathBuf),
183-
184178
/// A file is being hovered over the window.
185179
///
186180
/// When the user hovers multiple files at once, this event will be emitted for each file
187181
/// separately.
188182
HoveredFile(PathBuf),
189183

184+
/// A file has been dropped into the window.
185+
///
186+
/// When the user drops multiple files at once, this event will be emitted for each file
187+
/// separately.
188+
///
189+
/// The support for this is known to be incomplete, see [#720] for more
190+
/// information.
191+
///
192+
/// [#720]: https://github.com/rust-windowing/winit/issues/720
193+
DroppedFile(PathBuf),
194+
190195
/// A file was hovered, but has exited the window.
191196
///
192197
/// There will be a single `HoveredFileCancelled` event triggered even if multiple files were
@@ -207,6 +212,7 @@ pub enum WindowEvent {
207212
/// - **Windows:** The shift key overrides NumLock. In other words, while shift is held down,
208213
/// numpad keys act as if NumLock wasn't active. When this is used, the OS sends fake key
209214
/// events which are not marked as `is_synthetic`.
215+
/// - **iOS:** Unsupported.
210216
KeyboardInput {
211217
device_id: Option<DeviceId>,
212218
event: KeyEvent,
@@ -410,10 +416,18 @@ pub enum WindowEvent {
410416

411417
/// Touchpad pressure event.
412418
///
413-
/// At the moment, only supported on Apple forcetouch-capable macbooks.
414-
/// The parameters are: pressure level (value between 0 and 1 representing how hard the
415-
/// touchpad is being pressed) and stage (integer representing the click level).
416-
TouchpadPressure { device_id: Option<DeviceId>, pressure: f32, stage: i64 },
419+
/// ## Platform-specific
420+
///
421+
/// - **macOS**: Only supported on Apple forcetouch-capable macbooks.
422+
/// - **Android / iOS / Wayland / X11 / Windows / Orbital / Web:** Unsupported.
423+
TouchpadPressure {
424+
device_id: Option<DeviceId>,
425+
/// Value between 0 and 1 representing how hard the touchpad is being
426+
/// pressed.
427+
pressure: f32,
428+
/// Represents the click level.
429+
stage: i64,
430+
},
417431

418432
/// The window's scale factor has changed.
419433
///

src/monitor.rs

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
//! Types useful for interacting with a user's monitors.
2-
//!
3-
//! If you want to get basic information about a monitor, you can use the
4-
//! [`MonitorHandle`] type. This is retrieved from one of the following
5-
//! methods, which return an iterator of [`MonitorHandle`]:
6-
//! - [`ActiveEventLoop::available_monitors`][crate::event_loop::ActiveEventLoop::available_monitors].
7-
//! - [`Window::available_monitors`][crate::window::Window::available_monitors].
82
use std::num::{NonZeroU16, NonZeroU32};
93

104
use crate::dpi::{PhysicalPosition, PhysicalSize};
115
use crate::platform_impl;
126

13-
/// Describes a fullscreen video mode of a monitor.
7+
/// A handle to a fullscreen video mode of a specific monitor.
148
///
15-
/// Can be acquired with [`MonitorHandle::video_modes`].
9+
/// This can be acquired with [`MonitorHandle::video_modes`].
1610
#[derive(Clone, PartialEq, Eq, Hash)]
1711
pub struct VideoModeHandle {
1812
pub(crate) video_mode: platform_impl::VideoModeHandle,
@@ -92,7 +86,15 @@ impl std::fmt::Display for VideoModeHandle {
9286

9387
/// Handle to a monitor.
9488
///
95-
/// Allows you to retrieve information about a given monitor and can be used in [`Window`] creation.
89+
/// Allows you to retrieve basic information and metadata about a monitor.
90+
///
91+
/// Can be used in [`Window`] creation to place the window on a specific
92+
/// monitor.
93+
///
94+
/// This can be retrieved from one of the following methods, which return an
95+
/// iterator of [`MonitorHandle`]s:
96+
/// - [`ActiveEventLoop::available_monitors`](crate::event_loop::ActiveEventLoop::available_monitors).
97+
/// - [`Window::available_monitors`](crate::window::Window::available_monitors).
9698
///
9799
/// ## Platform-specific
98100
///

src/window.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ pub trait Window: AsAny + Send + Sync {
909909
/// - **Web / iOS / Android:** Unsupported. Always returns [`WindowButtons::all`].
910910
fn enabled_buttons(&self) -> WindowButtons;
911911

912-
/// Sets the window to minimized or back
912+
/// Minimize the window, or put it back from the minimized state.
913913
///
914914
/// ## Platform-specific
915915
///
@@ -945,7 +945,7 @@ pub trait Window: AsAny + Send + Sync {
945945
/// - **iOS / Android / Web:** Unsupported.
946946
fn is_maximized(&self) -> bool;
947947

948-
/// Sets the window to fullscreen or back.
948+
/// Set the window's fullscreen state.
949949
///
950950
/// ## Platform-specific
951951
///
@@ -1433,6 +1433,9 @@ impl From<ResizeDirection> for CursorIcon {
14331433
/// Fullscreen modes.
14341434
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
14351435
pub enum Fullscreen {
1436+
/// This changes the video mode of the monitor for fullscreen windows and,
1437+
/// if applicable, captures the monitor for exclusive use by this
1438+
/// application.
14361439
Exclusive(VideoModeHandle),
14371440

14381441
/// Providing `None` to `Borderless` will fullscreen on the current monitor.

0 commit comments

Comments
 (0)