-
Notifications
You must be signed in to change notification settings - Fork 49
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
Use separate types for each platform #60
Comments
The variants don't all match 1:1 with a platform, so the variant isn't known at compile-time. For example, Xlib, Xcb, and Wayland are all available on |
Yeah, which is not a problem. You can still provide an enum for platforms that actually make a decision at runtime. But adding a runtime check for something that can be uniquely identified at compile time just leads to unergonomic code. |
I'm inclined to go in the direction of #63. We keep the enum, and just remove all the cfg stuff. |
I find the current API a bit strange, since it basically offers an enum that just has a single member on most platforms.
Is there any reason why the
RawWindowHandle
isn't just a platform-specifictype
that is decided at compile-time? It's not like people are going to be matching against the platform's implementation at runtime, especially since this is impossible because the enum has only the members available for the current platform.The text was updated successfully, but these errors were encountered: