Skip to content

Conversation

CookiePLMonster
Copy link
Contributor

@CookiePLMonster CookiePLMonster commented Aug 28, 2024

What's new

view_dispatcher_get_event_loop is available in the public View Dispatcher header, but it was marked as inaccessible for FAPs. This was most likely done because of the initial event loop implementation not supporting adding/removing additional entries whilst the event loop was running, but now it is supported so it should be OK to expose.

Verification

Compiles?

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@hedger hedger added the App Loader FAP loader + API-related label Aug 29, 2024
hedger
hedger previously approved these changes Aug 29, 2024
@CookiePLMonster
Copy link
Contributor Author

Additionally, is there any point to keeping a deprecated view_dispatcher_enable_queue? Maybe it should just be removed at this point to force people to upgrade?

@skotopes
Copy link
Contributor

skotopes commented Sep 2, 2024

We are currently thinking about how interface to event loop should look like.

At this point we have couple options like: passing event loop to alloc_ex or leaving current API. It will become clear which one (or maybe both) will stay after we port GUI to JS.

@CookiePLMonster
Copy link
Contributor Author

We are currently thinking about how interface to event loop should look like.

At this point we have couple options like: passing event loop to alloc_ex or leaving current API. It will become clear which one (or maybe both) will stay after we port GUI to JS.

Sounds good! If you want to defer this PR to until after this decision is made, I can either mark this PR as draft or close it.

@skotopes
Copy link
Contributor

skotopes commented Sep 6, 2024

Long story short: we will have both APIs available: borrowing event loop from view dispatcher or injecting your own loop into view dispatcher

@skotopes skotopes merged commit 8caa861 into flipperdevices:dev Sep 6, 2024
11 checks passed
@CookiePLMonster CookiePLMonster deleted the patch-1 branch September 6, 2024 17:01
@CookiePLMonster
Copy link
Contributor Author

Long story short: we will have both APIs available: borrowing event loop from view dispatcher or injecting your own loop into view dispatcher

After I tried using the event loop in my app, I think it's indeed a good idea. Just be mindful of the thread signal thing when "adopting" the event loop to the view dispatcher.

ofabel pushed a commit to ofabel/flipperzero-firmware that referenced this pull request Sep 26, 2024
* Exposed view_dispatcher_get_event_loop
* Bump api symbols

Co-authored-by: あく <alleteam@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Loader FAP loader + API-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants