Refactor app loading and window management (#609)

This commit is contained in:
Ken Van Hoeylandt
2026-08-11 23:40:59 +02:00
committed by GitHub
parent dc3f6104b8
commit 37c507544b
243 changed files with 16034 additions and 10865 deletions
+8 -9
View File
@@ -1,7 +1,6 @@
#pragma once
#include "tt_app.h"
#include "tt_bundle.h"
#include <app/manager.h>
#ifdef __cplusplus
extern "C" {
@@ -11,18 +10,18 @@ extern "C" {
/**
* Show a dialog with the provided title, message and 0, 1 or more buttons.
* @warning AlertDialog is now a new-model app (see Modules/app-module); it delivers its result
* via APP_EVENT_RESULT to a caller's app_instance_id, which side-loaded ELF apps don't have.
* The dialog will show, but this app's onResult callback will NOT be invoked with the button
* that was pressed - there is currently no bridge back to the old ELF app result mechanism.
* @param[in] parent_id parent app ID or 0
* @param[in] title the title to show in the toolbar
* @param[in] message the message to display
* @param[in] buttonLabels the buttons to show, or null when there are none to show
* @param[in] buttonLabelCount the amount of buttons (0 or more)
* @return the launch ID of the dialog, which can be compared in onResult to identify the source
* @return the launch ID of the dialog (kept for source compatibility; no onResult will follow)
*/
AppLaunchId tt_app_alertdialog_start(const char* title, const char* message, const char* buttonLabels[], uint32_t buttonLabelCount);
/**
* @return the index of the button that was clicked (the index in the array when start() was called)
*/
int32_t tt_app_alertdialog_get_result_index(BundleHandle handle);
AppInstanceId tt_app_alertdialog_start(AppInstanceId parent_id, const char* title, const char* message, const char* buttonLabels[], uint32_t buttonLabelCount);
#ifdef __cplusplus
}