-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathNativeAppThemeSpec.g.h
69 lines (55 loc) · 2.31 KB
/
NativeAppThemeSpec.g.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* This file is auto-generated from a NativeModule spec file in js.
*
* This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules
* in a way that also verifies at compile time that the native module matches the interface required
* by the TurboModule JS spec.
*/
#pragma once
// clang-format off
#include <NativeModules.h>
#include <tuple>
namespace Microsoft::ReactNativeSpecs {
struct AppThemeSpec_HighContrastColors {
std::string ButtonFaceColor;
std::string ButtonTextColor;
std::string GrayTextColor;
std::string HighlightColor;
std::string HighlightTextColor;
std::string HotlightColor;
std::string WindowColor;
std::string WindowTextColor;
};
struct AppThemeSpec_AppThemeData {
bool isHighContrast;
AppThemeSpec_HighContrastColors highContrastColors;
};
inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AppThemeSpec_HighContrastColors*) noexcept {
winrt::Microsoft::ReactNative::FieldMap fieldMap {
{L"ButtonFaceColor", &AppThemeSpec_HighContrastColors::ButtonFaceColor},
{L"ButtonTextColor", &AppThemeSpec_HighContrastColors::ButtonTextColor},
{L"GrayTextColor", &AppThemeSpec_HighContrastColors::GrayTextColor},
{L"HighlightColor", &AppThemeSpec_HighContrastColors::HighlightColor},
{L"HighlightTextColor", &AppThemeSpec_HighContrastColors::HighlightTextColor},
{L"HotlightColor", &AppThemeSpec_HighContrastColors::HotlightColor},
{L"WindowColor", &AppThemeSpec_HighContrastColors::WindowColor},
{L"WindowTextColor", &AppThemeSpec_HighContrastColors::WindowTextColor},
};
return fieldMap;
}
inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(AppThemeSpec_AppThemeData*) noexcept {
winrt::Microsoft::ReactNative::FieldMap fieldMap {
{L"isHighContrast", &AppThemeSpec_AppThemeData::isHighContrast},
{L"highContrastColors", &AppThemeSpec_AppThemeData::highContrastColors},
};
return fieldMap;
}
struct AppThemeSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
static constexpr auto methods = std::tuple{
};
template <class TModule>
static constexpr void ValidateModule() noexcept {
constexpr auto methodCheckResults = CheckMethods<TModule, AppThemeSpec>();
}
};
} // namespace Microsoft::ReactNativeSpecs