MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ register_backend_service()

void MayaFlux::Core::InputSubsystem::register_backend_service ( )
private

Definition at line 67 of file InputSubsystem.cpp.

68{
69 auto& registry = Registry::BackendRegistry::instance();
70
71 auto input_service = std::make_shared<Registry::Service::InputService>();
72
73 input_service->get_all_devices = [this]() {
74 return get_all_devices();
75 };
76
77 input_service->open_device = [this](InputType type, uint32_t id) {
78 return open_device(type, id);
79 };
80
81 input_service->close_device = [this](InputType type, uint32_t id) {
82 close_device(type, id);
83 };
84
85 m_input_service = input_service;
86
87 registry.register_service<Registry::Service::InputService>(
88 [input_service]() -> void* {
89 return input_service.get();
90 });
91}
vk::PhysicalDeviceType type
Definition VKDevice.cpp:146
std::vector< InputDeviceInfo > get_all_devices() const
Get all available input devices across all backends.
void close_device(InputType backend_type, uint32_t device_id)
Close a device.
std::shared_ptr< Registry::Service::InputService > m_input_service
bool open_device(InputType backend_type, uint32_t device_id)
Open a device.
static BackendRegistry & instance()
Get the global registry instance.
InputType
Input backend type enumeration.

References close_device(), get_all_devices(), MayaFlux::Registry::BackendRegistry::instance(), m_input_service, open_device(), and type.

Referenced by initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: