LeviLamina
Loading...
Searching...
No Matches
OreUISystem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/oreui/resources/TemporaryTextureHolder.h"
7#include "mc/client/gui/oreui/routing/RouterConfiguration.h"
8#include "mc/common/SubClientId.h"
9#include "mc/deps/core/file/Path.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/deps/core/utility/pub_sub/Subscription.h"
12#include "mc/platform/brstd/move_only_function.h"
13
14// auto generated forward declare list
15// clang-format off
16class IClientInstance;
17class IFileAccess;
19class IOptionRegistry;
20class ISceneStack;
21class SceneFactory;
22class TaskGroup;
24namespace Core { class FileSystem; }
25namespace Gameface { class ResourceHandlerBroker; }
26namespace OreUI { class DevServerListener; }
27namespace OreUI { class FacetRegistryFactory; }
28namespace OreUI { class IResourceAllowList; }
29namespace OreUI { class IRouteMatcher; }
30namespace OreUI { class IRoutePrerequisiteHandler; }
31namespace OreUI { class Library; }
32namespace OreUI { class ResourceAllowList; }
33namespace OreUI { class Router; }
34namespace OreUI { class RouterEventing; }
35namespace OreUI { class SceneProvider; }
36namespace OreUI { struct DebugData; }
37namespace OreUI { struct LibraryFactoryArguments; }
38namespace OreUI { struct RegisterResourceHandlersArguments; }
39namespace OreUI { struct ResourceHandlerFactory; }
40namespace OreUI { struct ResourceHandlerFactoryArguments; }
41namespace OreUI::Detail { class ViewContextFactory; }
42namespace mce { class RenderContext; }
43namespace mce { class ShaderGroup; }
44namespace ui { class ScreenTechStackSelector; }
45// clang-format on
46
47namespace OreUI {
48
49class OreUISystem {
50public:
51 // OreUISystem inner types declare
52 // clang-format off
54 struct Impl;
55 struct CallbackEntry;
56 // clang-format on
57
58 // OreUISystem inner types define
60 public:
61 // OreUISystemDependencies inner types define
62 using ResourceHandlerBrokerFactory = ::brstd::move_only_function<::std::unique_ptr<
63 ::Gameface::ResourceHandlerBroker>(::OreUI::RegisterResourceHandlersArguments const&) const>;
64
65 using LibraryFactory =
66 ::brstd::move_only_function<::std::unique_ptr<::OreUI::Library>(::OreUI::LibraryFactoryArguments&&) const>;
67
68 using ShowDebugToast = ::std::function<void(::std::string const&)>;
69
70 using SceneProviderFactory = ::brstd::move_only_function<::std::unique_ptr<::OreUI::SceneProvider>(
71 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const&,
72 ::std::unique_ptr<::OreUI::FacetRegistryFactory>,
73 ::std::unique_ptr<::OreUI::Detail::ViewContextFactory>,
74 ::OreUI::Library&
75 ) const>;
76
77 public:
78 // member variables
79 // NOLINTBEGIN
80 ::ll::TypedStorage<
81 8,
82 64,
83 ::brstd::move_only_function<::std::unique_ptr<
84 ::Gameface::ResourceHandlerBroker>(::OreUI::RegisterResourceHandlersArguments const&) const>>
85 mCreateResourceHandlerBroker;
86 ::ll::TypedStorage<
87 8,
88 64,
89 ::brstd::move_only_function<::std::unique_ptr<::OreUI::Library>(::OreUI::LibraryFactoryArguments&&) const>>
90 mCreateLibrary;
91 ::ll::TypedStorage<
92 8,
93 64,
94 ::brstd::move_only_function<::std::unique_ptr<::OreUI::SceneProvider>(
95 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const&,
96 ::std::unique_ptr<::OreUI::FacetRegistryFactory>,
97 ::std::unique_ptr<::OreUI::Detail::ViewContextFactory>,
98 ::OreUI::Library&
99 ) const>>
100 mSceneProviderFactory;
101 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::DebugData>> mDebugData;
102 ::ll::TypedStorage<8, 216, ::OreUI::RouterConfiguration> mRouterConfiguration;
103 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&)>> mShowDebugToast;
104 ::ll::TypedStorage<8, 32, ::Core::Path> mPackagePath;
105 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::ResourceAllowList>> mAllowList;
106 // NOLINTEND
107
108 public:
109 // member functions
110 // NOLINTBEGIN
111 MCAPI ~OreUISystemDependencies();
112 // NOLINTEND
113
114 public:
115 // static functions
116 // NOLINTBEGIN
117 MCAPI static ::brstd::move_only_function<::std::unique_ptr<::OreUI::Library>(::OreUI::LibraryFactoryArguments&&)
118 const>
119 createLibraryFactory(
120 ::Bedrock::NotNullNonOwnerPtr<::Core::FileSystem> fileSystem,
121 ::Bedrock::NotNullNonOwnerPtr<::IFileAccess> appPackageFileAccess
122 );
123
124 MCAPI static ::brstd::move_only_function<::std::unique_ptr<
125 ::Gameface::ResourceHandlerBroker>(::OreUI::RegisterResourceHandlersArguments const&) const>
126 createResourceHandlerBrokerFactory(::OreUI::ResourceHandlerFactoryArguments const& args);
127
128 MCAPI static ::OreUI::ResourceHandlerFactory
129 createResourceHandlerFactory(::OreUI::ResourceHandlerFactoryArguments const& args);
130
131 MCAPI static ::brstd::move_only_function<::std::unique_ptr<::OreUI::SceneProvider>(
132 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const&,
133 ::std::unique_ptr<::OreUI::FacetRegistryFactory>,
134 ::std::unique_ptr<::OreUI::Detail::ViewContextFactory>,
135 ::OreUI::Library&
136 ) const>
137 createSceneProviderFactory(::ui::ScreenTechStackSelector& screenTechStackSelector);
138 // NOLINTEND
139
140 public:
141 // destructor thunk
142 // NOLINTBEGIN
143 MCAPI void $dtor();
144 // NOLINTEND
145 };
146
147 struct Impl {
148 public:
149 // member variables
150 // NOLINTBEGIN
151 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::OreUI::DebugData>>> mDebugData;
152 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::OreUI::ResourceAllowList>>> mResourceAllowList;
153 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&)>> mShowDebugToast;
154 ::ll::TypedStorage<
155 8,
156 64,
157 ::brstd::move_only_function<::std::unique_ptr<::OreUI::SceneProvider>(
158 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const&,
159 ::std::unique_ptr<::OreUI::FacetRegistryFactory>,
160 ::std::unique_ptr<::OreUI::Detail::ViewContextFactory>,
161 ::OreUI::Library&
162 ) const>>
163 mCreateSceneProvider;
164 ::ll::TypedStorage<8, 216, ::OreUI::RouterConfiguration> mRouterConfiguration;
165 ::ll::TypedStorage<8, 104, ::Gameface::TemporaryTextureHolder> mTemporaryTextureHolder;
166 // NOLINTEND
167
168 public:
169 // prevent constructor by default
170 Impl();
171
172 public:
173 // member functions
174 // NOLINTBEGIN
175 MCAPI explicit Impl(::OreUI::OreUISystem::OreUISystemDependencies& deps);
176 // NOLINTEND
177
178 public:
179 // constructor thunks
180 // NOLINTBEGIN
181 MCAPI void* $ctor(::OreUI::OreUISystem::OreUISystemDependencies& deps);
182 // NOLINTEND
183 };
184
185 struct CallbackEntry {
186 public:
187 // member variables
188 // NOLINTBEGIN
189 ::ll::TypedStorage<8, 8, void*> token;
190 ::ll::TypedStorage<8, 64, ::std::function<void()>> callback;
191 // NOLINTEND
192 };
193
194public:
195 // member variables
196 // NOLINTBEGIN
197 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::OreUI::OreUISystem::Impl>>> mImpl;
198 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::Library>> mLibrary;
199 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::DevServerListener>> mDevServerListener;
200 ::ll::TypedStorage<1, 1, bool> mAppWillRestart;
201 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::OreUISystem::CallbackEntry>> mRouteConfigurationChangeCallbacks;
202 ::ll::TypedStorage<8, 24, ::std::vector<::Bedrock::PubSub::Subscription>> mOptionSubscriptions;
203 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesTrialMode;
204 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesFriendsDrawerOnMultipleScreens;
205 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesSettingsScreen;
206 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesAccessibilitySettingsScreen;
207 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesGameSettingsScreen;
208 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesLanguageSettingsScreen;
209 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesGeneralSettingsScreen;
210 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesAudioSettingsScreen;
211 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesAccountSettingsScreen;
212 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesVideoSettingsScreen;
213 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesKeyboardAndMouseSettingsScreen;
214 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesMultiplayerScreen;
215 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesPreviewSettingsScreen;
216 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesStorageSettingsScreen;
217 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesTouchSettingsScreen;
218 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesCreatorSettingsScreen;
219 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesNewSettingsInGame;
220 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesNewSettingsOnThirdPartyServers;
221 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesControllerScreen;
222 // NOLINTEND
223
224public:
225 // prevent constructor by default
226 OreUISystem();
227
228public:
229 // member functions
230 // NOLINTBEGIN
231 MCAPI explicit OreUISystem(::OreUI::OreUISystem::OreUISystemDependencies&& deps);
232
233 MCAPI void _registerToggleObservers();
234
235 MCAPI bool assetsInitialized() const;
236
237 MCAPI void clearUnusedCachedViews(::SubClientId subClientId);
238
239 MCAPI ::std::unique_ptr<::OreUI::IRouteMatcher> createInGameRouteMatcher(
240 ::SceneFactory& sceneFactory,
241 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack> const& sceneStack
242 ) const;
243
244 MCAPI ::std::unique_ptr<::OreUI::Router> createInGameRouter(
245 ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler> prerequisiteHandler,
246 ::std::unique_ptr<::OreUI::RouterEventing> routerEventing,
247 ::SceneFactory& sceneFactory,
248 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack> const& sceneStack
249 ) const;
250
251 MCAPI ::std::unique_ptr<::OreUI::IRouteMatcher> createOutOfGameRouteMatcher(
252 ::SceneFactory& sceneFactory,
253 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack> const& sceneStack
254 ) const;
255
256 MCAPI ::std::unique_ptr<::OreUI::Router> createOutOfGameRouter(
257 ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler> prerequisiteHandler,
258 ::std::unique_ptr<::OreUI::RouterEventing> routerEventing,
259 ::SceneFactory& sceneFactory,
260 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack> const& sceneStack
261 ) const;
262
263 MCAPI ::std::unique_ptr<::OreUI::SceneProvider> createSceneProvider(
264 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& clientInstance,
265 ::std::unique_ptr<::OreUI::FacetRegistryFactory> facetRegistryFactory,
266 ::std::unique_ptr<::OreUI::Detail::ViewContextFactory> contextFactory
267 ) const;
268
269 MCAPI ::Bedrock::NotNullNonOwnerPtr<::OreUI::IResourceAllowList> getResourceAllowList();
270
271 MCAPI ::std::unique_ptr<::IGamefaceTextInputProxy> getTextInputProxy();
272
273 MCAPI void initializeAssetsAsynchronously(::TaskGroup& taskGroup, ::Core::Path const& packagePath);
274
275 MCAPI void initializeRendering(
276 ::Bedrock::NonOwnerPointer<::mce::ShaderGroup> const& shaderGroup,
277 ::mce::RenderContext& renderContext
278 );
279
280 MCAPI void initializeViewsCoordinator();
281
282 MCAPI void onActiveResourcePacksChanged();
283
284 MCAPI void onAppPreSuspended(::mce::RenderContext& renderContext);
285
286 MCAPI void onAppResumed(::Bedrock::NonOwnerPointer<::mce::ShaderGroup> const& shaderGroup);
287
288 MCFOLD void onAppWillRestart();
289
290 MCAPI void onKeyboardDismissed();
291
292 MCAPI void onTrialModeChanged();
293
294 MCAPI void registerOptionObservers(::IOptionRegistry& options);
295
296 MCAPI void registerRouteConfigurationChangeCallback(void* token, ::std::function<void()> const& callback);
297
298 MCAPI void reloadAllViews();
299
300 MCAPI void setTextBoxState(::TextBoxStateChange const& stateChange);
301
302 MCAPI void unregisterRouteConfigurationChangeCallback(void* token);
303
304 MCAPI void update(double time);
305
306 MCAPI ~OreUISystem();
307 // NOLINTEND
308
309public:
310 // constructor thunks
311 // NOLINTBEGIN
312 MCAPI void* $ctor(::OreUI::OreUISystem::OreUISystemDependencies&& deps);
313 // NOLINTEND
314
315public:
316 // destructor thunk
317 // NOLINTBEGIN
318 MCAPI void $dtor();
319 // NOLINTEND
320};
321
322} // namespace OreUI
Definition FileSystem.h:28
Definition ResourceHandlerBroker.h:7
Definition IClientInstance.h:5
Definition IFileAccess.h:15
Definition IGamefaceTextInputProxy.h:5
Definition IOptionRegistry.h:5
Definition ISceneStack.h:5
Definition ViewContextFactory.h:7
Definition DevServerListener.h:7
Definition FacetRegistryFactory.h:7
Definition IResourceAllowList.h:7
Definition IRouteMatcher.h:7
Definition IRoutePrerequisiteHandler.h:7
Definition Library.h:7
Definition OreUISystem.h:7
Definition ResourceAllowList.h:7
Definition RouterEventing.h:7
Definition Router.h:7
Definition SceneProvider.h:7
Definition SceneFactory.h:5
Definition TaskGroup.h:55
Definition RenderContext.h:7
Definition ShaderGroup.h:7
Definition ScreenTechStackSelector.h:7
Definition DebugData.h:7
Definition LibraryFactoryArguments.h:7
Definition OreUISystem.h:21
Definition OreUISystem.h:19
Definition RegisterResourceHandlersArguments.h:7
Definition ResourceHandlerFactoryArguments.h:7
Definition ResourceHandlerFactory.h:7
Definition TextBoxStateChange.h:5