implemented basic desktop
This commit is contained in:
@@ -12,11 +12,16 @@ typedef struct _lv_obj_t lv_obj_t;
|
||||
typedef enum {
|
||||
AppTypeService,
|
||||
AppTypeSystem,
|
||||
AppTypeDesktop,
|
||||
AppTypeUser
|
||||
} AppType;
|
||||
|
||||
typedef enum {
|
||||
AppStackSizeNormal = 2048
|
||||
AppStackSizeTiny = 512,
|
||||
AppStackSizeSmall = 1024,
|
||||
AppStackSizeNormal = 2048,
|
||||
AppStackSizeLarge = 4096,
|
||||
AppStackSizeHuge = 8192,
|
||||
} AppStackSize;
|
||||
|
||||
typedef void (*AppOnStart)(void _Nonnull* parameter);
|
||||
|
||||
@@ -64,16 +64,16 @@ const AppManifest _Nullable* app_manifest_registry_find_by_id(const char* id) {
|
||||
return (manifest != NULL) ? *manifest : NULL;
|
||||
}
|
||||
|
||||
void app_manifest_registry_for_each_of_type(AppType type, AppManifestCallback callback) {
|
||||
void app_manifest_registry_for_each_of_type(AppType type, void* _Nullable context, AppManifestCallback callback) {
|
||||
APP_REGISTRY_FOR_EACH(manifest, {
|
||||
if (manifest->type == type) {
|
||||
callback(manifest);
|
||||
callback(manifest, context);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void app_manifest_registry_for_each(AppManifestCallback callback) {
|
||||
void app_manifest_registry_for_each(AppManifestCallback callback, void* _Nullable context) {
|
||||
APP_REGISTRY_FOR_EACH(manifest, {
|
||||
callback(manifest);
|
||||
callback(manifest, context);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@ extern "C" {
|
||||
extern const AppManifest* const INTERNAL_APP_MANIFESTS[];
|
||||
extern const size_t INTERNAL_APP_COUNT;
|
||||
|
||||
typedef void (*AppManifestCallback)(const AppManifest*);
|
||||
typedef void (*AppManifestCallback)(const AppManifest*, void* context);
|
||||
|
||||
void app_manifest_registry_init();
|
||||
void app_manifest_registry_add(const AppManifest _Nonnull* manifest);
|
||||
void app_manifest_registry_remove(const AppManifest _Nonnull* manifest);
|
||||
const AppManifest _Nullable* app_manifest_registry_find_by_id(const char* id);
|
||||
void app_manifest_registry_for_each(AppManifestCallback callback);
|
||||
void app_manifest_registry_for_each_of_type(AppType type, AppManifestCallback callback);
|
||||
void app_manifest_registry_for_each(AppManifestCallback callback, void* _Nullable context);
|
||||
void app_manifest_registry_for_each_of_type(AppType type, void* _Nullable context, AppManifestCallback callback);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user