Audacity 3.2.0
Classes | Public Member Functions | Public Attributes | Private Member Functions | List of all members
LV2UIFeaturesList Struct Referencefinal

#include <LV2UIFeaturesList.h>

Inheritance diagram for LV2UIFeaturesList:
[legend]
Collaboration diagram for LV2UIFeaturesList:
[legend]

Classes

struct  UIHandler
 Abstraction of host services that a plug-ins native UI needs. More...
 

Public Member Functions

 LV2UIFeaturesList (const LV2WrapperFeaturesList &baseFeatures, UIHandler *pHandler, const LilvNode *node, LilvInstance *pInstance=nullptr, wxWindow *pParent=nullptr)
 
- Public Member Functions inherited from ExtendedLV2FeaturesList
 ExtendedLV2FeaturesList (WithBase_t, const LV2FeaturesListBase &baseFeatures)
 
virtual ~ExtendedLV2FeaturesList ()
 
FeaturePointers GetFeaturePointers () const override
 
void AddFeature (const char *uri, const void *data)
 
- Public Member Functions inherited from LV2FeaturesListBase
 LV2FeaturesListBase (const LilvPlugin &plug)
 
virtual ~LV2FeaturesListBase ()
 
 LV2FeaturesListBase (const LV2FeaturesListBase &)=delete
 
LV2FeaturesListBaseoperator= (const LV2FeaturesListBase &)=delete
 
virtual FeaturePointers GetFeaturePointers () const =0
 
bool ValidateFeatures (const LilvNode *subject)
 
bool CheckFeatures (const LilvNode *subject, bool required)
 

Static Public Member Functions

static functions that dispatch to a UIHandler
static int ui_resize (LV2UI_Feature_Handle handle, int width, int height)
 
static void ui_closed (LV2UI_Controller controller)
 
static uint32_t suil_port_index (SuilController controller, const char *port_symbol)
 
static void suil_port_write (SuilController controller, uint32_t port_index, uint32_t buffer_size, uint32_t protocol, const void *buffer)
 

Public Attributes

UIHandler *const mpHandler
 
const LV2UI_Resize mUIResizeFeature
 
LV2_Extension_Data_Feature mExtensionDataFeature {}
 
const LilvNodePtr mHumanId { lilv_plugin_get_name(&mPlug) }
 
const LV2_External_UI_Host mExternalUIHost
 
const bool mOk
 
std::vector< LV2_Feature > mFeatures
 
- Public Attributes inherited from ExtendedLV2FeaturesList
const LV2FeaturesListBasemBaseFeatures
 
- Public Attributes inherited from LV2FeaturesListBase
const LilvPlugin & mPlug
 
bool mNoResize { false }
 

Private Member Functions

bool InitializeFeatures (const LilvNode *node, LilvInstance *pInstance, wxWindow *pParent)
 

Additional Inherited Members

- Public Types inherited from LV2FeaturesListBase
using FeaturePointers = std::vector< const LV2_Feature * >
 Get vector of pointers to features, whose .data() can be passed to lv2. More...
 
- Protected Attributes inherited from ExtendedLV2FeaturesList
std::vector< LV2_Feature > mFeatures
 

Detailed Description

Definition at line 27 of file LV2UIFeaturesList.h.

Constructor & Destructor Documentation

◆ LV2UIFeaturesList()

LV2UIFeaturesList::LV2UIFeaturesList ( const LV2WrapperFeaturesList baseFeatures,
UIHandler pHandler,
const LilvNode *  node,
LilvInstance *  pInstance = nullptr,
wxWindow *  pParent = nullptr 
)

Definition at line 19 of file LV2UIFeaturesList.cpp.

22 : ExtendedLV2FeaturesList{ WithBase, baseFeatures }
23 , mpHandler{ pHandler }
24 , mOk{ InitializeFeatures(node, pInstance, pParent) }
25{
26}
constexpr WithBase_t WithBase
Extends one (immutable) feature list (whose lifetime contains this one's)
bool InitializeFeatures(const LilvNode *node, LilvInstance *pInstance, wxWindow *pParent)
UIHandler *const mpHandler

Member Function Documentation

◆ InitializeFeatures()

bool LV2UIFeaturesList::InitializeFeatures ( const LilvNode *  node,
LilvInstance *  pInstance,
wxWindow *  pParent 
)
private
Returns
success

Definition at line 28 of file LV2UIFeaturesList.cpp.

30{
31 AddFeature(LV2_UI__resize, &mUIResizeFeature);
32 mExtensionDataFeature = { pInstance
33 ? lilv_instance_get_descriptor(pInstance)->extension_data
34 : nullptr
35 };
36 AddFeature(LV2_DATA_ACCESS_URI, &mExtensionDataFeature);
39 AddFeature(LV2_INSTANCE_ACCESS_URI,
40 pInstance ? lilv_instance_get_handle(pInstance) : nullptr);
41 AddFeature(LV2_UI__parent, pParent ? pParent->GetHandle() : nullptr);
42 return ValidateFeatures(node);
43}
void AddFeature(const char *uri, const void *data)
bool ValidateFeatures(const LilvNode *subject)
#define LV2_EXTERNAL_UI_DEPRECATED_URI
#define LV2_EXTERNAL_UI__Host
const LV2UI_Resize mUIResizeFeature
const LV2_External_UI_Host mExternalUIHost
LV2_Extension_Data_Feature mExtensionDataFeature

References ExtendedLV2FeaturesList::AddFeature(), LV2_EXTERNAL_UI__Host, LV2_EXTERNAL_UI_DEPRECATED_URI, mExtensionDataFeature, mExternalUIHost, mUIResizeFeature, and LV2FeaturesListBase::ValidateFeatures().

Here is the call graph for this function:

◆ suil_port_index()

uint32_t LV2UIFeaturesList::suil_port_index ( SuilController  controller,
const char *  port_symbol 
)
static

Definition at line 56 of file LV2UIFeaturesList.cpp.

58{
59 return static_cast<UIHandler *>(controller)->suil_port_index(port_symbol);
60}
static uint32_t suil_port_index(SuilController controller, const char *port_symbol)

References suil_port_index().

Referenced by LV2Editor::GetSuilHost(), and suil_port_index().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ suil_port_write()

void LV2UIFeaturesList::suil_port_write ( SuilController  controller,
uint32_t  port_index,
uint32_t  buffer_size,
uint32_t  protocol,
const void *  buffer 
)
static

Definition at line 62 of file LV2UIFeaturesList.cpp.

65{
66 return static_cast<UIHandler *>(controller)
67 ->suil_port_write(port_index, buffer_size, protocol, buffer);
68}
static void suil_port_write(SuilController controller, uint32_t port_index, uint32_t buffer_size, uint32_t protocol, const void *buffer)

References suil_port_write().

Referenced by LV2Editor::GetSuilHost(), and suil_port_write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ui_closed()

void LV2UIFeaturesList::ui_closed ( LV2UI_Controller  controller)
static

Definition at line 51 of file LV2UIFeaturesList.cpp.

52{
53 return static_cast<UIHandler*>(controller)->ui_closed();
54}
static void ui_closed(LV2UI_Controller controller)

References ui_closed().

Referenced by ui_closed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ui_resize()

int LV2UIFeaturesList::ui_resize ( LV2UI_Feature_Handle  handle,
int  width,
int  height 
)
static

Definition at line 45 of file LV2UIFeaturesList.cpp.

47{
48 return static_cast<UIHandler*>(handle)->ui_resize(width, height);
49}
static int ui_resize(LV2UI_Feature_Handle handle, int width, int height)

References ui_resize().

Referenced by ui_resize().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mExtensionDataFeature

LV2_Extension_Data_Feature LV2UIFeaturesList::mExtensionDataFeature {}

Definition at line 70 of file LV2UIFeaturesList.h.

Referenced by InitializeFeatures().

◆ mExternalUIHost

const LV2_External_UI_Host LV2UIFeaturesList::mExternalUIHost
Initial value:
{
LV2UIFeaturesList::ui_closed, lilv_node_as_string(mHumanId.get()) }
const LilvNodePtr mHumanId

Definition at line 73 of file LV2UIFeaturesList.h.

Referenced by InitializeFeatures().

◆ mFeatures

std::vector<LV2_Feature> ExtendedLV2FeaturesList::mFeatures

Definition at line 76 of file LV2FeaturesList.h.

◆ mHumanId

const LilvNodePtr LV2UIFeaturesList::mHumanId { lilv_plugin_get_name(&mPlug) }

Definition at line 72 of file LV2UIFeaturesList.h.

◆ mOk

const bool LV2UIFeaturesList::mOk

Definition at line 78 of file LV2UIFeaturesList.h.

◆ mpHandler

UIHandler* const LV2UIFeaturesList::mpHandler

Definition at line 52 of file LV2UIFeaturesList.h.

◆ mUIResizeFeature

const LV2UI_Resize LV2UIFeaturesList::mUIResizeFeature
Initial value:

Definition at line 67 of file LV2UIFeaturesList.h.

Referenced by InitializeFeatures().


The documentation for this struct was generated from the following files: