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