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 KeyboardManager;
21class Option;
22class ScreenContext;
24namespace OreUI { class BedrockInputSource; }
25namespace OreUI { class FacetBinder; }
26namespace OreUI { class IFacetRegistry; }
27namespace OreUI { class IScene; }
28namespace OreUI { class ITelemetry; }
29namespace OreUI { class IViewTestHelper; }
30namespace OreUI { class RouterLocation; }
31namespace OreUI { class ViewInputHandler; }
32namespace OreUI { class ViewRenderer; }
33namespace OreUI::Detail { class Binder; }
34namespace OreUI::Detail { class ViewContext; }
35namespace cohtml { class IClientSideSocket; }
36namespace cohtml { class ISocketListener; }
37namespace cohtml { class View; }
38namespace cohtml { struct ScreenInfo; }
39// clang-format on
40
41namespace OreUI {
42
43class View : public ::OreUI::IView, public ::cohtml::IViewListener {
44public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<8, 8, ::cohtml::View*> mGamefaceView;
48 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::ViewRenderer>> mRenderer;
49 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::ViewInputHandler>> mInputHandler;
50 ::ll::TypedStorage<8, 32, ::std::string> mUrl;
51 ::ll::TypedStorage<8, 24, ::std::vector<::std::reference_wrapper<::OreUI::IScene>>> mScenes;
52 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::BedrockInputSource>> mBedrockInputSource;
53 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClientInstance;
54 ::ll::TypedStorage<8, 8, ::KeyboardManager&> mKeyboardManager;
55 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::FacetBinder>> mFacetBinder;
56 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::IFacetRegistry>> mFacetRegistry;
57 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::Detail::Binder>> mBinder;
58 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::Detail::ViewContext>> mViewContext;
59 ::ll::TypedStorage<8, 8, ::OreUI::ITelemetry&> mTelemetry;
60 ::ll::TypedStorage<8, 400, ::std::optional<::OreUI::ScreenPerformanceTelemetry>> mScreenPerformanceTelemetry;
61 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mUpdatedFacets;
62 ::ll::TypedStorage<1, 1, ::OreUI::ViewState> mState;
63 ::ll::TypedStorage<4, 4, ::OreUI::RouteMode> mRouteMode;
64 ::ll::TypedStorage<8, 8, double> mLastUpdateTime;
65 ::ll::TypedStorage<8, 8, double> mTimeStamp;
66 ::ll::TypedStorage<8, 8, ::Option*> mScreenAnimationsOption;
67 ::ll::
68 TypedStorage<8, 48, ::brstd::flat_map<int, uint64, ::std::less<int>, ::std::vector<int>, ::std::vector<uint64>>>
69 mAudioStreams;
70 // NOLINTEND
71
72public:
73 // prevent constructor by default
74 View& operator=(View const&);
75 View(View const&);
76 View();
77
78public:
79 // virtual functions
80 // NOLINTBEGIN
81 virtual ~View() /*override*/ = default;
82
83 virtual void pushCurrentScene(::OreUI::IScene& scene, ::OreUI::RouteMode routeMode) /*override*/;
84
85 virtual bool hasScenes() const /*override*/;
86
87 virtual void removeScene(::OreUI::IScene const& scene) /*override*/;
88
89 virtual void update(double time) /*override*/;
90
91 virtual void render(::ScreenContext& screenContext) /*override*/;
92
93 virtual void resize(uint width, uint height) /*override*/;
94
95 virtual void reload() /*override*/;
96
97 virtual void leave() /*override*/;
98
99 virtual void onSuspend() /*override*/;
100
101 virtual void onResume() /*override*/;
102
103 virtual void onRouteChanged(
104 ::std::optional<::OreUI::RouterLocation> const& previousLocation,
105 ::std::optional<::OreUI::RouterLocation> const& currentLocation
106 ) /*override*/;
107
108 virtual ::std::string_view getUrl() const /*override*/;
109
110 virtual ::OreUI::RouteMode getRouteMode() const /*override*/;
111
112 virtual uint getWidth() const /*override*/;
113
114 virtual uint getHeight() const /*override*/;
115
116 virtual ::OreUI::ViewState getState() const /*override*/;
117
118 virtual void setTextBoxState(::TextBoxStateChange const& stateChange) /*override*/;
119
120 virtual void onKeyboardDismissed() /*override*/;
121
122 virtual void setCaretLocation(int caretLocation) /*override*/;
123
124 virtual void triggerEvent(::std::string const& eventName, ::std::string const& eventData) /*override*/;
125
126 virtual ::std::unique_ptr<::IGamefaceTextInputProxy> getTextInputProxy() /*override*/;
127
128 virtual void OnLoadFailed(char const* url, char const* error) /*override*/;
129
130 virtual void OnReadyForBindings() /*override*/;
131
132 virtual void OnBindingsReleased() /*override*/;
133
134 virtual ::cohtml::ScreenInfo OnScreenInfoRequested() /*override*/;
135
136 virtual void OnTextInputTypeChanged(::cohtml::TextInputControlType::ControlType type) /*override*/;
137
138 virtual void OnCaretRectChanged(int x, int y, uint width, uint height) /*override*/;
139
140 virtual void
141 OnCursorChanged(::cohtml::CursorTypes::Cursors cursor, char const*, float const*, float const*) /*override*/;
142
143 virtual ::cohtml::IClientSideSocket* OnCreateWebSocket(
144 ::cohtml::ISocketListener* listener,
145 char const* url,
146 char const** protocols,
147 uint protocolsCount
148 ) /*override*/;
149
150 virtual void OnAudioStreamCreated(int id, int bitDepth, int channels, float samplingRate) /*override*/;
151
152 virtual void OnAudioStreamClosed(int id) /*override*/;
153
154 virtual void OnAudioStreamPlay(int id) /*override*/;
155
156 virtual void OnAudioStreamPause(int id) /*override*/;
157
158 virtual void OnAudioDataReceived(int id, int samples, float** pcm, int channels) /*override*/;
159
160 virtual void OnAudioStreamEnded(int id) /*override*/;
161
162 virtual void OnAudioStreamVolumeChanged(int id, float volume) /*override*/;
163
164 virtual void OnClipboardTextSet(char const* text, uint lengthBytes) /*override*/;
165
166 virtual void OnClipboardTextGet(::cohtml::IViewListener::IClipboardData* setDataObject) /*override*/;
167
168 virtual ::OreUI::IViewTestHelper* getViewTestHelper() /*override*/;
169 // NOLINTEND
170
171public:
172 // virtual function thunks
173 // NOLINTBEGIN
174 MCAPI void $pushCurrentScene(::OreUI::IScene& scene, ::OreUI::RouteMode routeMode);
175
176 MCAPI bool $hasScenes() const;
177
178 MCAPI void $removeScene(::OreUI::IScene const& scene);
179
180 MCAPI void $update(double time);
181
182 MCAPI void $render(::ScreenContext& screenContext);
183
184 MCAPI void $resize(uint width, uint height);
185
186 MCAPI void $reload();
187
188 MCAPI void $leave();
189
190 MCAPI void $onSuspend();
191
192 MCAPI void $onResume();
193
194 MCAPI void $onRouteChanged(
195 ::std::optional<::OreUI::RouterLocation> const& previousLocation,
196 ::std::optional<::OreUI::RouterLocation> const& currentLocation
197 );
198
199 MCAPI ::std::string_view $getUrl() const;
200
201 MCAPI ::OreUI::RouteMode $getRouteMode() const;
202
203 MCAPI uint $getWidth() const;
204
205 MCAPI uint $getHeight() const;
206
207 MCAPI ::OreUI::ViewState $getState() const;
208
209 MCAPI void $setTextBoxState(::TextBoxStateChange const& stateChange);
210
211 MCAPI void $onKeyboardDismissed();
212
213 MCAPI void $setCaretLocation(int caretLocation);
214
215 MCAPI void $triggerEvent(::std::string const& eventName, ::std::string const& eventData);
216
217 MCAPI ::std::unique_ptr<::IGamefaceTextInputProxy> $getTextInputProxy();
218
219 MCAPI void $OnLoadFailed(char const* url, char const* error);
220
221 MCAPI void $OnReadyForBindings();
222
223 MCAPI void $OnBindingsReleased();
224
225 MCAPI ::cohtml::ScreenInfo $OnScreenInfoRequested();
226
227 MCAPI void $OnTextInputTypeChanged(::cohtml::TextInputControlType::ControlType type);
228
229 MCAPI void $OnCaretRectChanged(int x, int y, uint width, uint height);
230
231 MCAPI void $OnCursorChanged(::cohtml::CursorTypes::Cursors cursor, char const*, float const*, float const*);
232
233 MCFOLD ::cohtml::IClientSideSocket* $OnCreateWebSocket(
234 ::cohtml::ISocketListener* listener,
235 char const* url,
236 char const** protocols,
237 uint protocolsCount
238 );
239
240 MCAPI void $OnAudioStreamCreated(int id, int bitDepth, int channels, float samplingRate);
241
242 MCAPI void $OnAudioStreamClosed(int id);
243
244 MCAPI void $OnAudioStreamPlay(int id);
245
246 MCAPI void $OnAudioStreamPause(int id);
247
248 MCAPI void $OnAudioDataReceived(int id, int samples, float** pcm, int channels);
249
250 MCAPI void $OnAudioStreamEnded(int id);
251
252 MCAPI void $OnAudioStreamVolumeChanged(int id, float volume);
253
254 MCAPI void $OnClipboardTextSet(char const* text, uint lengthBytes);
255
256 MCAPI void $OnClipboardTextGet(::cohtml::IViewListener::IClipboardData* setDataObject);
257
258 MCFOLD ::OreUI::IViewTestHelper* $getViewTestHelper();
259 // NOLINTEND
260};
261
262} // namespace OreUI
Definition IClientInstance.h:5
Definition IGamefaceTextInputProxy.h:5
Definition KeyboardManager.h:5
Definition Option.h:22
Definition BedrockInputSource.h:7
Definition Binder.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
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