Skip to content

Move ControlFlow as methods on EventLoopWindowTarget #3042

@daxpedda

Description

@daxpedda

On Web there are currently a bunch of ways to implement ControlFlow::Poll, they each have different tradeoffs. Unfortunately there is currently no way to add platform-specific functionality to ControlFlow the way usually Winit does: with extension traits.

My proposal to solve this problem is to make ControlFlow a struct, internally it would probably still use an enum, but the point is to make that private so we can add platform-specific functionality through extension traits. It already provides methods to set the ControlFlow.

Happy to do the PR for all platforms.

EDIT: See #3042 (comment), which is an even better solution imo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C - in progressImplementation is proceeding smoothly

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions