From b255ea799eead9668e7fd69a286349ac4a74a73c Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 29 Apr 2024 12:42:16 +1000 Subject: Add lua bindings for override input hooks --- src/input/include/input_device.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/input/include/input_device.hpp') diff --git a/src/input/include/input_device.hpp b/src/input/include/input_device.hpp index 59456351..d944c3bf 100644 --- a/src/input/include/input_device.hpp +++ b/src/input/include/input_device.hpp @@ -29,7 +29,9 @@ class IInputDevice { virtual auto read(lv_indev_data_t* data) -> void = 0; virtual auto name() -> std::string = 0; - virtual auto hooks() -> std::vector { return {}; } + virtual auto triggers() -> std::vector> { + return {}; + } }; } // namespace input -- cgit v1.2.3 From 1573a8c4cde1cd9528b422b2dcc598e37ffe94a7 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 2 May 2024 19:12:26 +1000 Subject: WIP merge cyclically dependent components into one big component --- src/input/include/input_device.hpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/input/include/input_device.hpp (limited to 'src/input/include/input_device.hpp') diff --git a/src/input/include/input_device.hpp b/src/input/include/input_device.hpp deleted file mode 100644 index d944c3bf..00000000 --- a/src/input/include/input_device.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2024 jacqueline - * - * SPDX-License-Identifier: GPL-3.0-only - */ - -#pragma once - -#include -#include -#include - -#include "hal/lv_hal_indev.h" -#include "input_hook.hpp" -#include "property.hpp" - -namespace input { - -/* - * Interface for all device input methods. Each 'Input Device' is polled by - * LVGL at regular intervals, and can effect the device either via LVGL's input - * device driver API, or by emitting events for other parts of the system to - * react to (e.g. issuing a play/pause event, or altering the volume). - */ -class IInputDevice { - public: - virtual ~IInputDevice() {} - - virtual auto read(lv_indev_data_t* data) -> void = 0; - - virtual auto name() -> std::string = 0; - virtual auto triggers() -> std::vector> { - return {}; - } -}; - -} // namespace input -- cgit v1.2.3