Skip to content

Add ApplicationHandler and matching run APIs#3517

Merged
kchibisov merged 1 commit intomasterfrom
kchibisov/trait-shim
Mar 5, 2024
Merged

Add ApplicationHandler and matching run APIs#3517
kchibisov merged 1 commit intomasterfrom
kchibisov/trait-shim

Conversation

@kchibisov
Copy link
Copy Markdown
Member

@kchibisov kchibisov commented Feb 23, 2024

Winit is moving towards trait based end user application structure, thus add a simple ApplicationHandler trait which follows the Event<T>. To make use of this trait the new run_app group of APIs were added with the old run APIs being deprecated.

Part-of: #3432. Replaces #3386 and #3073.

  • 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

@kchibisov kchibisov force-pushed the kchibisov/trait-shim branch 2 times, most recently from 3cf4bed to 71ca619 Compare February 23, 2024 13:51
@daxpedda daxpedda added the S - api Design and usability label Feb 23, 2024
@kchibisov kchibisov force-pushed the kchibisov/trait-shim branch from 71ca619 to 94fa391 Compare February 28, 2024 20:05
@kchibisov kchibisov force-pushed the kchibisov/trait-shim branch from 94fa391 to 4c830cb Compare March 1, 2024 09:41
@madsmtm madsmtm added this to the Version 0.30.0 milestone Mar 1, 2024
Copy link
Copy Markdown
Member

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of nits.
Would like to change ApplicationHandler::loop_exiting() to ApplicationHandler::exiting() though!

Otherwise LGTM!

@kchibisov kchibisov force-pushed the kchibisov/trait-shim branch from 4c830cb to 33c133c Compare March 5, 2024 11:47
@kchibisov kchibisov requested a review from daxpedda March 5, 2024 11:47
Add a simple `ApplicationHandler` trait since winit is moving towards
trait based API. Add `run_app` group of APIs to accept `&mut impl
ApplicationHandler` deprecating the old `run` APIs.

Part-of: #3432
@kchibisov kchibisov force-pushed the kchibisov/trait-shim branch from 33c133c to 834f27b Compare March 5, 2024 12:07
@kchibisov kchibisov merged commit d123cd2 into master Mar 5, 2024
@kchibisov kchibisov deleted the kchibisov/trait-shim branch March 5, 2024 12:13
madsmtm added a commit that referenced this pull request Mar 28, 2024
@madsmtm madsmtm mentioned this pull request Sep 1, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S - api Design and usability

Development

Successfully merging this pull request may close these issues.

4 participants