LeviLamina
Loading...
Searching...
No Matches
ViewInputHandler.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/oreui/input/GamefaceImeComposer.h"
7#include "mc/client/gui/oreui/input/InputSource.h"
8#include "mc/common/SubClientId.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/core/utility/pub_sub/Subscription.h"
11
12// auto generated forward declare list
13// clang-format off
14class IOptions;
15class KeyboardAction;
16class KeyboardManager;
17class MouseAction;
20namespace OreUI { class GamepadInputHandler; }
21namespace OreUI { class TextInputHandler; }
22namespace OreUI { class TouchInputHandler; }
23namespace OreUI { struct TextInputResult; }
24namespace cohtml { class View; }
25// clang-format on
26
27namespace OreUI {
28
29class ViewInputHandler {
30public:
31 // ViewInputHandler inner types define
32 enum class SupportedClients : int {
33 Primary = 0,
34 All = 1,
35 };
36
37public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<1, 1, ::SubClientId> mSubClientId;
41 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::TouchInputHandler>> mTouchInputHandler;
42 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::TextInputHandler>> mTextInputHandler;
43 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::GamepadInputHandler>> mGamepadInputHandler;
44 ::ll::TypedStorage<8, 8, ::KeyboardManager&> mKeyboardManager;
45 ::ll::TypedStorage<8, 8, ::cohtml::View&> mView;
46 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ControllerIDtoClientMap>> mControllerToClientMap;
47 ::ll::TypedStorage<1, 1, bool> mShouldIgnoreBedrockInput;
48 ::ll::TypedStorage<1, 1, bool> mEmulateTouchInput;
49 ::ll::TypedStorage<1, 1, bool> mIsPointerDown;
50 ::ll::TypedStorage<1, 1, bool const> mIsPrimaryClient;
51 ::ll::TypedStorage<1, 1, bool> mIsFullKeyboard;
52 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mIsFullKeyboardSubscription;
53 ::ll::TypedStorage<1, 1, bool> mInvertMouse;
54 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mInvertMouseSubscription;
55 ::ll::TypedStorage<8, 48, ::std::optional<::OreUI::GamefaceImeComposer>> mImeComposer;
56 // NOLINTEND
57
58public:
59 // prevent constructor by default
60 ViewInputHandler& operator=(ViewInputHandler const&);
61 ViewInputHandler(ViewInputHandler const&);
62 ViewInputHandler();
63
64public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI ViewInputHandler(
68 ::SubClientId subClientId,
69 ::std::unique_ptr<::OreUI::TextInputHandler> textInputHandler,
70 ::std::unique_ptr<::OreUI::TouchInputHandler> touchInputHandler,
71 ::std::unique_ptr<::OreUI::GamepadInputHandler> gamepadInputHandler,
72 ::KeyboardManager& keyboardManager,
73 ::cohtml::View& view,
74 ::Bedrock::NotNullNonOwnerPtr<::ControllerIDtoClientMap> controllerIdToClientMap,
75 bool isPrimaryClient,
76 ::IOptions& options
77 );
78
79 MCAPI void _onImeCompositionChanged(::std::string const& composition);
80
81 MCAPI void handleInput(::OreUI::InputSource inputSource, ::MouseAction const& mouseAction);
82
83 MCAPI void handleKeyboardInput(::OreUI::InputSource inputSource, ::KeyboardAction const& keyboardAction);
84
85 MCAPI void handleNativeTextInput(::OreUI::InputSource inputSource, ::std::string_view text);
86
87 MCAPI void imeStartComposition(::OreUI::InputSource inputSource);
88
89 MCAPI void sendTextChangedEvent(::OreUI::TextInputResult inputResult);
90
91 MCAPI void setTextBoxState(::OreUI::InputSource inputSource, ::TextBoxStateChange const& stateChange);
92
93 MCAPI ~ViewInputHandler();
94 // NOLINTEND
95
96public:
97 // constructor thunks
98 // NOLINTBEGIN
99 MCAPI void* $ctor(
100 ::SubClientId subClientId,
101 ::std::unique_ptr<::OreUI::TextInputHandler> textInputHandler,
102 ::std::unique_ptr<::OreUI::TouchInputHandler> touchInputHandler,
103 ::std::unique_ptr<::OreUI::GamepadInputHandler> gamepadInputHandler,
104 ::KeyboardManager& keyboardManager,
105 ::cohtml::View& view,
106 ::Bedrock::NotNullNonOwnerPtr<::ControllerIDtoClientMap> controllerIdToClientMap,
107 bool isPrimaryClient,
108 ::IOptions& options
109 );
110 // NOLINTEND
111
112public:
113 // destructor thunk
114 // NOLINTBEGIN
115 MCAPI void $dtor();
116 // NOLINTEND
117};
118
119} // namespace OreUI
Definition IOptions.h:5
Definition KeyboardAction.h:5
Definition KeyboardManager.h:5
Definition MouseAction.h:5
Definition GamepadInputHandler.h:7
Definition TextInputHandler.h:7
Definition TouchInputHandler.h:7
Definition ViewInputHandler.h:7
Definition View.h:7
Definition ControllerIDtoClientMap.h:13
Definition TextInputResult.h:7
Definition TextBoxStateChange.h:5