clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 8749b6a22488c6dcbb2316b960d233330053b5a5
parent 5080ca011367076a3e06a59c99f03df4f7087342
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Tue, 22 Feb 2022 21:50:33 +0100

work

Diffstat:
Minclude/clap/clap.h | 4----
Dinclude/clap/ext/gui-cocoa.h | 23-----------------------
Dinclude/clap/ext/gui-free-standing.h | 29-----------------------------
Dinclude/clap/ext/gui-win32.h | 27---------------------------
Dinclude/clap/ext/gui-x11.h | 26--------------------------
Minclude/clap/ext/gui.h | 6+++++-
6 files changed, 5 insertions(+), 110 deletions(-)

diff --git a/include/clap/clap.h b/include/clap/clap.h @@ -35,10 +35,6 @@ #include "ext/audio-ports.h" #include "ext/audio-ports-config.h" #include "ext/gui.h" -#include "ext/gui-x11.h" -#include "ext/gui-win32.h" -#include "ext/gui-cocoa.h" -#include "ext/gui-free-standing.h" #include "ext/log.h" #include "ext/params.h" #include "ext/render.h" diff --git a/include/clap/ext/gui-cocoa.h b/include/clap/ext/gui-cocoa.h @@ -1,23 +0,0 @@ -#pragma once - -#include "../plugin.h" - -static CLAP_CONSTEXPR const char CLAP_EXT_GUI_COCOA[] = "clap.gui-cocoa"; - -#ifdef __cplusplus -extern "C" { -#endif - -#pragma pack(push, CLAP_ALIGN) - -// size will be in logical pixels -typedef struct clap_plugin_gui_cocoa { - // [main-thread] - bool (*attach)(const clap_plugin_t *plugin, void *nsView); -} clap_plugin_gui_cocoa_t; - -#pragma pack(pop) - -#ifdef __cplusplus -} -#endif diff --git a/include/clap/ext/gui-free-standing.h b/include/clap/ext/gui-free-standing.h @@ -1,28 +0,0 @@ -#pragma once - -#include "../plugin.h" - -static CLAP_CONSTEXPR const char CLAP_EXT_GUI_FREE_STANDING[] = "clap.gui-free-standing"; - -#ifdef __cplusplus -extern "C" { -#endif - -#pragma pack(push, CLAP_ALIGN) - -typedef struct clap_plugin_gui_free_standing { - // Opens the plugin window as a free standing window, which means it is not - // embedded in the host and managed by the plugin. - // [main-thread] - bool (*open)(const clap_plugin_t *plugin); - - // Suggests a window title - // [main-thread] - void (*suggest_window_title)(const clap_plugin_t *plugin); -} clap_plugin_gui_free_standing_t; - -#pragma pack(pop) - -#ifdef __cplusplus -} -#endif -\ No newline at end of file diff --git a/include/clap/ext/gui-win32.h b/include/clap/ext/gui-win32.h @@ -1,26 +0,0 @@ -#pragma once - -#include "../plugin.h" - -static CLAP_CONSTEXPR const char CLAP_EXT_GUI_WIN32[] = "clap.gui-win32"; - -#ifdef __cplusplus -extern "C" { -#endif - -#pragma pack(push, CLAP_ALIGN) - -// we don't want to include windows.h from this file. -typedef void *clap_hwnd; - -// size will be in physical pixels -typedef struct clap_plugin_gui_win32 { - // [main-thread] - bool (*attach)(const clap_plugin_t *plugin, clap_hwnd window); -} clap_plugin_gui_win32_t; - -#pragma pack(pop) - -#ifdef __cplusplus -} -#endif -\ No newline at end of file diff --git a/include/clap/ext/gui-x11.h b/include/clap/ext/gui-x11.h @@ -1,25 +0,0 @@ -#pragma once - -#include "../plugin.h" - -static CLAP_CONSTEXPR const char CLAP_EXT_GUI_X11[] = "clap.gui-x11"; - -#ifdef __cplusplus -extern "C" { -#endif - -#pragma pack(push, CLAP_ALIGN) - -// size will be in physical pixels -typedef struct clap_plugin_gui_x11 { - // Use the protocol XEmbed - // https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html - // [main-thread] - bool (*attach)(const clap_plugin_t *plugin, const char *display_name, unsigned long window); -} clap_plugin_gui_x11_t; - -#pragma pack(pop) - -#ifdef __cplusplus -} -#endif -\ No newline at end of file diff --git a/include/clap/ext/gui.h b/include/clap/ext/gui.h @@ -35,7 +35,7 @@ static CLAP_CONSTEXPR const char CLAP_EXT_GUI[] = "clap.gui"; static CLAP_CONSTEXPR const char CLAP_GUI_API_WIN32[] = "win32"; static CLAP_CONSTEXPR const char CLAP_GUI_API_X11[] = "x11"; static CLAP_CONSTEXPR const char CLAP_GUI_API_WAYLAND[] = "wayland"; -static CLAP_CONSTEXPR const char CLAP_GUI_API_COCOA[] = "cocoa"; +static CLAP_CONSTEXPR const char CLAP_GUI_API_COCOA[] = "cocoa"; // use logical size static CLAP_CONSTEXPR const char CLAP_GUI_API_FREE[] = "free"; // free standing #ifdef __cplusplus @@ -125,6 +125,10 @@ typedef struct clap_plugin_gui { // [main-thread] bool (*set_transient)(const clap_plugin_t *plugin, const clap_gui_window_t *daw_window); + // Suggests a window title. Only useful when using the "free" windowing API. + // [main-thread] + void (*suggest_window_title)(const clap_plugin_t *plugin); + // Show the window. // [main-thread] void (*show)(const clap_plugin_t *plugin);