Skip to content

[META] Feature parity between platforms #252

Closed

Description

@elinorbgr

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) ✔️ ✔️ ✔️ ✔️ ▢ ✔️ ✔️

Activity

  1. added
    S - enhancement
    on Aug 4, 2017
  2. tiby312 commented on Aug 24, 2017

    @tiby312
    Contributor

    multitouch included in Touch events?

  3. elinorbgr commented on Aug 24, 2017

    @elinorbgr
    ContributorAuthor

    Not necessarily, I'll add a line for this

  4. LPGhatguy commented on Aug 25, 2017

    @LPGhatguy
    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.

  5. alexheretic commented on Oct 5, 2017

    @alexheretic
    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.

  6. elinorbgr commented on Oct 25, 2017

    @elinorbgr
    ContributorAuthor

    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.

  7. kryptan commented on Oct 26, 2017

    @kryptan
    Contributor

    Emscripten is missing from this table

  8. elinorbgr commented on Oct 26, 2017

    @elinorbgr
    ContributorAuthor

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

  9. kryptan commented on Oct 26, 2017

    @kryptan
    Contributor

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

  10. Xaeroxe commented on Nov 6, 2017

    @Xaeroxe
    Contributor

    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.

  11. elinorbgr commented on Nov 6, 2017

    @elinorbgr
    ContributorAuthor

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

  12. elinorbgr commented on Nov 7, 2017

    @elinorbgr
    ContributorAuthor

    Done.

  13. Xaeroxe commented on Nov 7, 2017

    @Xaeroxe
    Contributor

    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.

  14. francesca64 commented on Dec 13, 2017

    @francesca64
    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.

  15. mcoffin commented on Dec 22, 2017

    @mcoffin

    #371 would allow for key-repitition on wayland

  16. newpavlov commented on Mar 29, 2018

    @newpavlov

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

  17. sodiumjoe commented on Apr 1, 2018

    @sodiumjoe
    Contributor

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

  18. sodiumjoe commented on Apr 2, 2018

    @sodiumjoe
    Contributor

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

  19. yvt commented on Apr 10, 2018

    @yvt
    Contributor

    "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.

  20. edwin0cheng commented on Apr 12, 2018

    @edwin0cheng
    Contributor

    #457 implemented these features on Windows:

    • "Window decorations toggle" ✔️
    • "Window maximization" ✔️
    • "Window maximization toggle" ✔️
    • "Fullscreen" ✔️ (This should work now)
    • "Fullscreen toggle" ✔️
  21. francesca64 commented on Apr 17, 2018

    @francesca64
    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.

  22. added
    S - meta
    S - platform parity
    and removed
    S - enhancement
    on May 6, 2018
  23. mtak- commented on Nov 8, 2018

    @mtak-
    Contributor

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

  24. francesca64 commented on Nov 11, 2018

    @francesca64
    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!)

  25. Osspial commented on Apr 24, 2019

    @Osspial
    Contributor

    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.

  26. added a commit that references this issue on Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    S - metaS - platform parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions