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