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

"Blessed" way to do things out of winits scope? (winit-extras) #2160

Open
madsmtm opened this issue Jan 23, 2022 · 6 comments
Open

"Blessed" way to do things out of winits scope? (winit-extras) #2160

madsmtm opened this issue Jan 23, 2022 · 6 comments
Labels
C - needs discussion Direction must be ironed out D - average Likely as difficult as most tasks here S - docs Awareness, docs, examples, etc. S - meta Project governance

Comments

@madsmtm
Copy link
Member

madsmtm commented Jan 23, 2022

There are a lot of things out of winit's scope that are useful (and maybe expected by most people that we provide), here's a few examples I've stumbled across, though there are many more:

The readme already notes this, and directs users to various graphics libraries, but these are not always what the user wants (or their graphics library may not support it).

It has been suggested we make a winit-extras crate or similar under the @rust-windowing umbrella (name up for bikeshedding), to house these components; this would help us with:

  • Providing examples of usage
  • Ensuring our APIs actually allow external crates to hook in to the functionality they need (we're working towards this, see Platform-specific event callbacks #2120)
  • Helps keeping these extra features up to date with the latest winit version
  • In the cases where we depend on an external library for this, this "blesses" that library, providing a more consistent user experience (currently there are many clipboard libraries out there; it would be nice if the ecosystem could converge on a single one)

The alternative is just to make crates for each of these things, and document them in the wiki (though for some of the smaller features like file open events it seems kinda dumb).

@madsmtm madsmtm added S - docs Awareness, docs, examples, etc. C - needs discussion Direction must be ironed out D - average Likely as difficult as most tasks here S - meta Project governance labels Jan 23, 2022
@madsmtm
Copy link
Member Author

madsmtm commented Jan 23, 2022

Third alternative is to simply increase the scope, though that brings other problems (such as not having enough maintainer time to support it and general feature creep) - though creating a new crate under the @rust-windowing umbrella also kinda exhibits these problems...

@tinaun
Copy link
Contributor

tinaun commented Jan 28, 2022

note that the tauri maintainers have already forked winit to add menus / clipboards etc in tao

@notgull
Copy link
Member

notgull commented Dec 18, 2022

I would, personally, support this. I was actually about to make my own extension crate to do this, but I feel having an official endorsement from @rust-windowing would boost its legitimacy.

@parasyte
Copy link

parasyte commented Mar 11, 2023

There are multiple crates trying to offer various desktop environment features that winit lacks. I often find myself questioning why these need to be separate from the window management library, and what value it has. IMHO, any of these are obvious candidates for inclusion in a winit-extras crate:

@kchibisov
Copy link
Member

Desktop notifications in any form are out of scope, they don't require the windowing system in the first place for what I know.

Tray is the same thing I guess, though might not be entirely. Don't want to deal with it inside the winit though.

I'm not sure about what type of dialogs are you talking about, but such usually is a part of the GUI toolkit, the dialog is a regular window, so it's all out of scope for winit, I'd say.

Winit should collect essential features which is hard to get right in such 3d party crates, we're not the GUI toolkit, but the windowing library, you built your toolkit on top of it.

@parasyte
Copy link

Well then it's a good thing this ticket is for tracking "things out of winits scope".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs discussion Direction must be ironed out D - average Likely as difficult as most tasks here S - docs Awareness, docs, examples, etc. S - meta Project governance
Development

No branches or pull requests

5 participants