DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit b71a32c9a86aaa0207dad0f8460833dd2cf4327f
parent 04032b02e3aef7f176bba86b729ef93b3e99f9c0
Author: falkTX <falktx@falktx.com>
Date:   Sat, 15 May 2021 14:47:26 +0100

Experiment with custom UI type

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/DistrhoInfo.hpp | 21+++++++++++++++++++++
Mdistrho/DistrhoUI.hpp | 3+++
2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/distrho/DistrhoInfo.hpp b/distrho/DistrhoInfo.hpp @@ -562,6 +562,27 @@ START_NAMESPACE_DISTRHO @see Plugin::getTimePosition() */ #define DISTRHO_PLUGIN_WANT_TIMEPOS 1 +/** + Wherever the %UI uses a custom toolkit implementation based on OpenGL.@n + When enabled, the macros @ref DISTRHO_UI_CUSTOM_INCLUDE_PATH and @ref DISTRHO_UI_CUSTOM_WIDGET_TYPE are required. + */ +#define DISTRHO_UI_USE_CUSTOM 1 + +/** + The include path to the header file used by the custom toolkit implementation. + This path must be relative to dpf/distrho/DistrhoUI.hpp + @see DISTRHO_UI_USE_CUSTOM + */ +#define DISTRHO_UI_CUSTOM_INCLUDE_PATH + +/** + The top-level-widget typedef to use for the custom toolkit. + This widget class MUST be a subclass of DGL TopLevelWindow class. + It is recommended that you keep this widget class inside the DGL namespace, + and define widget type as e.g. DGL_NAMESPACE::MyCustomTopLevelWidget. + @see DISTRHO_UI_USE_CUSTOM + */ +#define DISTRHO_UI_CUSTOM_WIDGET_TYPE /** Wherever the %UI uses NanoVG for drawing instead of the default raw OpenGL calls.@n diff --git a/distrho/DistrhoUI.hpp b/distrho/DistrhoUI.hpp @@ -24,6 +24,9 @@ # include "../dgl/Base.hpp" # include "extra/ExternalWindow.hpp" typedef DISTRHO_NAMESPACE::ExternalWindow UIWidget; +#elif DISTRHO_UI_USE_CUSTOM +# include DISTRHO_UI_CUSTOM_INCLUDE_PATH +typedef DISTRHO_UI_CUSTOM_WIDGET_TYPE UIWidget; #elif DISTRHO_UI_USE_NANOVG # include "../dgl/NanoVG.hpp" typedef DGL_NAMESPACE::NanoTopLevelWidget UIWidget;