From 53e5fdcaaa775bd81a900dd1cf5fc36623d623f8 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Tue, 23 Sep 2025 20:34:55 -0500 Subject: [PATCH] Update Plugin API to 5 and SDK Protocol to 6 --- NetworkProtocol.h | 5 +++-- OpenRGBPluginInterface.h | 35 ++++++++++++++++++----------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/NetworkProtocol.h b/NetworkProtocol.h index 041220c8e..b44dfa650 100644 --- a/NetworkProtocol.h +++ b/NetworkProtocol.h @@ -20,9 +20,10 @@ | 3: Add brightness field to modes (Release 0.7) | | 4: Add segments field to zones, network plugins (Release 0.9) | | 5: Zone flags, controller flags, resizable effects-only zones | - (Release 1.0) | +| (Release Candidate 1.0rc2) | +| 6: Server name, Features TBD (Release 1.0) | \*---------------------------------------------------------------------*/ -#define OPENRGB_SDK_PROTOCOL_VERSION 5 +#define OPENRGB_SDK_PROTOCOL_VERSION 6 /*-----------------------------------------------------*\ | Default Interface to bind to. | diff --git a/OpenRGBPluginInterface.h b/OpenRGBPluginInterface.h index 5eae98de0..45ad382ae 100644 --- a/OpenRGBPluginInterface.h +++ b/OpenRGBPluginInterface.h @@ -25,13 +25,14 @@ | 1: OpenRGB 0.61 First versioned API, introduced with plugin settings changes | | 2: OpenRGB 0.7 First released versioned API, callback unregister functions in ResourceManager | | 3: OpenRGB 0.9 Use filesystem::path for paths, Added segments | -| 4: OpenRGB 1.0 Resizable effects-only zones, zone flags | +| 4: OpenRGB 1.0rc2 Resizable effects-only zones, zone flags | +| 5: OpenRGB 1.0 RGBController API overhaul, protected members, features TBD | \*-----------------------------------------------------------------------------------------------------*/ -#define OPENRGB_PLUGIN_API_VERSION 4 +#define OPENRGB_PLUGIN_API_VERSION 5 -/*-----------------------------------------------------------------------------------------------------*\ -| Plugin Tab Location Values | -\*-----------------------------------------------------------------------------------------------------*/ +/*---------------------------------------------------------*\ +| Plugin Tab Location Values | +\*---------------------------------------------------------*/ enum { OPENRGB_PLUGIN_LOCATION_TOP = 0, /* Top-level tab (no icon) */ @@ -42,9 +43,9 @@ enum struct OpenRGBPluginInfo { - /*-------------------------------------------------------------------------------------------------*\ - | Plugin Details | - \*-------------------------------------------------------------------------------------------------*/ + /*-----------------------------------------------------*\ + | Plugin Details | + \*-----------------------------------------------------*/ std::string Name; /* Plugin name string */ std::string Description; /* Plugin description string */ std::string Version; /* Plugin version string */ @@ -52,9 +53,9 @@ struct OpenRGBPluginInfo std::string URL; /* Plugin project URL string */ QImage Icon; /* Icon image (displayed 64x64) */ - /*-------------------------------------------------------------------------------------------------*\ - | Plugin Tab Configuration | - \*-------------------------------------------------------------------------------------------------*/ + /*-----------------------------------------------------*\ + | Plugin Tab Configuration | + \*-----------------------------------------------------*/ unsigned int Location; /* Plugin tab location from Plugin Tab Location enum */ /* This field is mandatory, an invalid value will */ /* prevent plugin tab from being displayed */ @@ -68,15 +69,15 @@ class OpenRGBPluginInterface public: virtual ~OpenRGBPluginInterface() {} - /*-------------------------------------------------------------------------------------------------*\ - | Plugin Information | - \*-------------------------------------------------------------------------------------------------*/ + /*-----------------------------------------------------*\ + | Plugin Information | + \*-----------------------------------------------------*/ virtual OpenRGBPluginInfo GetPluginInfo() = 0; virtual unsigned int GetPluginAPIVersion() = 0; - /*-------------------------------------------------------------------------------------------------*\ - | Plugin Functionality | - \*-------------------------------------------------------------------------------------------------*/ + /*-----------------------------------------------------*\ + | Plugin Functionality | + \*-----------------------------------------------------*/ virtual void Load(ResourceManagerInterface* resource_manager_ptr) = 0; virtual QWidget* GetWidget() = 0; virtual QMenu* GetTrayMenu() = 0;