Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::detail Namespace Reference

Classes

class  DragSessionState
struct  WebViewBackendProvider
 The answer behind detect_webview_backend() and webview_backend_available(). More...

Functions

void register_accessibility_provider (View &root, void *handle)
 Provider-backend lifecycle plumbing.
void unregister_accessibility_provider (void *handle)
void set_precompile_claim_hook_for_tests (std::function< void(const std::string &)> hook)
 Tests only: called by precompile_scripts() on its own thread after it has claimed source and before it compiles it, so a test can hold a compile in flight deterministically.
std::function< void(const std::string &)> precompile_claim_hook_for_tests ()
void clear_embedded_script_bytecode_for_tests ()
 Tests only: forget every registered embedded bytecode blob.
template<typename Control>
state::StateStore::ModulationWatch watch_modulated_display (Control &control, state::StateStore &store, state::ParamID id)
 The modulated-value half of a binding: whatever modulates the parameter – a host's CLAP modulation, or the plugin's own published modulation (StateStore::set_display_modulation) – is drawn on the control as its played value; nothing is drawn when nothing modulates it.
bool note_lite_host_gpu_request ()
 A lite editor binary (pulp_add_plugin LITE_EDITOR) is built without the GPU host.
std::size_t lite_host_gpu_request_count () noexcept
 Requests noted by note_lite_host_gpu_request() in this process.
bool is_js_ident_char (char c)
bool contains_call_token (std::string_view src, std::string_view name)
 Whole-token match: name occurs bounded by non-identifier chars (so exec matches pulp.exec( but not execute or myExec).
const WebViewBackendProvider * set_webview_backend_provider (const WebViewBackendProvider *provider)
 Install an override provider (for tests), or with nullptr remove it so the linked provider answers again; returns the override it replaced.
uint8_t to_cc_value (float normalized)

Function Documentation

◆ clear_embedded_script_bytecode_for_tests()

void pulp::view::detail::clear_embedded_script_bytecode_for_tests ( )

Tests only: forget every registered embedded bytecode blob.

◆ contains_call_token()

bool pulp::view::detail::contains_call_token ( std::string_view src,
std::string_view name )
inline

Whole-token match: name occurs bounded by non-identifier chars (so exec matches pulp.exec( but not execute or myExec).

◆ is_js_ident_char()

bool pulp::view::detail::is_js_ident_char ( char c)
inline

◆ lite_host_gpu_request_count()

std::size_t pulp::view::detail::lite_host_gpu_request_count ( )
noexcept

Requests noted by note_lite_host_gpu_request() in this process.

◆ note_lite_host_gpu_request()

bool pulp::view::detail::note_lite_host_gpu_request ( )

A lite editor binary (pulp_add_plugin LITE_EDITOR) is built without the GPU host.

When its editor asks for one anyway (a scripted UI, or a view whose requires_gpu_host() is true), PluginViewHost::create notes the request here and opens the CoreGraphics host. The first request in the process logs a warning naming the fix; every request is counted. Returns true for the request that logged.

◆ precompile_claim_hook_for_tests()

std::function< void(const std::string &)> pulp::view::detail::precompile_claim_hook_for_tests ( )

◆ register_accessibility_provider()

void pulp::view::detail::register_accessibility_provider ( View & root,
void * handle )

Provider-backend lifecycle plumbing.

Platform implementations register the opaque handle after initialization and unregister it before teardown so the root overload above can find all providers without coupling WidgetBridge to a particular host type. Not part of the consumer-facing provider API.

◆ set_precompile_claim_hook_for_tests()

void pulp::view::detail::set_precompile_claim_hook_for_tests ( std::function< void(const std::string &)> hook)

Tests only: called by precompile_scripts() on its own thread after it has claimed source and before it compiles it, so a test can hold a compile in flight deterministically.

Pass an empty function to clear it.

◆ set_webview_backend_provider()

const WebViewBackendProvider * pulp::view::detail::set_webview_backend_provider ( const WebViewBackendProvider * provider)

Install an override provider (for tests), or with nullptr remove it so the linked provider answers again; returns the override it replaced.

The pointee must outlive every later call to the detector.

◆ to_cc_value()

uint8_t pulp::view::detail::to_cc_value ( float normalized)
inline

◆ unregister_accessibility_provider()

void pulp::view::detail::unregister_accessibility_provider ( void * handle)

◆ watch_modulated_display()

template<typename Control>
state::StateStore::ModulationWatch pulp::view::detail::watch_modulated_display ( Control & control,
state::StateStore & store,
state::ParamID id )

The modulated-value half of a binding: whatever modulates the parameter – a host's CLAP modulation, or the plugin's own published modulation (StateStore::set_display_modulation) – is drawn on the control as its played value; nothing is drawn when nothing modulates it.

Serviced from StateStore::pump_listeners() (the editor's UI tick), so it costs a few relaxed loads per frame and a bounded repaint only when the value moves.