MayaFlux
0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
InputService.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
MayaFlux/Core/Input/InputBinding.hpp
"
4
5
namespace
MayaFlux::Registry::Service
{
6
7
/**
8
* @brief Backend input device service interface
9
*
10
* Provides device discovery and management for input subsystem.
11
* Follows the same service pattern as DisplayService, BufferService, and ComputeService.
12
*
13
* Enables InputManager to query and open devices without coupling to InputSubsystem.
14
*/
15
struct
MAYAFLUX_API
InputService
{
16
17
/**
18
* @brief Query all available input devices across all backends
19
* @return Vector of device info structures
20
*
21
* Returns devices from all registered backends (HID, MIDI, OSC, Serial).
22
* Used by InputManager to resolve VID/PID bindings to device IDs.
23
*/
24
std::function<std::vector<Core::InputDeviceInfo>()>
get_all_devices
;
25
26
/**
27
* @brief Open a specific input device
28
* @param backend_type Backend type (HID, MIDI, OSC, Serial)
29
* @param device_id Device identifier from InputDeviceInfo
30
* @return true if device opened successfully
31
*
32
* Delegates to appropriate backend's open_device() method.
33
* Device must exist in get_all_devices() results before opening.
34
*/
35
std::function<bool(
Core::InputType
, uint32_t)>
open_device
;
36
37
/**
38
* @brief Close a specific input device
39
* @param backend_type Backend type (HID, MIDI, OSC, Serial)
40
* @param device_id Device identifier
41
*
42
* Stops receiving events from device and releases resources.
43
* Safe to call on already-closed or non-existent devices (no-op).
44
*/
45
std::function<void(
Core::InputType
, uint32_t)>
close_device
;
46
};
47
48
}
// namespace MayaFlux::Registry::Service
InputBinding.hpp
MayaFlux::Core::InputType
InputType
Input backend type enumeration.
Definition
InputBinding.hpp:8
MayaFlux::Registry::Service
Definition
VKBuffer.hpp:10
MayaFlux::Registry::Service::InputService::get_all_devices
std::function< std::vector< Core::InputDeviceInfo >()> get_all_devices
Query all available input devices across all backends.
Definition
InputService.hpp:24
MayaFlux::Registry::Service::InputService::open_device
std::function< bool(Core::InputType, uint32_t)> open_device
Open a specific input device.
Definition
InputService.hpp:35
MayaFlux::Registry::Service::InputService::close_device
std::function< void(Core::InputType, uint32_t)> close_device
Close a specific input device.
Definition
InputService.hpp:45
MayaFlux::Registry::Service::InputService
Backend input device service interface.
Definition
InputService.hpp:15
src
MayaFlux
Registry
Service
InputService.hpp
Generated by
1.9.8