LeviLamina
Loading...
Searching...
No Matches
FontRepository.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/application/AppPlatformListener.h"
7#include "mc/deps/core/threading/Async.h"
8#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
9
10// auto generated forward declare list
11// clang-format off
12class Font;
13class FontHandle;
15namespace Core { class Path; }
16namespace mce { class TextureGroup; }
17// clang-format on
18
20public:
21 // FontRepository inner types define
22 using NonNullFontPtr = ::gsl::not_null<::std::shared_ptr<::Font>>;
23
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<1, 1, bool> mIsInitialized;
28 ::ll::TypedStorage<8, 24, ::std::vector<::gsl::not_null<::std::shared_ptr<::Font>>>> mLoadedFonts;
29 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, uint64>> mFontNameToIdentifier;
30 ::ll::TypedStorage<8, 8, uint64> mDefaultFontId;
31 ::ll::TypedStorage<8, 8, uint64> mRuneFontId;
32 ::ll::TypedStorage<8, 8, uint64> mUnicodeFontId;
33 ::ll::TypedStorage<8, 8, uint64> mSmoothFontLatinFontId;
34 ::ll::TypedStorage<8, 8, uint64> mUIFontId;
35 ::ll::TypedStorage<8, 8, uint64> mSmoothSmallFontID;
36 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::std::shared_ptr<::Font>>> mOriginalMinecraftFonts;
37 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::std::shared_ptr<::Font>>> mOverriddenFonts;
38 ::ll::TypedStorage<8, 24, ::std::vector<::Bedrock::Threading::Async<void>>> mFontLoadingTaskTrackers;
39 ::ll::TypedStorage<8, 32, ::std::string> mLanguageCode;
40 // NOLINTEND
41
42public:
43 // virtual functions
44 // NOLINTBEGIN
45 virtual ~FontRepository() /*override*/;
46
47 virtual void onAppSuspended() /*override*/;
48
49 virtual void onDeviceLost() /*override*/;
50 // NOLINTEND
51
52public:
53 // member functions
54 // NOLINTBEGIN
55 MCAPI FontRepository();
56
57 MCAPI void _queueBitmapFont(
58 ::std::string const& alias,
59 ::Core::Path const& asciiName,
60 ::Core::Path const& unicodeName,
61 ::std::weak_ptr<::mce::TextureGroup> textureGroupWeakPtr
62 );
63
64 MCAPI void _queueMsdfFont(
65 ::std::string const& alias,
66 ::Core::Path const& fontPagePrefix,
67 ::std::weak_ptr<::mce::TextureGroup> textureGroupWeakPtr
68 );
69
70 MCAPI void _setDefaultFont(::std::string const& fontName, uint64 fontId, ::std::shared_ptr<::Font> font);
71
72 MCAPI void _setFontIfOverride(uint64 fontId, ::std::shared_ptr<::Font> font);
73
74 MCAPI uint64 addPreloadedFont(::std::string const& fontName, ::gsl::not_null<::std::shared_ptr<::Font>> font);
75
76 MCAPI void clearStringCache();
77
78 MCAPI void getDefaultFontHandles(
79 ::FontHandle& defaultFontHandle,
80 ::FontHandle& runeFontHandle,
81 ::FontHandle& unicodeFontHandle,
82 ::FontHandle& smoothLatinFontHandle,
83 ::FontHandle& uiFontHandle
84 );
85
86 MCAPI ::Font& getFont(uint64 fontId);
87
88 MCAPI ::FontHandle getFontHandle(uint64 fontId);
89
90 MCAPI uint64 getFontIdentifier(::std::string const& fontName);
91
92 MCAPI ::std::vector<::ResourceLocation> getReloadFontTextures() const;
93
94 MCAPI bool haveDefaultFontsLoaded();
95
96 MCAPI bool isFontIdInRepository(uint64 fontId);
97
98 MCAPI bool isReloadingTextures();
99
100 MCFOLD bool isRepositoryInitialized();
101
102 MCAPI void loadDefaultFonts(::std::shared_ptr<::mce::TextureGroup> textureGroup);
103
104 MCAPI void onLanguageChanged(::std::string const& languageCode);
105
106 MCAPI void parseAndLoadMetadataFonts(::std::shared_ptr<::mce::TextureGroup> textureGroup);
107
108 MCAPI void prepForShutdown();
109
110 MCAPI void reloadFontTextures(bool blockingLoad);
111
112 MCAPI void resetPerFontData();
113
114 MCAPI void setMinecraftSmoothFontStyle(float guiScale, ::std::string const&);
115
116 MCAPI void setMinecraftUIFontStyle(::std::string const& languageCode);
117
118 MCAPI void setUseFontOverrides(bool useOverrides);
119 // NOLINTEND
120
121public:
122 // static variables
123 // NOLINTBEGIN
124 MCAPI static uint64& INVALID_FONT();
125 // NOLINTEND
126
127public:
128 // constructor thunks
129 // NOLINTBEGIN
130 MCAPI void* $ctor();
131 // NOLINTEND
132
133public:
134 // destructor thunk
135 // NOLINTBEGIN
136 MCAPI void $dtor();
137 // NOLINTEND
138
139public:
140 // virtual function thunks
141 // NOLINTBEGIN
142 MCAPI void $onAppSuspended();
143
144 MCAPI void $onDeviceLost();
145 // NOLINTEND
146
147public:
148 // vftables
149 // NOLINTBEGIN
150 MCNAPI static void** $vftableForAppPlatformListener();
151
153 // NOLINTEND
154};
Definition AppPlatformListener.h:15
Definition EnableNonOwnerReferences.h:7
Definition Path.h:12
Definition FontHandle.h:5
Definition FontRepository.h:5
static MCAPI void ** $vftableForAppPlatformListener()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition Font.h:5
Definition ResourceLocation.h:15
Definition TextureGroup.h:7