From 33919e9e3f419e13318fa6b8217d8c8dcd86c1eb Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 11 Apr 2024 15:16:35 +1000 Subject: Migrate all existing control schemes to the cool new world --- src/input/include/device_factory.hpp | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/input/include/device_factory.hpp (limited to 'src/input/include/device_factory.hpp') diff --git a/src/input/include/device_factory.hpp b/src/input/include/device_factory.hpp new file mode 100644 index 00000000..dd9c7133 --- /dev/null +++ b/src/input/include/device_factory.hpp @@ -0,0 +1,39 @@ +/* + * Copyright 2023 jacqueline + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#pragma once + +#include +#include + +#include "feedback_device.hpp" +#include "input_device.hpp" +#include "input_touch_wheel.hpp" +#include "nvs.hpp" +#include "service_locator.hpp" + +namespace input { + +class DeviceFactory { + public: + DeviceFactory(std::shared_ptr); + + auto createInputs(drivers::NvsStorage::InputModes mode) + -> std::vector>; + + auto createFeedbacks() -> std::vector>; + + auto touch_wheel() -> std::shared_ptr { return wheel_; } + + private: + std::shared_ptr services_; + + // HACK: the touchwheel is current a special case, since it's the only input + // device that has some kind of setting/configuration; scroll sensitivity. + std::shared_ptr wheel_; +}; + +} // namespace input -- cgit v1.2.3