Skip to content

Rename DisplayHandle convenience methods - #217

Open
madsmtm wants to merge 1 commit into
masterfrom
madsmtm/rename-display-handle-creators
Open

Rename DisplayHandle convenience methods#217
madsmtm wants to merge 1 commit into
masterfrom
madsmtm/rename-display-handle-creators

Conversation

@madsmtm

@madsmtm madsmtm commented Mar 16, 2026

Copy link
Copy Markdown
Member

In #70 (comment), we decided upon a naming scheme for our types, with the main motivation being "consistency" and "AndroidNDKHandle looks weird"1.

I'm still mostly convinced that this is still the right direction to go in because it matches things like std::net::Ipv4Addr (if it was IPv4Addr, then we should've done something different).

We should apply this naming scheme to methods as well, in particular DisplayHandle::appkit and DisplayHandle::uikit need an extra _ to follow normal case-conversion rules.

Footnotes

  1. This argument is weakened after https://github.com/rust-windowing/raw-window-handle/pull/214 where this type no longer exists. Now it's only RawWindowHandle::AndroidNdk vs. RawWindowHandle::AndroidNDK.

To have a consistent naming scheme.
@madsmtm

madsmtm commented Mar 16, 2026

Copy link
Copy Markdown
Member Author

I'm still on the fence about this, I think both uikit and ui_kit can work, opening this mostly to keep the discussion out of #214.

(I actually think UiKit looks weird, and that ui_view feels natural, so even if we were just talking Apple, there probably isn't really a perfect solution here).

@notgull

notgull commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

I think ui_kit works weird, so I'd advocate for uikit.

@kchibisov

Copy link
Copy Markdown
Member

Agree with @notgull here, same for appkit. The main reason is that in all places it's without _.

@madsmtm

madsmtm commented Mar 24, 2026

Copy link
Copy Markdown
Member Author

But you'd still prefer RawWindowHandle::UiKit over RawWindowHandle::UIKit? Or would you rather have us do the latter?

@kchibisov

Copy link
Copy Markdown
Member

The rust naming rule is UiKit I believe.

@madsmtm

madsmtm commented Mar 29, 2026

Copy link
Copy Markdown
Member Author

The rust naming rule is UiKit I believe.

It is, but arguably so is ui_kit.

I dunno, we can leave it as-is if that's what y'all perfer.

@kchibisov

Copy link
Copy Markdown
Member

The crate names we use in winit are appkit/uikit, so I'd probably have the names without _ here, so it kind of the same spelling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants