mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-10-17 02:45:05 +00:00
New features: - SDK version 7.0.0 packages include version metadata and platform-specific application settings. - Apps gain POSIX support for file polling, terminal attributes, and standard input/output, plus additional C and POSIX functions. - Shell commands can launch installed headless apps using their registered app settings. - Apps can exit with a status code, and terminal clear commands support clearing from the cursor to the end, from the start through the cursor, or the entire display. Fixes: - SDK integration builds locate the build tool reliably and use settings for the selected platform. - ESP32 file operations handle invalid paths and existing directories more consistently.
30 lines
1.0 KiB
C++
30 lines
1.0 KiB
C++
// SPDX-License-Identifier: Apache-2.0
|
|
#pragma once
|
|
|
|
#include <app/instance.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @return the app_instance_id of whichever app instance's task is calling this (every app
|
|
* instance's task stashes it in its own thread-local storage when it starts), or 0 if called
|
|
* from a task that isn't a running app instance. An app's own main() typically calls this once,
|
|
* near the top, to learn its own instance id - see e.g. app_event_subscribe()/
|
|
* window_manager_create(), both of which need it.
|
|
*/
|
|
AppInstanceId app_scheduler_current_app_id(void);
|
|
|
|
/**
|
|
* Ends the calling app instance as if its main() returned @a status, by ending its task in place.
|
|
* The calling frames are never resumed. Like std::exit(), automatic objects are not destroyed
|
|
* (the simulator's thread exit may still destroy them). Memory the app allocated is not freed.
|
|
* Returns only when not called from an app instance's own main task.
|
|
*/
|
|
void app_scheduler_exit_current(int32_t status);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|