diff options
author | Robin Gareus <robin@gareus.org> | 2019-08-26 18:57:47 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-08-26 18:57:47 +0200 |
commit | 80e30ea0d19815925492ac736c6e87384bfc2c55 (patch) | |
tree | e6004fd44211d6890022bb1c2aeffe2c73e2c8e6 /libs/ardour/ardour/lv2_plugin.h | |
parent | e286cce3991ad650ccdac3bc4c283afe24e4618b (diff) |
LV2 options for UI theme
Inform plugins about host theme (fg, bg colors) and UI scale-factor.
The latter follows an implementation already present in Carla and DPF.
These extension use proposed official URLs.
Diffstat (limited to 'libs/ardour/ardour/lv2_plugin.h')
-rw-r--r-- | libs/ardour/ardour/lv2_plugin.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h index 734a8d7e21..6c9fea54f5 100644 --- a/libs/ardour/ardour/lv2_plugin.h +++ b/libs/ardour/ardour/lv2_plugin.h @@ -175,6 +175,17 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee Variant get_property_value (uint32_t) const; void announce_property_values(); + /* LV2 Option Options */ + static void set_global_ui_background_color (uint32_t c) { + _ui_background_color = c; + } + static void set_global_ui_foreground_color (uint32_t c) { + _ui_foreground_color = c; + } + static void set_global_ui_scale_factor (float s) { + _ui_scale_factor = s; + } + private: struct Impl; Impl* _impl; @@ -298,7 +309,6 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee if (chn > 15) return UINT32_MAX; return _bankpatch[chn]; } - #endif typedef struct { @@ -320,7 +330,10 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee #endif // Options passed to plugin - int32_t _seq_size; + int32_t _seq_size; + static uint32_t _ui_background_color; + static uint32_t _ui_foreground_color; + static float _ui_scale_factor; mutable unsigned _state_version; |