Covellite++  Version: 2.3.0 Revision: ??? Platform: x64 Build: 23:13 04.01.2025
Кроссплатформенный фреймворк для разработки приложений на С++
Загрузка...
Поиск...
Не найдено
ApplicationEntryPoint.hpp
1
2#pragma once
3#include <Covellite\App\Application.hpp>
4
28#ifdef APPLICATION_ENTRY_POINT
29#undef APPLICATION_ENTRY_POINT
30#endif
31
32#if BOOST_OS_WINDOWS
33
34#include <alicorn/platform/windows.hpp>
35
36#define APPLICATION_ENTRY_POINT(MainApplicationClass) \
37 int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR _pParams, _In_ int) \
38 { \
39 covellite::app::Application::Main<MainApplicationClass>(_pParams); \
40 return 0; \
41 }
42
43#elif BOOST_PLAT_ANDROID
44
45extern "C"
46{
47
48#ifndef __USING_GTEST
49struct ANativeWindow;
50struct ANativeActivity;
51extern void android_main(struct android_app *);
52void ANativeActivity_onCreate(ANativeActivity *, void *, size_t);
53#endif
54
55}
56
57#define APPLICATION_ENTRY_POINT(MainApplicationClass) \
58 void android_main(struct android_app * _pParams) \
59 { \
60 covellite::app::Application::Main<MainApplicationClass>(_pParams); \
61 } \
62 /* Это чтобы компилятор не выбросил функцию ANativeActivity_onCreate() */ \
63 void CovelliteFakeFunction(void) { ANativeActivity_onCreate(nullptr, nullptr, 0); }
64
65#else
66
67#define APPLICATION_ENTRY_POINT(MainApplicationClass)
68
69#endif
Definition android_native_app_glue.h:111