Go to the documentation of this file.
10 #include <bnb/utils/defs.hpp>
15 namespace bnb {
namespace interfaces {
18 class effect_activated_listener;
19 class effect_event_listener;
81 virtual std::shared_ptr<effect>
load(
const std::string & url) = 0;
87 virtual std::shared_ptr<effect>
load_async(
const std::string & url) = 0;
107 virtual std::shared_ptr<effect>
current() = 0;
virtual void remove_effect_activated_listener(const std::shared_ptr< effect_activated_listener > &effect_activated_listener)=0
Remove callback to receive notifications on effect change.
virtual void add_hint_listener(const std::shared_ptr< hint_listener > &hint_listener)=0
Add callback to receive user-visible messages from effects.
static effect_info get_effect_info(const std::string &url)
Get effect info.
virtual std::shared_ptr< effect > current()=0
get active Thread-safe.
virtual void add_error_listener(const std::shared_ptr< error_listener > &error_listener)=0
Add callback to receive errors messages from Effect Player.
virtual void unload(const std::shared_ptr< effect > &effect)=0
Unload effect from cache.
virtual void remove_hint_listener(const std::shared_ptr< hint_listener > &hint_listener)=0
Remove callback to receive user-visible messages from effects.
virtual void set_effect_size(int32_t fx_width, int32_t fx_height)=0
Changes effect player render size, should be called on render thread.
Interface to receive errors from EffectPlayer.
virtual void add_effect_event_listener(const std::shared_ptr< effect_event_listener > &effect_event_listener)=0
Add callback to receive events from effect.
Interface to receive notifications on effect change.
virtual std::shared_ptr< effect > load(const std::string &url)=0
load and activate effect sync MUST be called from the render thread
Callback interface for effect events.
virtual void set_effect_volume(float volume)=0
Set effect audio volume.
Callback to receive "hints" (e.g.
virtual void change_cache_quota(int32_t size, int32_t count)=0
size in Mb, effects count Thread-safe.
virtual void add_effect_activated_listener(const std::shared_ptr< effect_activated_listener > &effect_activated_listener)=0
Add callback to receive notifications on effect change.
virtual std::shared_ptr< effect > load_async(const std::string &url)=0
load effect async, activate in the draw() call when it will be ready Thread-safe.
virtual void remove_effect_event_listener(const std::shared_ptr< effect_event_listener > &effect_event_listener)=0
Remove callback to receive events from effect.
virtual void force_cache_reload()=0
Forces cache reload on the next load/load_async call Thread-safe.
virtual void remove_error_listener(const std::shared_ptr< error_listener > &error_listener)=0
Remove callback to receive errors messages from Effect Player.