6 #ifndef SWIFT_CORE_INPUTMANAGER_H
7 #define SWIFT_CORE_INPUTMANAGER_H
16 #include <QStringList>
40 void registerAction(
const QString &action,
44 void registerRemoteActions(
const QStringList &actions);
48 template <
typename RecvObj>
49 int bind(
const QString &action, RecvObj *receiver,
void (RecvObj::*slotPointer)(
bool))
52 using namespace std::placeholders;
53 auto function = std::bind(slotPointer, receiver, _1);
54 return bindImpl(action, receiver,
function);
59 template <
typename Func>
62 return bindImpl(action, receiver, functionObject);
66 void unbind(
int index);
86 void callFunctionsBy(
const QString &action,
bool isKeyDown,
bool shouldEmit =
true);
95 void releaseDevices();
121 std::function<void(
bool)> m_function;
125 void reloadHotkeySettings();
131 int bindImpl(
const QString &action,
QObject *receiver, std::function<
void(
bool)>
function);
136 std::unique_ptr<swift::input::IKeyboard> m_keyboard;
137 std::unique_ptr<swift::input::IJoystick> m_joystick;
144 bool m_actionRelayingEnabled =
false;
145 bool m_captureActive =
false;
151 &CInputManager::reloadHotkeySettings };
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Class template for accessing a specific value in the CSettingsCache.
Backend services of the swift project, like dealing with the network or the simulators.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.