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/common/SubClientId.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/core/utility/pub_sub/Subscription.h"
9
10// auto generated forward declare list
11// clang-format off
12class IGameController;
13class IOptionRegistry;
14class KeyboardAction;
15class KeyboardManager;
16class MouseAction;
18namespace Input::Debug { class ISplitscreenRedirect; }
19namespace OreUI { class GamepadInputHandler; }
20namespace OreUI { class TextInputHandler; }
21namespace OreUI { class TouchInputHandler; }
22namespace cohtml { class View; }
23// clang-format on
24
25namespace OreUI {
26
27class ViewInputHandler {
28public:
29 // ViewInputHandler inner types define
30 enum class SupportedClients : int {
31 Primary = 0,
32 All = 1,
33 };
34
35public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<1, 1, ::SubClientId> mSubClientId;
39 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::TouchInputHandler>> mTouchInputHandler;
40 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::TextInputHandler>> mTextInputHandler;
41 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::GamepadInputHandler>> mGamepadInputHandler;
42 ::ll::TypedStorage<8, 8, ::KeyboardManager&> mKeyboardManager;
43 ::ll::TypedStorage<8, 8, ::cohtml::View&> mView;
44 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ControllerIDtoClientMap>> mControllerToClientMap;
45 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::Input::Debug::ISplitscreenRedirect>>
46 mDebugSplitscreenInputRedirect;
47 ::ll::TypedStorage<1, 1, bool> mEmulateTouchInput;
48 ::ll::TypedStorage<1, 1, bool> mIsPointerDown;
49 ::ll::TypedStorage<1, 1, bool const> mIsPrimaryClient;
50 ::ll::TypedStorage<1, 1, bool> mIsFullKeyboard;
51 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mIsFullKeyboardSubscription;
52 ::ll::TypedStorage<1, 1, bool> mInvertMouse;
53 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mInvertMouseSubscription;
54 // NOLINTEND
55
56public:
57 // prevent constructor by default
58 ViewInputHandler& operator=(ViewInputHandler const&);
59 ViewInputHandler(ViewInputHandler const&);
60 ViewInputHandler();
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI ViewInputHandler(
66 ::SubClientId subClientId,
67 ::std::unique_ptr<::OreUI::TextInputHandler> textInputHandler,
68 ::std::unique_ptr<::OreUI::TouchInputHandler> touchInputHandler,
69 ::std::unique_ptr<::OreUI::GamepadInputHandler> gamepadInputHandler,
70 ::KeyboardManager& keyboardManager,
71 ::cohtml::View& view,
72 ::Bedrock::NotNullNonOwnerPtr<::ControllerIDtoClientMap> controllerIdToClientMap,
73 ::Bedrock::NotNullNonOwnerPtr<::Input::Debug::ISplitscreenRedirect> const& debugSplitscreenInputRedirect,
74 bool isPrimaryClient,
75 ::IOptionRegistry& options
76 );
77
78 MCAPI void handleKeyboardInput(::KeyboardAction const& keyboardAction);
79
80 MCAPI void handleMouseInput(::MouseAction const& mouseAction);
81
82 MCAPI bool shouldHandleGamepad(::std::shared_ptr<::IGameController> gamePad);
83
84 MCAPI ~ViewInputHandler();
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90 MCAPI void* $ctor(
91 ::SubClientId subClientId,
92 ::std::unique_ptr<::OreUI::TextInputHandler> textInputHandler,
93 ::std::unique_ptr<::OreUI::TouchInputHandler> touchInputHandler,
94 ::std::unique_ptr<::OreUI::GamepadInputHandler> gamepadInputHandler,
95 ::KeyboardManager& keyboardManager,
96 ::cohtml::View& view,
97 ::Bedrock::NotNullNonOwnerPtr<::ControllerIDtoClientMap> controllerIdToClientMap,
98 ::Bedrock::NotNullNonOwnerPtr<::Input::Debug::ISplitscreenRedirect> const& debugSplitscreenInputRedirect,
99 bool isPrimaryClient,
100 ::IOptionRegistry& options
101 );
102 // NOLINTEND
103
104public:
105 // destructor thunk
106 // NOLINTBEGIN
107 MCAPI void $dtor();
108 // NOLINTEND
109};
110
111} // namespace OreUI
Definition IGameController.h:5
Definition IOptionRegistry.h:5
Definition ISplitscreenRedirect.h:7
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:5