Ken Van Hoeylandt 069416eee5
Rename furi to tactility-core (#10)
* renamed module

* renamed code

* more renames

* cleanup
2024-01-13 22:12:40 +01:00

52 lines
1.1 KiB
C

#pragma once
#include "app_manifest.h"
#include "bundle.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
APP_STATE_INITIAL, // App is being activated in loader
APP_STATE_STARTED, // App is in memory
APP_STATE_SHOWING, // App view is created
APP_STATE_HIDING, // App view is destroyed
APP_STATE_STOPPED // App is not in memory
} AppState;
typedef union {
struct {
bool show_statusbar : 1;
bool show_toolbar : 1;
};
unsigned char flags;
} AppFlags;
typedef void* App;
/** @brief Create an app
* @param manifest
* @param parameters optional bundle. memory ownership is transferred to App
* @return
*/
App tt_app_alloc(const AppManifest* manifest, Bundle* _Nullable parameters);
void tt_app_free(App app);
void tt_app_set_state(App app, AppState state);
AppState tt_app_get_state(App app);
const AppManifest* tt_app_get_manifest(App app);
AppFlags tt_app_get_flags(App app);
void tt_app_set_flags(App app, AppFlags flags);
void* _Nullable tt_app_get_data(App app);
void tt_app_set_data(App app, void* data);
Bundle* _Nullable tt_app_get_parameters(App app);
#ifdef __cplusplus
}
#endif