37 lines
968 B
C++
37 lines
968 B
C++
#pragma once
|
|
#include "Apps.h"
|
|
#include "Controllers.h"
|
|
|
|
#include "displayapp/screens/Alarm.h"
|
|
#include "displayapp/screens/Timer.h"
|
|
#include "displayapp/screens/Twos.h"
|
|
#include "displayapp/screens/Tile.h"
|
|
#include "displayapp/screens/ApplicationList.h"
|
|
#include "displayapp/screens/Clock.h"
|
|
|
|
namespace Pinetime {
|
|
namespace Applications {
|
|
namespace Screens {
|
|
class Screen;
|
|
}
|
|
|
|
struct AppDescription {
|
|
Apps app;
|
|
const char* icon;
|
|
Screens::Screen* (*create)(AppControllers& controllers);
|
|
};
|
|
|
|
template <Apps t>
|
|
consteval AppDescription CreateAppDescription() {
|
|
return {AppTraits<t>::app, AppTraits<t>::icon, &AppTraits<t>::Create};
|
|
}
|
|
|
|
template <template <Apps...> typename T, Apps... ts>
|
|
consteval std::array<AppDescription, sizeof...(ts)> CreateAppDescriptions(T<ts...>) {
|
|
return {CreateAppDescription<ts>()...};
|
|
}
|
|
|
|
constexpr auto userApps = CreateAppDescriptions(UserAppTypes {});
|
|
}
|
|
}
|