68inline int ATTR_DLL_LOCAL
Show(
const std::string& heading,
const std::vector<std::string>& entries)
70 using namespace ::kodi::addon;
71 unsigned int size =
static_cast<unsigned int>(entries.size());
72 const char** cEntries =
static_cast<const char**
>(malloc(size *
sizeof(
const char**)));
73 for (
unsigned int i = 0; i < size; ++i)
75 cEntries[i] = entries[i].c_str();
77 int ret = CPrivateBase::m_interface->toKodi->kodi_gui->dialogContextMenu->open(
78 CPrivateBase::m_interface->toKodi->kodiBase, heading.c_str(), cEntries, size);
115inline int ATTR_DLL_LOCAL
Show(
const std::string& heading,
116 const std::vector<std::pair<std::string, std::string>>& entries)
118 using namespace ::kodi::addon;
119 unsigned int size =
static_cast<unsigned int>(entries.size());
120 const char** cEntries =
static_cast<const char**
>(malloc(size *
sizeof(
const char**)));
121 for (
unsigned int i = 0; i < size; ++i)
123 cEntries[i] = entries[i].second.c_str();
125 int ret = CPrivateBase::m_interface->toKodi->kodi_gui->dialogContextMenu->open(
126 CPrivateBase::m_interface->toKodi->kodiBase, heading.c_str(), cEntries, size);
163inline int ATTR_DLL_LOCAL
Show(
const std::string& heading,
164 const std::vector<std::pair<int, std::string>>& entries)
166 using namespace ::kodi::addon;
167 unsigned int size =
static_cast<unsigned int>(entries.size());
168 const char** cEntries =
static_cast<const char**
>(malloc(size *
sizeof(
const char**)));
169 for (
unsigned int i = 0; i < size; ++i)
171 cEntries[i] = entries[i].second.c_str();
173 int ret = CPrivateBase::m_interface->toKodi->kodi_gui->dialogContextMenu->open(
174 CPrivateBase::m_interface->toKodi->kodiBase, heading.c_str(), cEntries, size);