LeviLamina
Loading...
Searching...
No Matches
View.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/oreui/ScreenPerformanceTelemetry.h"
7#include "mc/client/gui/oreui/interface/IView.h"
8#include "mc/client/gui/oreui/interface/RouteMode.h"
9#include "mc/client/gui/oreui/interface/ViewState.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/external/gameface/cohtml/ControlType.h"
12#include "mc/external/gameface/cohtml/Cursors.h"
13#include "mc/external/gameface/cohtml/IViewListener.h"
14#include "mc/platform/brstd/flat_map.h"
15
16// auto generated forward declare list
17// clang-format off
18class IClientInstance;
20class IOptionRegistry;
21class KeyboardManager;
22class Option;
23class ScreenContext;
25namespace OreUI { class BedrockInputSource; }
26namespace OreUI { class FacetBinder; }
27namespace OreUI { class IFacetRegistry; }
28namespace OreUI { class IScene; }
29namespace OreUI { class ITelemetry; }
30namespace OreUI { class IViewTestHelper; }
31namespace OreUI { class RouterLocation; }
32namespace OreUI { class ViewInputHandler; }
33namespace OreUI { class ViewRenderer; }
34namespace OreUI::Detail { class Binder; }
35namespace OreUI::Detail { class ViewContext; }
36namespace OreUI::Detail { class ViewContextFactory; }
37namespace cohtml { class IClientSideSocket; }
38namespace cohtml { class ISocketListener; }
39namespace cohtml { class View; }
40namespace cohtml { struct ScreenInfo; }
41// clang-format on
42
43namespace OreUI {
44
45class View : public ::OreUI::IView, public ::cohtml::IViewListener {
46public:
47 // member variables
48 // NOLINTBEGIN
49 ::ll::TypedStorage<8, 8, ::cohtml::View*> mGamefaceView;
50 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::ViewRenderer>> mRenderer;
51 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::ViewInputHandler>> mInputHandler;
52 ::ll::TypedStorage<8, 32, ::std::string const> mUrl;
53 ::ll::TypedStorage<8, 24, ::std::vector<::std::reference_wrapper<::OreUI::IScene>>> mScenes;
54 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::BedrockInputSource>> mBedrockInputSource;
55 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClientInstance;
56 ::ll::TypedStorage<8, 8, ::KeyboardManager&> mKeyboardManager;
57 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::FacetBinder>> mFacetBinder;
58 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::IFacetRegistry>> mFacetRegistry;
59 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::Detail::Binder>> mBinder;
60 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::Detail::ViewContext>> mViewContext;
61 ::ll::TypedStorage<8, 8, ::OreUI::ITelemetry&> mTelemetry;
62 ::ll::TypedStorage<8, 256, ::std::optional<::OreUI::ScreenPerformanceTelemetry>> mScreenPerformanceTelemetry;
63 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mUpdatedFacets;
64 ::ll::TypedStorage<1, 1, ::OreUI::ViewState> mState;
65 ::ll::TypedStorage<4, 4, ::OreUI::RouteMode> mRouteMode;
66 ::ll::TypedStorage<8, 8, double> mLastUpdateTime;
67 ::ll::TypedStorage<8, 8, double> mTimeStamp;
68 ::ll::TypedStorage<8, 8, ::Option*> mScreenAnimationsOption;
69 ::ll::
70 TypedStorage<8, 48, ::brstd::flat_map<int, uint64, ::std::less<int>, ::std::vector<int>, ::std::vector<uint64>>>
71 mAudioStreams;
72 // NOLINTEND
73
74public:
75 // prevent constructor by default
76 View& operator=(View const&);
77 View(View const&);
78 View();
79
80public:
81 // virtual functions
82 // NOLINTBEGIN
83 virtual ~View() /*override*/;
84
85 virtual void pushCurrentScene(::OreUI::IScene& scene, ::OreUI::RouteMode routeMode) /*override*/;
86
87 virtual bool hasScenes() const /*override*/;
88
89 virtual void removeScene(::OreUI::IScene const& scene) /*override*/;
90
91 virtual void update(double time) /*override*/;
92
93 virtual void render(::ScreenContext& screenContext) /*override*/;
94
95 virtual void resize(uint width, uint height) /*override*/;
96
97 virtual void reload() /*override*/;
98
99 virtual void leave() /*override*/;
100
101 virtual void onSuspend() /*override*/;
102
103 virtual void onResume() /*override*/;
104
105 virtual void onRouteChanged(
106 ::std::optional<::OreUI::RouterLocation> const& previousLocation,
107 ::std::optional<::OreUI::RouterLocation> const& currentLocation
108 ) /*override*/;
109
110 virtual ::std::string_view getUrl() const /*override*/;
111
112 virtual ::OreUI::RouteMode getRouteMode() const /*override*/;
113
114 virtual uint getWidth() const /*override*/;
115
116 virtual uint getHeight() const /*override*/;
117
118 virtual ::OreUI::ViewState getState() const /*override*/;
119
120 virtual void setTextBoxState(::TextBoxStateChange const& stateChange) /*override*/;
121
122 virtual void onKeyboardDismissed() /*override*/;
123
124 virtual void setCaretLocation(int caretLocation) /*override*/;
125
126 virtual void triggerEvent(::std::string const& eventName, ::std::string const& eventData) /*override*/;
127
128 virtual ::std::unique_ptr<::IGamefaceTextInputProxy> getTextInputProxy() /*override*/;
129
130 virtual void OnLoadFailed(char const* url, char const* error) /*override*/;
131
132 virtual void OnReadyForBindings() /*override*/;
133
134 virtual void OnBindingsReleased() /*override*/;
135
136 virtual ::cohtml::ScreenInfo OnScreenInfoRequested() /*override*/;
137
138 virtual void OnTextInputTypeChanged(::cohtml::TextInputControlType::ControlType type) /*override*/;
139
140 virtual void OnCaretRectChanged(int x, int y, uint width, uint height) /*override*/;
141
142 virtual void
143 OnCursorChanged(::cohtml::CursorTypes::Cursors cursor, char const*, float const*, float const*) /*override*/;
144
145 virtual ::cohtml::IClientSideSocket*
146 OnCreateWebSocket(::cohtml::ISocketListener*, char const*, char const**, uint) /*override*/;
147
148 virtual void OnAudioStreamCreated(int id, int bitDepth, int channels, float samplingRate) /*override*/;
149
150 virtual void OnAudioStreamClosed(int id) /*override*/;
151
152 virtual void OnAudioStreamPlay(int id) /*override*/;
153
154 virtual void OnAudioStreamPause(int id) /*override*/;
155
156 virtual void OnAudioDataReceived(int id, int samples, float** pcm, int channels) /*override*/;
157
158 virtual void OnAudioStreamEnded(int id) /*override*/;
159
160 virtual void OnAudioStreamVolumeChanged(int id, float volume) /*override*/;
161
162 virtual void OnClipboardTextSet(char const* text, uint lengthBytes) /*override*/;
163
164 virtual void OnClipboardTextGet(::cohtml::IViewListener::IClipboardData* setDataObject) /*override*/;
165
166 virtual ::OreUI::IViewTestHelper* getViewTestHelper() /*override*/;
167 // NOLINTEND
168
169public:
170 // member functions
171 // NOLINTBEGIN
172 MCAPI View(
173 ::std::string url,
174 ::std::unique_ptr<::OreUI::BedrockInputSource> bedrockInputSource,
175 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> clientInstance,
176 ::KeyboardManager& keyboardManager,
177 ::std::unique_ptr<::OreUI::IFacetRegistry> facetRegistry,
178 ::OreUI::ITelemetry& telemetry
179 );
180
181 MCAPI void flushAudioStreams();
182
183 MCAPI void initialize(
184 ::cohtml::View& gamefaceView,
185 ::std::unique_ptr<::OreUI::ViewRenderer> renderer,
186 ::std::unique_ptr<::OreUI::ViewInputHandler> inputHandler,
187 ::OreUI::Detail::ViewContextFactory& contextFactory,
188 ::IOptionRegistry& options
189 );
190 // NOLINTEND
191
192public:
193 // constructor thunks
194 // NOLINTBEGIN
195 MCAPI void* $ctor(
196 ::std::string url,
197 ::std::unique_ptr<::OreUI::BedrockInputSource> bedrockInputSource,
198 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> clientInstance,
199 ::KeyboardManager& keyboardManager,
200 ::std::unique_ptr<::OreUI::IFacetRegistry> facetRegistry,
201 ::OreUI::ITelemetry& telemetry
202 );
203 // NOLINTEND
204
205public:
206 // destructor thunk
207 // NOLINTBEGIN
208 MCAPI void $dtor();
209 // NOLINTEND
210
211public:
212 // virtual function thunks
213 // NOLINTBEGIN
214 MCAPI void $pushCurrentScene(::OreUI::IScene& scene, ::OreUI::RouteMode routeMode);
215
216 MCAPI bool $hasScenes() const;
217
218 MCAPI void $removeScene(::OreUI::IScene const& scene);
219
220 MCAPI void $update(double time);
221
222 MCAPI void $render(::ScreenContext& screenContext);
223
224 MCAPI void $resize(uint width, uint height);
225
226 MCAPI void $reload();
227
228 MCAPI void $leave();
229
230 MCAPI void $onSuspend();
231
232 MCAPI void $onResume();
233
234 MCAPI void $onRouteChanged(
235 ::std::optional<::OreUI::RouterLocation> const& previousLocation,
236 ::std::optional<::OreUI::RouterLocation> const& currentLocation
237 );
238
239 MCFOLD ::std::string_view $getUrl() const;
240
241 MCFOLD ::OreUI::RouteMode $getRouteMode() const;
242
243 MCAPI uint $getWidth() const;
244
245 MCAPI uint $getHeight() const;
246
247 MCFOLD ::OreUI::ViewState $getState() const;
248
249 MCAPI void $setTextBoxState(::TextBoxStateChange const& stateChange);
250
251 MCAPI void $onKeyboardDismissed();
252
253 MCAPI void $setCaretLocation(int caretLocation);
254
255 MCAPI void $triggerEvent(::std::string const& eventName, ::std::string const& eventData);
256
257 MCAPI ::std::unique_ptr<::IGamefaceTextInputProxy> $getTextInputProxy();
258
259 MCAPI void $OnLoadFailed(char const* url, char const* error);
260
261 MCAPI void $OnReadyForBindings();
262
263 MCAPI void $OnBindingsReleased();
264
265 MCAPI ::cohtml::ScreenInfo $OnScreenInfoRequested();
266
267 MCAPI void $OnTextInputTypeChanged(::cohtml::TextInputControlType::ControlType type);
268
269 MCAPI void $OnCaretRectChanged(int x, int y, uint width, uint height);
270
271 MCAPI void $OnCursorChanged(::cohtml::CursorTypes::Cursors cursor, char const*, float const*, float const*);
272
273 MCFOLD ::cohtml::IClientSideSocket* $OnCreateWebSocket(::cohtml::ISocketListener*, char const*, char const**, uint);
274
275 MCAPI void $OnAudioStreamCreated(int id, int bitDepth, int channels, float samplingRate);
276
277 MCAPI void $OnAudioStreamClosed(int id);
278
279 MCAPI void $OnAudioStreamPlay(int id);
280
281 MCAPI void $OnAudioStreamPause(int id);
282
283 MCAPI void $OnAudioDataReceived(int id, int samples, float** pcm, int channels);
284
285 MCAPI void $OnAudioStreamEnded(int id);
286
287 MCAPI void $OnAudioStreamVolumeChanged(int id, float volume);
288
289 MCAPI void $OnClipboardTextSet(char const* text, uint lengthBytes);
290
291 MCAPI void $OnClipboardTextGet(::cohtml::IViewListener::IClipboardData* setDataObject);
292
293 MCFOLD ::OreUI::IViewTestHelper* $getViewTestHelper();
294 // NOLINTEND
295
296public:
297 // vftables
298 // NOLINTBEGIN
299 MCNAPI static void** $vftableForIView();
300
301 MCNAPI static void** $vftableForIViewListener();
302 // NOLINTEND
303};
304
305} // namespace OreUI
Definition IClientInstance.h:5
Definition IGamefaceTextInputProxy.h:5
Definition IOptionRegistry.h:5
Definition KeyboardManager.h:5
Definition Option.h:22
Definition BedrockInputSource.h:7
Definition Binder.h:7
Definition ViewContextFactory.h:7
Definition ViewContext.h:7
Definition FacetBinder.h:7
Definition IFacetRegistry.h:7
Definition IScene.h:7
Definition ITelemetry.h:7
Definition IViewTestHelper.h:7
Definition RouterLocation.h:7
Definition ViewInputHandler.h:7
Definition ViewRenderer.h:7
Definition View.h:7
static MCAPI void ** $vftableForIViewListener()
static MCAPI void ** $vftableForIView()
Definition ScreenContext.h:5
Definition IClientSideSocket.h:7
Definition ISocketListener.h:7
Definition View.h:7
Definition TextBoxStateChange.h:5
Definition IViewListener.h:15
Definition ScreenInfo.h:7