Skip to content

make GlutinEventLoop public#1735

Open
LoganDark wants to merge 2 commits intorust-windowing:masterfrom
LoganDark:pub-glutineventloop
Open

make GlutinEventLoop public#1735
LoganDark wants to merge 2 commits intorust-windowing:masterfrom
LoganDark:pub-glutineventloop

Conversation

@LoganDark
Copy link
Copy Markdown

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

@kchibisov
Copy link
Copy Markdown
Member

It was not intended to be public and I'm not sure what the use is. Though, sooner we'd be updating to new winit traits and majority of that will just go away.

@LoganDark
Copy link
Copy Markdown
Author

LoganDark commented Jun 19, 2025

It was not intended to be public and I'm not sure what the use is. Though, sooner we'd be updating to new winit traits and majority of that will just go away.

The use is to trivially accept either EventLoop or ActiveEventLoop to my own functions that internally call glutin's. I figured reusing your preexisting sealed trait would be easier than making my own.

@kchibisov
Copy link
Copy Markdown
Member

The use is to trivially accept either EventLoop or ActiveEventLoop to my own functions that internally call glutin's. I figured reusing your preexisting sealed trait would be easier than making my own.

Can't the &dyn ActiveEventLoop be accepted? It's also a trait.

@LoganDark
Copy link
Copy Markdown
Author

LoganDark commented Jun 19, 2025

Can't the &dyn ActiveEventLoop be accepted? It's also a trait.

Is it?

image

It seems to exist in winit-core, but winit-core and winit_core are not on crates.io and the trait is not re-exported by winit. So I'm not sure how to access it :/

I also searched the entire winit dependency and the trait doesn't exist in there:

image

@kchibisov
Copy link
Copy Markdown
Member

Oh, indeed. The plan is to use dyn ActiveEventLoop in the future and just winit-core here, I guess, so not sure about this PR now given that it can be just copied from here to your code base for a while?

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.

2 participants