@@ -34,11 +34,11 @@ if(DPF_LIBRARIES) | |||
if(PKG_CONFIG_FOUND) | |||
pkg_check_modules(CAIRO "cairo") | |||
if(CAIRO_FOUND AND (NOT HAIKU)) | |||
dpf__add_dgl_cairo(TRUE, TRUE) | |||
dpf__add_dgl_cairo(TRUE, TRUE, TRUE) | |||
endif() | |||
endif() | |||
dpf__add_dgl_external(TRUE) | |||
dpf__add_dgl_opengl(TRUE, TRUE) | |||
dpf__add_dgl_external(TRUE, TRUE) | |||
dpf__add_dgl_opengl(TRUE, TRUE, TRUE) | |||
endif() | |||
if(DPF_EXAMPLES) | |||
@@ -12,6 +12,7 @@ all: dgl examples gen | |||
# needed for some example plugins | |||
export USE_FILE_BROWSER = true | |||
export USE_WEB_VIEW = true | |||
ifneq ($(CROSS_COMPILING),true) | |||
CAN_GENERATE_TTL = true | |||
@@ -287,7 +287,7 @@ HAVE_DGL = false | |||
endif | |||
endif | |||
ifeq ($(HAVE_DGL)$(LINUX)$(USE_WEB_VIEW),truetruetrue) | |||
ifeq ($(HAVE_DGL)$(LINUX)$(UI_TYPE),truetruewebview) | |||
DGL_LIB_SHARED = $(shell $(CC) -print-file-name=Scrt1.o) | |||
endif | |||
@@ -121,23 +121,33 @@ function(dpf_add_plugin NAME) | |||
set(_dgl_library) | |||
if(_dpf_plugin_FILES_UI) | |||
if(_dpf_plugin_UI_TYPE STREQUAL "cairo") | |||
dpf__add_dgl_cairo($<NOT:$<BOOL:${_dpf_plugin_NO_SHARED_RESOURCES}>> $<BOOL:${_dpf_plugin_USE_FILE_BROWSER}>) | |||
dpf__add_dgl_cairo($<NOT:$<BOOL:${_dpf_plugin_NO_SHARED_RESOURCES}>> | |||
$<BOOL:${_dpf_plugin_USE_FILE_BROWSER}> | |||
$<BOOL:${_dpf_plugin_USE_WEB_VIEW}>) | |||
set(_dgl_library dgl-cairo) | |||
elseif(_dpf_plugin_UI_TYPE STREQUAL "external") | |||
dpf__add_dgl_external($<BOOL:${_dpf_plugin_USE_FILE_BROWSER}>) | |||
dpf__add_dgl_external($<BOOL:${_dpf_plugin_USE_FILE_BROWSER}> | |||
$<BOOL:${_dpf_plugin_USE_WEB_VIEW}>) | |||
set(_dgl_library dgl-external) | |||
elseif(_dpf_plugin_UI_TYPE STREQUAL "opengl") | |||
dpf__add_dgl_opengl($<NOT:$<BOOL:${_dpf_plugin_NO_SHARED_RESOURCES}>> $<BOOL:${_dpf_plugin_USE_FILE_BROWSER}>) | |||
dpf__add_dgl_opengl($<NOT:$<BOOL:${_dpf_plugin_NO_SHARED_RESOURCES}>> | |||
$<BOOL:${_dpf_plugin_USE_FILE_BROWSER}> | |||
$<BOOL:${_dpf_plugin_USE_WEB_VIEW}>) | |||
set(_dgl_library dgl-opengl) | |||
elseif(_dpf_plugin_UI_TYPE STREQUAL "opengl3") | |||
dpf__add_dgl_opengl3($<NOT:$<BOOL:${_dpf_plugin_NO_SHARED_RESOURCES}>> $<BOOL:${_dpf_plugin_USE_FILE_BROWSER}>) | |||
dpf__add_dgl_opengl3($<NOT:$<BOOL:${_dpf_plugin_NO_SHARED_RESOURCES}>> | |||
$<BOOL:${_dpf_plugin_USE_FILE_BROWSER}> | |||
$<BOOL:${_dpf_plugin_USE_WEB_VIEW}>) | |||
set(_dgl_library dgl-opengl3) | |||
elseif(_dpf_plugin_UI_TYPE STREQUAL "vulkan") | |||
dpf__add_dgl_vulkan($<NOT:$<BOOL:${_dpf_plugin_NO_SHARED_RESOURCES}>> $<BOOL:${_dpf_plugin_USE_FILE_BROWSER}>) | |||
dpf__add_dgl_vulkan($<NOT:$<BOOL:${_dpf_plugin_NO_SHARED_RESOURCES}>> | |||
$<BOOL:${_dpf_plugin_USE_FILE_BROWSER}> | |||
$<BOOL:${_dpf_plugin_USE_WEB_VIEW}>) | |||
set(_dgl_library dgl-vulkan) | |||
elseif(_dpf_plugin_UI_TYPE STREQUAL "webview") | |||
set(_dpf_plugin_USE_WEB_VIEW TRUE) | |||
dpf__add_dgl_external($<BOOL:${_dpf_plugin_USE_FILE_BROWSER}>) | |||
dpf__add_dgl_external($<BOOL:${_dpf_plugin_USE_FILE_BROWSER}> | |||
$<BOOL:${_dpf_plugin_USE_WEB_VIEW}>) | |||
set(_dgl_library dgl-external) | |||
else() | |||
message(FATAL_ERROR "Unrecognized UI type for plugin: ${_dpf_plugin_UI_TYPE}") | |||
@@ -661,7 +671,7 @@ endfunction() | |||
# | |||
# Add the Cairo variant of DGL, if not already available. | |||
# | |||
function(dpf__add_dgl_cairo SHARED_RESOURCES USE_FILE_BROWSER) | |||
function(dpf__add_dgl_cairo SHARED_RESOURCES USE_FILE_BROWSER USE_WEB_VIEW) | |||
if(TARGET dgl-cairo) | |||
return() | |||
endif() | |||
@@ -710,6 +720,10 @@ function(dpf__add_dgl_cairo SHARED_RESOURCES USE_FILE_BROWSER) | |||
target_compile_definitions(dgl-cairo PUBLIC "DGL_USE_FILE_BROWSER") | |||
endif() | |||
if(USE_WEB_VIEW) | |||
target_compile_definitions(dgl-cairo PUBLIC "DGL_USE_FILE_BROWSER") | |||
endif() | |||
dpf__add_dgl_system_libs() | |||
target_link_libraries(dgl-cairo PRIVATE dgl-system-libs) | |||
@@ -730,7 +744,7 @@ endfunction() | |||
# | |||
# Add the external variant of DGL, if not already available. | |||
# | |||
function(dpf__add_dgl_external USE_FILE_BROWSER) | |||
function(dpf__add_dgl_external USE_FILE_BROWSER USE_WEB_VIEW) | |||
if(TARGET dgl-external) | |||
return() | |||
endif() | |||
@@ -770,6 +784,10 @@ function(dpf__add_dgl_external USE_FILE_BROWSER) | |||
target_compile_definitions(dgl-external PUBLIC "DGL_USE_FILE_BROWSER") | |||
endif() | |||
if(USE_WEB_VIEW) | |||
target_compile_definitions(dgl-external PUBLIC "DGL_USE_WEB_VIEW") | |||
endif() | |||
dpf__add_dgl_system_libs() | |||
target_compile_definitions(dgl-external PUBLIC "DGL_NO_SHARED_RESOURCES") | |||
target_link_libraries(dgl-external PRIVATE dgl-system-libs) | |||
@@ -786,7 +804,7 @@ endfunction() | |||
# | |||
# Add the OpenGL variant of DGL, if not already available. | |||
# | |||
function(dpf__add_dgl_opengl SHARED_RESOURCES USE_FILE_BROWSER) | |||
function(dpf__add_dgl_opengl SHARED_RESOURCES USE_FILE_BROWSER USE_WEB_VIEW) | |||
if(TARGET dgl-opengl) | |||
return() | |||
endif() | |||
@@ -841,6 +859,10 @@ function(dpf__add_dgl_opengl SHARED_RESOURCES USE_FILE_BROWSER) | |||
target_compile_definitions(dgl-opengl PUBLIC "DGL_USE_FILE_BROWSER") | |||
endif() | |||
if(USE_WEB_VIEW) | |||
target_compile_definitions(dgl-opengl PUBLIC "DGL_USE_WEB_VIEW") | |||
endif() | |||
dpf__add_dgl_system_libs() | |||
target_link_libraries(dgl-opengl PRIVATE dgl-system-libs) | |||
@@ -856,7 +878,7 @@ endfunction() | |||
# | |||
# Add the OpenGL3 variant of DGL, if not already available. | |||
# | |||
function(dpf__add_dgl_opengl3 SHARED_RESOURCES USE_FILE_BROWSER) | |||
function(dpf__add_dgl_opengl3 SHARED_RESOURCES USE_FILE_BROWSER USE_WEB_VIEW) | |||
if(TARGET dgl-opengl3) | |||
return() | |||
endif() | |||
@@ -911,6 +933,10 @@ function(dpf__add_dgl_opengl3 SHARED_RESOURCES USE_FILE_BROWSER) | |||
target_compile_definitions(dgl-opengl3 PUBLIC "DGL_USE_FILE_BROWSER") | |||
endif() | |||
if(USE_WEB_VIEW) | |||
target_compile_definitions(dgl-opengl3 PUBLIC "DGL_USE_WEB_VIEW") | |||
endif() | |||
dpf__add_dgl_system_libs() | |||
target_link_libraries(dgl-opengl3 PRIVATE dgl-system-libs) | |||
@@ -926,7 +952,7 @@ endfunction() | |||
# | |||
# Add the Vulkan variant of DGL, if not already available. | |||
# | |||
function(dpf__add_dgl_vulkan SHARED_RESOURCES USE_FILE_BROWSER) | |||
function(dpf__add_dgl_vulkan SHARED_RESOURCES USE_FILE_BROWSER USE_WEB_VIEW) | |||
if(TARGET dgl-vulkan) | |||
return() | |||
endif() | |||
@@ -976,6 +1002,10 @@ function(dpf__add_dgl_vulkan SHARED_RESOURCES USE_FILE_BROWSER) | |||
target_compile_definitions(dgl-vulkan PUBLIC "DGL_USE_FILE_BROWSER") | |||
endif() | |||
if(USE_WEB_VIEW) | |||
target_compile_definitions(dgl-vulkan PUBLIC "DGL_USE_WEB_VIEW") | |||
endif() | |||
dpf__add_dgl_system_libs() | |||
target_link_libraries(dgl-vulkan PRIVATE dgl-system-libs) | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Plugin Framework (DPF) | |||
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2025 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 | |||
@@ -41,8 +41,8 @@ | |||
# error typo detected use DGL_USE_FILE_BROWSER instead of DGL_USE_FILEBROWSER | |||
#endif | |||
#ifdef DGL_UI_USE_WEBVIEW | |||
# error typo detected use DGL_UI_USE_WEB_VIEW instead of DGL_UI_USE_WEBVIEW | |||
#ifdef DGL_USE_WEBVIEW | |||
# error typo detected use DGL_USE_WEB_VIEW instead of DGL_USE_WEBVIEW | |||
#endif | |||
#if defined(DGL_FILE_BROWSER_DISABLED) | |||
@@ -23,10 +23,6 @@ START_NAMESPACE_DGL | |||
#include "../distrho/extra/WebViewImpl.hpp" | |||
#if defined(HAVE_X11) && defined(DISTRHO_OS_LINUX) | |||
int dpf_webview_start(int argc, char* argv[]); | |||
#endif | |||
END_NAMESPACE_DGL | |||
#endif // DGL_WEB_VIEW_HPP_INCLUDED |
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Plugin Framework (DPF) | |||
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2025 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 | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Plugin Framework (DPF) | |||
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2025 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 | |||
@@ -66,7 +66,7 @@ | |||
# endif | |||
#endif | |||
#if defined(HAVE_X11) && defined(DISTRHO_OS_LINUX) && DISTRHO_UI_WEB_VIEW && !DISTRHO_IS_STANDALONE | |||
#if defined(DISTRHO_UI_LINUX_WEBVIEW_START) && !DISTRHO_IS_STANDALONE | |||
int main(int argc, char* argv[]) | |||
{ | |||
return DISTRHO_NAMESPACE::dpf_webview_start(argc, argv); | |||
@@ -23,10 +23,6 @@ START_NAMESPACE_DISTRHO | |||
#include "WebViewImpl.hpp" | |||
#if defined(HAVE_X11) && defined(DISTRHO_OS_LINUX) | |||
int dpf_webview_start(int argc, char* argv[]); | |||
#endif | |||
END_NAMESPACE_DISTRHO | |||
#endif // DISTRHO_WEB_VIEW_HPP_INCLUDED |
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Plugin Framework (DPF) | |||
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2025 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 | |||
@@ -18,7 +18,7 @@ | |||
# error bad include | |||
#endif | |||
#if !defined(DGL_UI_USE_WEB_VIEW) && defined(DISTRHO_UI_WEB_VIEW) && DISTRHO_UI_WEB_VIEW == 0 | |||
#if !defined(DGL_USE_WEB_VIEW) && defined(DISTRHO_UI_WEB_VIEW) && DISTRHO_UI_WEB_VIEW == 0 | |||
# error To use WebViews in DPF plugins please set DISTRHO_UI_WEB_VIEW to 1 | |||
#endif | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Plugin Framework (DPF) | |||
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2025 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 | |||
@@ -286,6 +286,10 @@ static_assert(sizeof(STRINGIFY(DISTRHO_PLUGIN_UNIQUE_ID)) == 5, "The macro DISTR | |||
# error DISTRHO_UI_IS_STANDALONE must not be defined | |||
#endif | |||
#ifdef DISTRHO_UI_LINUX_WEBVIEW_START | |||
# error DISTRHO_UI_LINUX_WEBVIEW_START must not be defined | |||
#endif | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
#endif // DISTRHO_PLUGIN_CHECKS_H_INCLUDED |
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Plugin Framework (DPF) | |||
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2025 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
@@ -999,7 +999,7 @@ int main(int argc, char* argv[]) | |||
} | |||
#endif | |||
#if defined(HAVE_X11) && defined(DISTRHO_OS_LINUX) && DISTRHO_UI_WEB_VIEW | |||
#if defined(DISTRHO_UI_LINUX_WEBVIEW_START) | |||
if (argc >= 2 && std::strcmp(argv[1], "dpf-ld-linux-webview") == 0) | |||
return DISTRHO_NAMESPACE::dpf_webview_start(argc, argv); | |||
#endif | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Plugin Framework (DPF) | |||
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2025 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 | |||
@@ -387,7 +387,7 @@ int main(int argc, char* argv[]) | |||
{ | |||
USE_NAMESPACE_DISTRHO | |||
#if defined(HAVE_X11) && defined(DISTRHO_OS_LINUX) && DISTRHO_UI_WEB_VIEW | |||
#if defined(DISTRHO_UI_LINUX_WEBVIEW_START) | |||
if (argc >= 2 && std::strcmp(argv[1], "dpf-ld-linux-webview") == 0) | |||
return DISTRHO_NAMESPACE::dpf_webview_start(argc, argv); | |||
#endif | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Plugin Framework (DPF) | |||
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2025 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 | |||
@@ -63,6 +63,7 @@ START_NAMESPACE_DISTRHO | |||
/* define webview start */ | |||
#if defined(HAVE_X11) && defined(DISTRHO_OS_LINUX) && DISTRHO_UI_WEB_VIEW | |||
# define DISTRHO_UI_LINUX_WEBVIEW_START | |||
int dpf_webview_start(int argc, char* argv[]); | |||
#endif | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Plugin Framework (DPF) | |||
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2025 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 | |||
@@ -33,10 +33,6 @@ | |||
#define DISTRHO_UI_DEFAULT_WIDTH 768 | |||
#define DISTRHO_UI_DEFAULT_HEIGHT 512 | |||
// #ifdef _WIN32 | |||
// #define WEB_VIEW_USING_CHOC 1 | |||
// #endif | |||
enum Parameters { | |||
kParameterWidth = 0, | |||
kParameterHeight, | |||