Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[META] Feature parity between platforms #252

Closed
elinorbgr opened this issue Aug 4, 2017 · 23 comments
Closed

[META] Feature parity between platforms #252

elinorbgr opened this issue Aug 4, 2017 · 23 comments
Labels
S - meta Project governance S - platform parity Unintended platform differences

Comments

@elinorbgr
Copy link
Contributor

elinorbgr commented Aug 4, 2017

Outdated - please refer to FEATURES.md.

This is intended to be a meta-issue to track feature parity between the various backends.

This is a first draft, please all who have the right to, update this message with what you find missing (be it a feature I forgot or the status of a feature for a platform or a platform entirely)

Each section includes a collapsed description of the features it lists.

Legend:

  • ✔️ : Works as intended
  • ▢ : Mostly works but some bugs are known
  • ❌ : Missing feature or large bugs making it unusable
  • N/A : Not applicable for this platform
  • ❓ : Unknown status

Display features

Feature Windows MacOS Linux x11 Linux Wayland Android iOS Emscripten
Window initialization ✔️ ✔️ #5 ✔️ #33 #33
Providing pointer to init OpenGL ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Providing pointer to init vulkan ✔️ ✔️ ✔️ ✔️ ✔️ N/A
Window decorations ✔️ ✔️ ✔️ #306 N/A N/A N/A
Window decorations toggle ✔️ ✔️ ✔️ ✔️ N/A N/A N/A
Window resizing ✔️ #219 ✔️ #306 N/A N/A
Window transparency #260 ✔️ ✔️ ✔️ N/A N/A N/A
Window maximization ✔️ ✔️ ✔️ ✔️ N/A N/A N/A
Window maximization toggle ✔️ ✔️ ✔️ ✔️ N/A N/A N/A
Fullscreen ✔️ ✔️ ✔️ ✔️ N/A N/A
Fullscreen toggle ✔️ ✔️ ✔️ ✔️ N/A N/A
HiDPI support #105 ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Expand details of features
  • Window initialization: Winit allows the creation of a window
  • Pointer to OpenGL: Winit provides the necessary pointers to initialize a working opengl context
  • Pointer to Vulkan: Same as OpenGL but for Vulkan
  • Window decorations: The windows created by winit are properly decorated, and the decorations can be deactivated
  • Window decorations toggle: Decorations can be turned on or off after window creation
  • Window resizing: The windows created by winit can be resized and generate the appropriate events when they are. The application can precisely control its window size if wanted.
  • Window transaprency: Winit allows the creation of windows with a transparent background
  • Window maximization: The windows created by winit can be maximized upon creation.
  • Window maximization toggle: The windows created by winit can be maximized and unmaximized after creation.
  • Fullscreen: The windows created by winit support being fullscreen.
  • Fullscreen toggle: The windows created by winit can be switched to and from fullscreen after creation.

System information

Feature Windows MacOS Linux x11 Linux Wayland Android iOS Emscripten
Monitor list ✔️ ✔️ ✔️ ✔️ N/A N/A N/A
Expand details of features
  • Monitor list: Retrieve the list of monitors and their metada, including which one is primary is applicable

Input handling

Feature Windows MacOS Linux x11 Linux Wayland Android iOS Emscripten
Mouse events ✔️ #63 ✔️ ✔️ N/A N/A ✔️
Mouse set location ✔️ ✔️ ✔️ N/A N/A N/A
Cursor grab ✔️ #165 #242 #306 N/A N/A ✔️
Cursor image ✔️ ✔️ ✔️ #306 N/A N/A
Touch events ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Multitouch ✔️ ✔️
Keyboard events ✔️ ✔️ ✔️ ✔️ ✔️
Drag&Drop ✔️ ✔️ ✔️ #306
Clipboard #162
Raw Device Events
Expand details of features
  • Mouse events: Winit generates mouse events associated with pointer motion, click, and scrolling events
  • Mouse set location: Winit can forcibly change the location of the pointer
  • Cursor grab: Winit allows a grad of the cursor on a window, and subsequently generates device-type relative motion events for the grabbed cursor
  • Cursor image: Winit can change an set the cursor image, or hide the cursor
  • Touch events: Winit supports single-touch events
  • Multitouch: Winit supports multi-touch events, including cancellation of a gesture
  • Keyboard events: Winit properly forwards keyboard events, using the proper keymap, and includes the interpretation of entered text as utf8, handling dead keys and character composing.
  • Drag&Drop: Winit supports dragging content to winit, detecting when content enters, drops, or if the drop is cancelled.
  • Clipboard: Winit supports copy-pasting content to and from winit.

Pending API Reworks

Here are listed Changes in the API that have been merged but are still stubbed out in some platforms

API Change Windows MacOS Linux x11 Linux Wayland Android iOS Emscripten
New API for HiDPI (#315 #319) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
@elinorbgr elinorbgr added the S - enhancement Wouldn't this be the coolest? label Aug 4, 2017
@tiby312
Copy link
Contributor

tiby312 commented Aug 24, 2017

multitouch included in Touch events?

@elinorbgr
Copy link
Contributor Author

Not necessarily, I'll add a line for this

@LPGhatguy
Copy link
Contributor

Is there a clear definition of what the intended function is for each of these features?

I know there's still some disparity between scaled and unscaled units, and whether window decorations should be included in window size. Platforms like Windows have #196.

@alexheretic
Copy link
Contributor

Maybe we should have a clear test case for each feature so people can help remove the ❓s.

Ie Keyboard keymap conversion

Test two contradictory layouts and ensure typing sends the correctly mapped characters in WindowEvent::ReceivedCharacter events.

Which btw works in Linux x11.

@elinorbgr
Copy link
Contributor Author

I've introduced more detailed explanations of what the features represent, as well as expanded the scope of the tables to track API changes that are currently in the works.

Also, I've started reporting in this tables the various still-open issues on the repo when applicable.

@tomaka @mitchmindtree @Ralith : please could you have a look to fill in what you know works/don't work on the plaforms you are familiar with, as well a correct any mistake I would have made. I suggest we try our best to keep this table up to date in waiting for a better solution.

@jwilm I know with alacritty you have a decently large user-base on MacOS and Linux, could you help us fill in the blanks ? Thanks.

@kryptan
Copy link
Contributor

kryptan commented Oct 26, 2017

Emscripten is missing from this table

@elinorbgr
Copy link
Contributor Author

Indeed, I've added an emscripten. Are you using it ? Do you have some feedback about what works and what don't ?

@kryptan
Copy link
Contributor

kryptan commented Oct 26, 2017

@vberger I haven't yet used it but I noticed that it is missing support for multiple canvases.

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Nov 6, 2017

Can we add a distinction to this issue like so:

✔️ Working, no known problems
☑️ Working, with minor problems
❌ Feature is either missing or has bugs so severe the feature might as well be missing.

It'd just be helpful to have better clarity on where the major problems are.

@elinorbgr
Copy link
Contributor Author

This is a good idea, I'll integrate this as soon as I can find the time to do it.

@elinorbgr
Copy link
Contributor Author

Done.

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Nov 7, 2017

Couple of small updates based on personal experience with winit:

Windows keyboard events are working. We use them in the input handler for Amethyst.

Windows, Mac, and Linux X11 Raw device events are working, so long as raw device only includes mouse movement.

Windows Cursor image and Cursor grab should be working. I haven't tested this myself but the code is written and I see no problems with it.

@francesca64
Copy link
Member

Currently clipboard support is listed as part of the Drag&Drop umbrella, but seeing as drag and drop is implemented on a bunch of platforms whereas winit doesn't even have an API for clipboard handling yet (unless I'm missing something), I think it would be more helpful to have them as separate rows.

@mcoffin
Copy link

mcoffin commented Dec 22, 2017

#371 would allow for key-repitition on wayland

@newpavlov
Copy link

Shouldn't "providing pointer to init vulkan" be changed for macOS and iOS as it's not anymore N/A?

@sodiumjoe
Copy link
Contributor

I believe both "Window decorations toggle" and "Window decorations" will be solved for macos once #408 is merged.

@sodiumjoe
Copy link
Contributor

I was mistaken about what "Window decorations toggle" meant, but #408 has merged so "Window decorations" for macos can be ✔️

@yvt
Copy link
Contributor

yvt commented Apr 10, 2018

"providing pointer to init vulkan” is working perfectly on macOS. It’s a little bit trickier compared to other platforms since you have to set up a CAMetalLayer by yourself. I’ll contribute some code to ash’s example app when I have time.

@edwin0cheng
Copy link
Contributor

#457 implemented these features on Windows:

  • "Window decorations toggle" ✔️
  • "Window maximization" ✔️
  • "Window maximization toggle" ✔️
  • "Fullscreen" ✔️ (This should work now)
  • "Fullscreen toggle" ✔️

@francesca64
Copy link
Member

#465 gives us fullscreen, maximization, and decoration toggling on macOS. At present, there's the caveat that a window will only be fullscreen'd to whatever monitor presently has the keyboard focus (this is also the monitor returned by get_current_monitor), though that will be fixed pending the necessary additions to core-foundation.

@francesca64 francesca64 added S - meta Project governance S - platform parity Unintended platform differences and removed S - enhancement Wouldn't this be the coolest? labels May 6, 2018
@mtak-
Copy link
Contributor

mtak- commented Nov 8, 2018

EventsLoopProxy is worth adding to the list. I know it's currently unimplemented on iOS.

@francesca64
Copy link
Member

EventsLoopProxy is also unimplemented on Emscripten, and seems to be present on all other platforms. Though, I guess that should be added in #695 instead (and I'm also not sure what category here it would fit under!)

@Osspial
Copy link
Contributor

Osspial commented Apr 24, 2019

Closing since #695 was merged. That is not to say that the issues addressed here aren't problems, but thisn't the proper place for tracking them.

@Osspial Osspial closed this as completed Apr 24, 2019
tmfink pushed a commit to tmfink/winit that referenced this issue Jan 5, 2022
madsmtm added a commit to madsmtm/winit that referenced this issue Jun 11, 2022
* refactor(windows): `begin_resize_drag` now similar to gtk's (rust-windowing#200)

* refactor(windows): `begin_resize_drag` now similart to gtk's

* fix

* feat(linux): skipping taskbar will now also skip pager (rust-windowing#198)

* refactor(linux): clean dummy device_id (rust-windowing#195)

* refactor(linux): clean dummy device_id

* fmt

* feat(linux): allow resizing undecorated window using touch (rust-windowing#199)

* refactor(windows): only skip taskbar if needed when `set_visible` is called (rust-windowing#196)

* fix: increase borderless resizing inset (rust-windowing#202)

* fix: increase borderless resizing inset

* update some comments

* Replace winapi with windows crate bindings shared with WRY (rust-windowing#206)

* fix(deps): update rust crate libayatana-appindicator to 0.1.6 (rust-windowing#190)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Add Windows crate and webview2-com-sys bindings

* Initial port to webview2-com-sys

* Finish conversion and remove winapi

* Fix renamed lint warning

* Fix all match arms referencing const variables

* Put back the assert instead of expect

* Point to the published version of webview2-com-sys

* Cleanup slightly weird BOOL handling

* Replace mem::zeroed with Default::default

* Add a summary in .changes

* Remove extra projects not in config.json

* Fix clippy warnings

* Update to 32-bit compatible webview2-com-sys

* Better fix for merge conflict

* Fix clippy errors on Windows

* Use path prefix to prevent variable shadowing

* Fix Windows clippy warnings with nightly toolchain

* Fix Linux nightly/stable clippy warnings

* Fix macOS nightly/stable clippy warnings

* Put back public *mut libc::c_void for consistency

* Re-run cargo fmt

* Move call_default_window_proc to util mod

* Remove unnecessary util::to_wstring calls

* Don't repeat LRESULT expression in match arms

* Replace bitwise operations with util functions

* Cleanup more bit mask & shift with util fns

* Prefer from conversions instead of as cast

* Implement get_xbutton_wparam

* Use *mut libc::c_void for return types

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix(keyboard): add mapping for space key on Windows (rust-windowing#209)

* fix(keyboard): add mapping for space key on Windows

* change file

* feat: impl Clone for EventLoopWindowTarget (rust-windowing#211)

* chore: add `on_issue_closed.yml` (rust-windowing#214)

* Update tray dependency version (rust-windowing#217)

* Delete on_issue_closed.yml (rust-windowing#221)

* refactor(linux): event loop (rust-windowing#233)

* Use crossbeam::channel

* Fix crossbeam channel import

* Add check on poll event

* Fix deadlock when unregistering shortcut on Linux (rust-windowing#230)

* Add fullscreen monitor selection support on Linux (rust-windowing#235)

* Add fullscreen monitor support on Linux

* Add change file

* Remove todo on videomode

* Fix clippy

* Update to 2021 edition (rust-windowing#236)

* Update to 2021 edition

* Fix clippy

* Add run_return on Linux (rust-windowing#237)

* Add run_return on Linux

* Add main context

* Add run_return trait on Linux (rust-windowing#238)

* Fix: rust-windowing#239 Update webview2-com and windows crates (rust-windowing#240)

* Replace webivew2-com-sys with prebuilt windows

* Use windows utility instead of direct GetLastError

* Bump windows version and add changelog

* Run cargo fmt

* Restore inverted matches macro

* Scope constants in match arms

* Fix inverted null check

* Update src/platform_impl/windows/util.rs

Co-authored-by: Amr Bashir <48618675+amrbashir@users.noreply.github.com>

* Use env_logger instead of simple_logger (rust-windowing#241)

* Use env_logger instead of simple_logger

* Make clippy happy

* Cherry pick commits to next (rust-windowing#244)

* feat(macos): Add `unhide_application` method, closes rust-windowing#182 (rust-windowing#231)

* feat(macos): Add `unhide_application` method

* Update src/platform/macos.rs

Co-authored-by: Amr Bashir <48618675+amrbashir@users.noreply.github.com>

* Reanme to `show_application()`

* Remove broken doc link

Co-authored-by: Amr Bashir <48618675+amrbashir@users.noreply.github.com>

* feat: Allow more strings to parse to keycode (rust-windowing#229)

* feat: support accelerator key strings `,` `-` `.` `Space` `Tab` and `F13`-`F24` (rust-windowing#228)

* feat(macOS): support more accelerator key strings

* Move function keys together

* Add `,` `-` `.` `Space` `F20-F24` for Windows

* Remove support for accelerators not found in `winapi`

* Add `,` `-` `.` `Space` `F13-F24` for Linux

* Update .changes

* Add the rest for Windows

* Add the rest for Linux

* Add the rest on macOS

* Update accelerator-strings.md

* Fix git comments

Co-authored-by: Kasper <kasperkh.kh@gmail.com>
Co-authored-by: Amr Bashir <48618675+amrbashir@users.noreply.github.com>

* Add redraw events on Linux (rust-windowing#245)

* Add redraw events on Linux

* Update doc of RequestRedraw Event

* Add change file

* Fix missing menu bar on borderless window (rust-windowing#247)

Credit goes to irh's work on winit commit f2de847

* refactor: improve `set_skip_taskbar` impl on Windows (rust-windowing#250)

* fix: emit errors on parsing an invalid accelerator for string, closes rust-windowing#135 (rust-windowing#252)

* chore: update comment

* fix(linux): fix focus events not firing properly (rust-windowing#253)

* fix(linux): fix focus events not firing properly

* add changelog

* chore: update focus events error message

* chore: fmt

* fix: revert windows-rs 0.28 version bump

* fix(linux): fix native menu items (rust-windowing#256)

* chore: remove examples commited by accident

* Update `ReceivedImeText` (rust-windowing#251)

* Allow receiving text without Ime on Windows

* Avoid panic todo

* Receive text without ime on mac

* Fix CursorMoved event on Linux

* Add ReceivedImeText on Linux

This only add Simple IME from GTK for now. We should add the actual IME
from system in the future.

* Fix redraw event that causes inifinite loop (rust-windowing#260)

* Fix redraw event that causes inifinite loop

* Refactor event loop

* Remove unused function

* Add doc comment on linux's run_return

* Ignore doc test on run_return

* Add non blocking iteration on Linux (rust-windowing#261)

* Docs: SystemTrayExtWindows::remove() is gone (rust-windowing#262)

Fix docs following rust-windowing#153

* Fix busy loop on Linux (rust-windowing#265)

* Update windows crate to 0.29.0 (rust-windowing#266)

* Update to windows 0.29.0

* Add change description

* Remove clippy check (rust-windowing#267)

* refactor(windows): align util function with win32 names

* chore: update PR template

* fix(linux): fire resized & moved events on min/maximize, closes rust-windowing#219 (rust-windowing#254)

* feat(linux): implement `raw_window_handle()` (rust-windowing#269)

* chore(deps): update to raw-window-handle 0.4

* add linux raw-window-handle support

* update macos/ios/android

* fix ios

* Fix core-video-sys dependency (rust-windowing#274)

* The `cocoa` crate links to AppKit, which made the symbol `CGDisplayCreateUUIDFromDisplayID` from ApplicationServices/ColorSync (which AppKit uses internally) available to us on macOS 10.8 to 10.13. (rust-windowing#275)

However, this does not work on macOS 10.7 (where AppKit does not link to ColorSync internally). Instead of relying on this, we should just link to ApplicationServices directly.

* Fix some invalid msg_send! usage (rust-windowing#276)

* Revert "Fix some invalid msg_send! usage (rust-windowing#276)" (rust-windowing#277)

This reverts commit a3a2e0cfc49ddfa8cdf65cf9870fb8e3d45b4bc0.

* Revert "The `cocoa` crate links to AppKit, which made the symbol `CGDisplayCreateUUIDFromDisplayID` from ApplicationServices/ColorSync (which AppKit uses internally) available to us on macOS 10.8 to 10.13. (rust-windowing#275)" (rust-windowing#279)

This reverts commit 6f9c468f26ddb60e29be2139397bfaf3b30eab1e.

* The `cocoa` crate links to AppKit, which made the symbol `CGDisplayCreateUUIDFromDisplayID` from ApplicationServices/ColorSync (which AppKit uses internally) available to us on macOS 10.8 to 10.13. (rust-windowing#280)

However, this does not work on macOS 10.7 (where AppKit does not link to ColorSync internally). Instead of relying on this, we should just link to ApplicationServices directly.

Co-authored-by: madsmtm <mads@marquart.dk>

* Fix some invalid msg_send! usage (rust-windowing#278)

Co-authored-by: madsmtm <mads@marquart.dk>

* Add exit code to ControlFlow::Exit (rust-windowing#281)

* Add exit code to ControlFlow::Exit

* Cargo fmt

* Add change files

Co-authored-by:  multisn8 <contact@multisamplednight.com>

* Add new_any_thread to Unix event loop (rust-windowing#282)

* Update windows crate to 0.30.0 (rust-windowing#283)

* Update windows crate to 0.30.0

* Simplify new-type usage

* Fix boxing in GWL_USERDATA

* Make sure everyone is using Get/SetWindowLongPtrW

* build the system_tray module when "ayatana" feature is enabled (rust-windowing#285)

Without those cfg feature checks, the "ayatana" feature does
actually not enable anything.

* Fix click events missing whe tray has menu (rust-windowing#291)

* Fix click events missing whe tray has menu

* Add change file

* Fix crash when tray has no menu (rust-windowing#294)

* chore: update pull request commit exmple

* fix(windows): send correct position for system tray events, closes rust-windowing#295 (rust-windowing#300)

* fix(windows): revert maximized state handling to winit impl, closes rust-windowing#193 (rust-windowing#299)

* fix(windows): revet maximized state handling to winit impl, closes rust-windowing#193

* add chanefile [skip ci]

* fix: `MenuItem::Quit` on Windows (rust-windowing#303)

* fix: `MenuItem::Close` on Windows

* use `PostQuitMessage` instead

Co-authored-by: amrbashir <amr.bashir2015@gmail.com>

* feat: v1 audit by Radically Open Security (rust-windowing#304)

* Update to gtk 0.15 (rust-windowing#288)

* Update to gtk 0.15

* Fix picky none on set_geometry_hint

* Fix CursorMoved position

Co-authored-by: Amr Bashir <48618675+amrbashir@users.noreply.github.com>
Co-authored-by: Bill Avery <wravery@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Lucas Fernandes Nogueira <lucasfernandesnog@gmail.com>
Co-authored-by: Kasper <kasperkh.kh@gmail.com>
Co-authored-by: amrbashir <amr.bashir2015@gmail.com>
Co-authored-by: Jay Oster <jay@kodewerx.org>
Co-authored-by: madsmtm <mads@marquart.dk>
Co-authored-by: multisn8 <contact@multisamplednight.com>
Co-authored-by: Aurélien Jacobs <aurel@gnuage.org>
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.studio>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S - meta Project governance S - platform parity Unintended platform differences
Development

No branches or pull requests