commit 8b683996dd68baea6aa7300e1efcd65ec7441587
parent 38550f31e843d1b97975f6c22f92f8535f089f41
Author: falkTX <falktx@falktx.com>
Date: Tue, 18 May 2021 01:25:12 +0100
Add example code to getBackgroundColor and getForegroundColor
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/distrho/DistrhoUI.hpp b/distrho/DistrhoUI.hpp
@@ -78,12 +78,26 @@ public:
/**
Get the color used for UI background (i.e. window color) in RGBA format.
Returns 0 by default, in case of error or lack of host support.
+
+ The following example code can be use to extract individual colors:
+ ```
+ const int red = (bgColor >> 24) & 0xff;
+ const int green = (bgColor >> 16) & 0xff;
+ const int blue = (bgColor >> 8) & 0xff;
+ ```
*/
uint getBackgroundColor() const noexcept;
/**
Get the color used for UI foreground (i.e. text color) in RGBA format.
Returns 0xffffffff by default, in case of error or lack of host support.
+
+ The following example code can be use to extract individual colors:
+ ```
+ const int red = (fgColor >> 24) & 0xff;
+ const int green = (fgColor >> 16) & 0xff;
+ const int blue = (fgColor >> 8) & 0xff;
+ ```
*/
uint getForegroundColor() const noexcept;