Browse Source

Cleanup

Signed-off-by: falkTX <falktx@falktx.com>
pull/457/head
falkTX 1 year ago
parent
commit
8b7226c7d4
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 19 additions and 27 deletions
  1. +2
    -4
      dgl/Widget.hpp
  2. +1
    -3
      distrho/DistrhoUI_macOS.mm
  3. +16
    -20
      distrho/src/DistrhoPluginChecks.h

+ 2
- 4
dgl/Widget.hpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO Plugin Framework (DPF)
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
@@ -404,12 +404,10 @@ public:
Window& getParentWindow() const noexcept { return getWindow(); }

protected:
#if defined(DGL_CAIRO) || defined(DGL_OPENGL) || defined(DGL_VULKAN)
/**
A function called to draw the widget contents.
*/
virtual void onDisplay() = 0;
#endif
virtual void onDisplay() {};

/**
A function called when a key is pressed or released.


+ 1
- 3
distrho/DistrhoUI_macOS.mm View File

@@ -20,9 +20,7 @@
#include "src/DistrhoPluginChecks.h"
#include "src/DistrhoDefines.h"

#if DISTRHO_UI_FILE_BROWSER || DISTRHO_UI_WEB_VIEW || DISTRHO_PLUGIN_HAS_EXTERNAL_UI
# import <Cocoa/Cocoa.h>
#endif
#import <Cocoa/Cocoa.h>

#if DISTRHO_UI_FILE_BROWSER
# define DISTRHO_FILE_BROWSER_DIALOG_HPP_INCLUDED


+ 16
- 20
distrho/src/DistrhoPluginChecks.h View File

@@ -91,11 +91,7 @@
#endif

#ifndef DISTRHO_UI_FILE_BROWSER
# if defined(DGL_FILE_BROWSER_DISABLED) || DISTRHO_PLUGIN_HAS_EXTERNAL_UI
# define DISTRHO_UI_FILE_BROWSER 0
# else
# define DISTRHO_UI_FILE_BROWSER 1
# endif
# define DISTRHO_UI_FILE_BROWSER 0
#endif

#ifndef DISTRHO_UI_WEB_VIEW
@@ -106,6 +102,17 @@
# define DISTRHO_UI_USER_RESIZABLE 0
#endif

// --------------------------------------------------------------------------------------------------------------------
// set UI type

#ifndef DISTRHO_UI_USE_CAIRO
# define DISTRHO_UI_USE_CAIRO 0
#endif

#ifndef DISTRHO_UI_USE_CUSTOM
# define DISTRHO_UI_USE_CUSTOM 0
#endif

#ifndef DISTRHO_UI_USE_EXTERNAL
# define DISTRHO_UI_USE_EXTERNAL 0
#endif
@@ -136,14 +143,14 @@
// --------------------------------------------------------------------------------------------------------------------
// Test for wrong compiler macros

#if defined(DISTRHO_PLUGIN_HAS_EXTERNAL_UI)
# error DISTRHO_PLUGIN_HAS_EXTERNAL_UI has been replaced by DISTRHO_UI_USE_EXTERNAL
#endif

#if defined(DISTRHO_PLUGIN_HAS_EMBED_UI)
# warning DISTRHO_PLUGIN_HAS_EMBED_UI has been removed, it is now always on
#endif

#if defined(DISTRHO_PLUGIN_HAS_EXTERNAL_UI)
# error DISTRHO_PLUGIN_HAS_EXTERNAL_UI has been replaced by DISTRHO_UI_USE_EXTERNAL
#endif

#if defined(DGL_CAIRO) && defined(DGL_OPENGL)
# error invalid build config: trying to build for both cairo and opengl at the same time
#elif defined(DGL_EXTERNAL) && defined(DGL_CAIRO)
@@ -216,17 +223,6 @@
# error DISTRHO_UI_DEFAULT_HEIGHT is defined but DISTRHO_UI_DEFAULT_WIDTH is not
#endif

// --------------------------------------------------------------------------------------------------------------------
// Other UI defaults

#ifndef DISTRHO_UI_USE_CAIRO
# define DISTRHO_UI_USE_CAIRO 0
#endif

#ifndef DISTRHO_UI_USE_CUSTOM
# define DISTRHO_UI_USE_CUSTOM 0
#endif

// --------------------------------------------------------------------------------------------------------------------
// Define DISTRHO_PLUGIN_AU_TYPE if needed



Loading…
Cancel
Save