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 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<1, 1, bool> mIsInitialized;
24 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::Font>>> mLoadedFonts;
25 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, uint64>> mFontNameToIdentifier;
26 ::ll::TypedStorage<8, 8, uint64> mDefaultFontId;
27 ::ll::TypedStorage<8, 8, uint64> mRuneFontId;
28 ::ll::TypedStorage<8, 8, uint64> mUnicodeFontId;
29 ::ll::TypedStorage<8, 8, uint64> mSmoothFontLatinFontId;
30 ::ll::TypedStorage<8, 8, uint64> mUIFontId;
31 ::ll::TypedStorage<8, 8, uint64> mSmoothSmallFontID;
32 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::std::shared_ptr<::Font>>> mOriginalMinecraftFonts;
33 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::std::shared_ptr<::Font>>> mOverriddenFonts;
34 ::ll::TypedStorage<8, 24, ::std::vector<::Bedrock::Threading::Async<void>>> mFontLoadingTaskTrackers;
35 ::ll::TypedStorage<8, 32, ::std::string> mLanguageCode;
36 // NOLINTEND
37
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 virtual ~FontRepository() /*override*/;
42
43 virtual void onAppSuspended() /*override*/;
44
45 virtual void onDeviceLost() /*override*/;
46 // NOLINTEND
47
48public:
49 // member functions
50 // NOLINTBEGIN
51 MCAPI FontRepository();
52
53 MCAPI void _queueBitmapFont(
54 ::std::string const& alias,
55 ::Core::Path const& asciiName,
56 ::Core::Path const& unicodeName,
57 ::std::weak_ptr<::mce::TextureGroup> textureGroupWeakPtr
58 );
59
60 MCAPI void _queueMsdfFont(
61 ::std::string const& alias,
62 ::Core::Path const& fontPagePrefix,
63 ::std::weak_ptr<::mce::TextureGroup> textureGroupWeakPtr
64 );
65
66 MCAPI void _setDefaultFont(::std::string const& fontName, uint64 fontId, ::std::shared_ptr<::Font> font);
67
68 MCAPI void _setFontIfOverride(uint64 fontId, ::std::shared_ptr<::Font> font);
69
70 MCAPI uint64 addPreloadedFont(::std::string const& fontName, ::std::shared_ptr<::Font> font);
71
72 MCAPI void getDefaultFontHandles(
73 ::FontHandle& defaultFontHandle,
74 ::FontHandle& runeFontHandle,
75 ::FontHandle& unicodeFontHandle,
76 ::FontHandle& smoothLatinFontHandle,
77 ::FontHandle& uiFontHandle
78 );
79
80 MCAPI uint64 getFontIdentifier(::std::string const& fontName);
81
82 MCAPI ::std::vector<::ResourceLocation> getReloadFontTextures() const;
83
84 MCAPI void loadDefaultFonts(::std::shared_ptr<::mce::TextureGroup> textureGroup);
85
86 MCAPI void onLanguageChanged(::std::string const& languageCode);
87
88 MCAPI void parseAndLoadMetadataFonts(::std::shared_ptr<::mce::TextureGroup> textureGroup);
89
90 MCAPI void prepForShutdown();
91
92 MCAPI void reloadFontTextures(bool blockingLoad);
93
94 MCAPI void resetPerFontData();
95
96 MCAPI void setFont(uint64 fontId, ::std::shared_ptr<::Font> font);
97
98 MCAPI void setMinecraftUIFontStyle(::std::string const& languageCode);
99
100 MCAPI void setUseFontOverrides(bool useOverrides);
101 // NOLINTEND
102
103public:
104 // static variables
105 // NOLINTBEGIN
106 MCAPI static uint64& INVALID_FONT();
107 // NOLINTEND
108
109public:
110 // constructor thunks
111 // NOLINTBEGIN
112 MCAPI void* $ctor();
113 // NOLINTEND
114
115public:
116 // destructor thunk
117 // NOLINTBEGIN
118 MCAPI void $dtor();
119 // NOLINTEND
120
121public:
122 // virtual function thunks
123 // NOLINTBEGIN
124 MCAPI void $onAppSuspended();
125
126 MCAPI void $onDeviceLost();
127 // NOLINTEND
128
129public:
130 // vftables
131 // NOLINTBEGIN
132 MCNAPI static void** $vftableForAppPlatformListener();
133
135 // NOLINTEND
136};
Definition AppPlatformListener.h:15
Definition EnableNonOwnerReferences.h:7
Definition Path.h:10
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