Browse Source

Experiment with custom UI type

Signed-off-by: falkTX <falktx@falktx.com>
pull/272/head
falkTX 4 years ago
parent
commit
b71a32c9a8
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 24 additions and 0 deletions
  1. +21
    -0
      distrho/DistrhoInfo.hpp
  2. +3
    -0
      distrho/DistrhoUI.hpp

+ 21
- 0
distrho/DistrhoInfo.hpp View File

@@ -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


+ 3
- 0
distrho/DistrhoUI.hpp View File

@@ -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;


Loading…
Cancel
Save