-
-
Notifications
You must be signed in to change notification settings - Fork 375
Expand file tree
/
Copy pathOpenRGBPluginAPI.h
More file actions
78 lines (68 loc) · 4.19 KB
/
Copy pathOpenRGBPluginAPI.h
File metadata and controls
78 lines (68 loc) · 4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*---------------------------------------------------------*\
| OpenRGBPluginAPI.h |
| |
| Interface for OpenRGB plugins to call OpenRGB functions |
| |
| Adam Honse (CalcProgrammer1) 08 Feb 2026 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include "LogManager.h"
#include "OpenRGBPluginInterface.h"
#include "PluginManagerInterface.h"
#include "ProfileManager.h"
#include "ResourceManager.h"
#include "SettingsManager.h"
class OpenRGBPluginAPI : public OpenRGBPluginAPIInterface
{
public:
OpenRGBPluginAPI();
/*-----------------------------------------------------*\
| LogManager APIs |
\*-----------------------------------------------------*/
void LogEntry(const char* filename, int line, unsigned int level, const char* fmt, ...);
/*-----------------------------------------------------*\
| PluginManager APIs |
\*-----------------------------------------------------*/
RGBControllerInterface* CreateVirtualRGBController(RGBController_Setup* setup);
void DeleteVirtualRGBController(RGBControllerInterface* rgb_controller);
void RegisterVirtualRGBController(RGBControllerInterface* rgb_controller);
void RegisterVirtualRGBControllerInThread(RGBControllerInterface* rgb_controller);
void UnregisterVirtualRGBController(RGBControllerInterface* rgb_controller);
void UpdateVirtualRGBController(RGBControllerInterface* rgb_controller, RGBController_Setup* setup);
void UnregisterVirtualRGBControllerInThread(RGBControllerInterface* rgb_controller);
/*-----------------------------------------------------*\
| ProfileManager APIs |
\*-----------------------------------------------------*/
void ClearActiveProfile();
std::vector<std::string> GetProfileList();
bool LoadProfile(std::string profile_name);
/*-----------------------------------------------------*\
| ResourceManager APIs |
\*-----------------------------------------------------*/
filesystem::path GetConfigurationDirectory();
bool GetDetectionEnabled();
unsigned int GetDetectionPercent();
std::string GetDetectionString();
void RescanDevices();
void WaitForDetection();
std::vector<RGBControllerInterface*> GetRGBControllers();
/*-----------------------------------------------------*\
| SettingsManager APIs |
\*-----------------------------------------------------*/
nlohmann::json GetSettings(std::string settings_key);
void SaveSettings();
void SetSettings(std::string settings_key, nlohmann::json new_settings);
/*-----------------------------------------------------*\
| RGBControllers registered by plugin |
\*-----------------------------------------------------*/
std::vector<RGBController*> rgb_controllers;
private:
LogManager * log_manager;
PluginManagerInterface * plugin_manager;
ProfileManager * profile_manager;
ResourceManager * resource_manager;
SettingsManager * settings_manager;
};