Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"displayName": "MSVC",
"description": "Configure and generate MSVC project files for all configurations",
"binaryDir": "${sourceDir}/builds/${presetName}",
"generator": "Visual Studio 17 2022",
"generator": "Visual Studio 18 2026",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": {
"type": "boolean",
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Changes in 1.2.10

* [param-hovered.h](include/clap/ext/draft/param-hovered.h): new extension to tell the host when a parameter is mouse hovered within the plugin's GUI.
* [params.h](include/clap/ext/params.h): clarify `CLAP_PARAM_IS_BYPASS`.

# Changes in 1.2.9

* [param-origin.h](include/clap/ext/draft/param-origin.h): new extension to provides an optional value per parameter that lets the host draw a visual indication for the parameter's origin
Expand Down
1 change: 1 addition & 0 deletions include/clap/all.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "ext/draft/mini-curve-display.h"
#include "ext/draft/octave-number.h"
#include "ext/draft/params-origin.h"
#include "ext/draft/param-hovered.h"
#include "ext/draft/project-location.h"
#include "ext/draft/resource-directory.h"
#include "ext/draft/scratch-memory.h"
Expand Down
2 changes: 1 addition & 1 deletion include/clap/ext/draft/background-state-context.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// Some plugin needs to perform complex computation or even I/O during state loading or saving and
/// this blocks the main thread.
///
/// This extension is here to offer an alternative way to load or save the plugin plugin from a
/// This extension is here to offer an alternative way to load or save the plugin from a
/// background thread, to keep the main-thread running.
///
/// Background save and load must not be concurrent to main-thread save and load.
Expand Down
29 changes: 29 additions & 0 deletions include/clap/ext/draft/param-hovered.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once

#include "../../plugin.h"

// This extension lets a plugin report to the host the parameter's clap_id of its last hovered UI
// control and whether it is currently hovered (usually hovered by pointer device).

static CLAP_CONSTEXPR const char CLAP_EXT_PARAM_HOVERED[] = "clap.param-hovered/1";

#ifdef __cplusplus
extern "C" {
#endif

typedef struct clap_host_param_hovered {
// Plugin informs the host about a new hover state.
//
// Should be called whenever the hovered UI control's parameter ID changes or when it changes
// from hovered to not being hovered.
//
// Only one parameter can be hovered at a time. Use CLAP_INVALID_ID as param_id if no parameter
// is hovered.
//
// [main-thread]
void(CLAP_ABI *update)(const clap_host_t *host, clap_id hovered_param_id);
} clap_host_param_hovered_t;

#ifdef __cplusplus
}
#endif
4 changes: 4 additions & 0 deletions include/clap/ext/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,12 @@ enum {

// This parameter is used to merge the plugin and host bypass button.
// It implies that the parameter is stepped.
// Only zero or one bypass parameter is allowed per plugin.
// min: 0 -> bypass off
// max: 1 -> bypass on
// The value of this parameter should not influence whether the host calls plugin->process() or
// not. If a plugin wants to save CPU cycles during bypass, the plugin will implement that in its
// process() routine, possibly returning CLAP_PROCESS_SLEEP at some point.
CLAP_PARAM_IS_BYPASS = 1 << 4,

// When set:
Expand Down
2 changes: 1 addition & 1 deletion include/clap/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ typedef struct clap_version {

#define CLAP_VERSION_MAJOR 1
#define CLAP_VERSION_MINOR 2
#define CLAP_VERSION_REVISION 9
#define CLAP_VERSION_REVISION 10

#define CLAP_VERSION_INIT \
{ (uint32_t)CLAP_VERSION_MAJOR, (uint32_t)CLAP_VERSION_MINOR, (uint32_t)CLAP_VERSION_REVISION }
Expand Down
Loading