3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/game/IConfigListener.h"
7#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/core/utility/pub_sub/Publisher.h"
10#include "mc/deps/input/InputMode.h"
11#include "mc/deps/input/enums/ButtonState.h"
12#include "mc/deps/input/enums/RawInputType.h"
31namespace Bedrock::PubSub::ThreadModel {
struct MultiThreaded; }
38 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::InputHandler>> mInputHandler;
39 ::ll::TypedStorage<4, 4, int> mControllerId;
40 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClient;
41 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IAdvancedGraphicsOptions>> mAdvancedGraphicsOptions;
42 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MinecraftBindingFactoryMap>> mBindingFactoryMap;
43 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MinecraftInputMappingFactoryMap>> mMappingFactoryMap;
44 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SplitscreenJoinListener>> mSplitscreenJoinListener;
45 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::InputSettingsHandler>> mInputSettingsHandler;
49 ::Bedrock::PubSub::Publisher<void(::IClientInstance&), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
50 mAnyInputSubscription;
55 Publisher<void(
int, ::RawInputType, ::ButtonState,
bool), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
56 mRawInputEventPublisher;
61 Publisher<void(::IClientInstance&, ::InputMode), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
63 ::ll::TypedStorage<8, 8, ::MouseMapper*> mMouseMapper;
64 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MinecraftInputHandlerProxy>> mProxy;
69 MinecraftInputHandler();
74 virtual ~MinecraftInputHandler() ;
76 virtual void onConfigChanged(::Config
const& c) ;
78 virtual void _registerInputHandlers();
80 virtual void _registerDebugInputHandlers();
82 virtual ::std::unique_ptr<::ClientMoveInputHandler> _createClientMoveInputHandler() = 0;
88 MCAPI MinecraftInputHandler(
89 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>
const& client,
90 ::Bedrock::NotNullNonOwnerPtr<::IAdvancedGraphicsOptions>
const& advancedGraphicsOptions
93 MCAPI
void _registerMenuButton(::std::string
const& buttonName,
bool suspendable);
95 MCAPI
void changeControllerId(
int oldId,
int newId);
97 MCAPI
void clearInputDeviceQueues();
99 MCAPI
void clearInputDeviceQueuesForFrame();
102 getCursorPos(
float& xCursor,
float& yCursor, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>
const& client)
const;
104 MCFOLD ::InputSettingsHandler& getInputSettingsHandler();
106 MCAPI
void init(::IGameModuleApp& gameModuleApp);
108 MCAPI ::ClientMoveInputHandler*
109 initClientInput(::Bedrock::NotNullNonOwnerPtr<::IClientInstance>
const& client, ::IGameModuleApp& gameModuleApp);
111 MCAPI ::Bedrock::PubSub::Subscription
112 registerToInputModePublisher(::std::function<
void(::IClientInstance&, ::InputMode)> callback);
114 MCFOLD ::Bedrock::PubSub::Subscription
115 registerToRawInputEventPublisher(::std::function<
void(
int, ::RawInputType, ::ButtonState,
bool)> callback);
117 MCFOLD ::Bedrock::PubSub::Subscription subscribeToRawInput(::std::function<
void(::IClientInstance&)> callback);
120 ::IMinecraftGame& mcGame,
121 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>
const& primaryClient,
122 ::Bedrock::NotNullNonOwnerPtr<::ControllerIDtoClientMap>
const& map,
123 bool allowMultipleClients
131 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>
const& client,
132 ::Bedrock::NotNullNonOwnerPtr<::IAdvancedGraphicsOptions>
const& advancedGraphicsOptions
145 MCAPI
void $onConfigChanged(::Config
const& c);
147 MCAPI
void $_registerInputHandlers();
149 MCAPI
void $_registerDebugInputHandlers();
Definition EnableNonOwnerReferences.h:7
Definition Subscription.h:10
Definition IAdvancedGraphicsOptions.h:16
Definition IClientInstance.h:5
Definition IConfigListener.h:5
Definition IGameModuleApp.h:5
Definition IMinecraftGame.h:5
Definition MinecraftBindingFactoryMap.h:5
Definition MouseMapper.h:5
Definition SplitscreenJoinListener.h:5
Definition MultiThreaded.h:7
Definition ControllerIDtoClientMap.h:5