Pulp
1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
clap_contract_gui.hpp
Go to the documentation of this file.
1
#pragma once
2
3
// The CLAP GUI of a processor that supplies an editor factory
4
// (`Processor::editor_factory()`, see pulp/format/editor_host.hpp).
5
//
6
// The per-plug-in CLAP entry returns this `clap_plugin_gui` whenever the
7
// initialized processor's factory is non-null, and keeps its own GUI (the
8
// `create_view()` path, compiled only with PULP_CLAP_GUI) otherwise. It needs
9
// no view layer, so a view-free plug-in (`pulp_add_plugin(... UI <package>)`,
10
// which links pulp-format-clap-core) has a working editor.
11
//
12
// Each create() opens one ContractEditorSession (contract_editor_session.hpp)
13
// over the adapter's store. Edits go through its StateStoreParamPort into the
14
// store, whose gesture and value changes the adapter already reports to the
15
// host as CLAP param gesture and value events. The calls map as:
16
//
17
// is_api_supported / get_preferred_api -> the platform's embedded window API
18
// create / destroy -> a new session / detach and drop it
19
// set_parent -> Editor::attach(NativeParent)
20
// show / hide -> Editor::visibility_changed()
21
// set_scale -> Editor::set_size() with the new scale
22
// get_size / set_size -> Editor::size() / Editor::set_size()
23
// can_resize / get_resize_hints / adjust_size -> the editor's size hints and
24
// adjust_size(), clamped to the hints
25
// plug-in destroy -> the session goes before the processor; an
26
// editor still attached is invalidated
27
//
28
// Idle: when the host offers timer-support, a timer registered at set_parent()
29
// drives Editor::idle() through this plug-in's timer-support extension;
30
// otherwise, or when the host refuses that timer, the session's own main-thread
31
// timer does. The processor's editor factory is read once by clap_init() on the
32
// main thread, since get_extension() may be called from any thread. CLAP has no key callback,
33
// so keys reach the editor only through its own native view, and Space reaches
34
// the host the way the host's window routes it.
35
36
#include <clap/clap.h>
37
#include <clap/ext/gui.h>
38
#include <clap/ext/timer-support.h>
39
40
namespace
pulp::format
{
41
class
ContractEditorSession
;
42
}
43
44
namespace
pulp::format::clap_adapter
{
45
49
const
clap_plugin_gui_t*
contract_gui_extension
(
const
clap_plugin_t*
plugin
);
50
53
const
clap_plugin_timer_support_t*
contract_timer_extension
(
const
clap_plugin_t*
plugin
);
54
58
ContractEditorSession
*
contract_gui_session
(
const
clap_plugin_t*
plugin
);
59
60
}
// namespace pulp::format::clap_adapter
pulp::format::ContractEditorSession
Definition
contract_editor_session.hpp:92
pulp::format::clap_adapter
Definition
clap_adapter.hpp:43
pulp::format::clap_adapter::contract_gui_session
ContractEditorSession * contract_gui_session(const clap_plugin_t *plugin)
The session behind plugin's open contract GUI, or null when none is open, so an in-process host (auto...
pulp::format::clap_adapter::contract_timer_extension
const clap_plugin_timer_support_t * contract_timer_extension(const clap_plugin_t *plugin)
The timer-support extension that drives a contract editor's idle tick, or null when the contract GUI ...
pulp::format::clap_adapter::contract_gui_extension
const clap_plugin_gui_t * contract_gui_extension(const clap_plugin_t *plugin)
The contract GUI extension for plugin, or null when its processor is not initialized,...
pulp::format
What the product grants a device: the quota table indexed by capability tier and live thermal state.
Definition
aax_editor.hpp:31
pulp::format::EditorHostKind::plugin
@ plugin
Definition
editor_host_kind.hpp:15
core
format
include
pulp
format
clap_contract_gui.hpp
Generated by
1.15.0