Commit 46634a5c authored by Sergey Radionov's avatar Sergey Radionov Committed by Jean-Baptiste Kempf

npapi win32: added support of Event Listeners

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent cbab6ffd
......@@ -212,6 +212,13 @@ void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int*
*netscape_minor = LOBYTE(g_pNavigatorFuncs->version);
}
void NPN_PluginThreadAsyncCall(NPP plugin, void (*func)(void *), void *userData)
{
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) >= 20)
(g_pNavigatorFuncs->pluginthreadasynccall)(plugin, func, userData);
#endif
}
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *result)
{
return g_pNavigatorFuncs->getvalue(instance, variable, result);
......
......@@ -375,7 +375,7 @@ void VlcPluginBase::eventAsync(void *param)
void VlcPluginBase::event_callback(const libvlc_event_t* event,
NPVariant *npparams, uint32_t npcount)
{
#ifdef XP_UNIX
#if defined(XP_UNIX) || defined(XP_WIN)
events.callback(event, npparams, npcount);
NPN_PluginThreadAsyncCall(getBrowser(), eventAsync, this);
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment