예제 #1
0
void VlcWindowlessBase::video_display_cb(void * /*picture*/)
{
    if (p_browser) {
        NPN_PluginThreadAsyncCall(p_browser,
                                  VlcWindowlessBase::invalidate_window_proxy,
                                  this);
    }
}
예제 #2
0
void VlcPluginBase::event_callback(const libvlc_event_t* event,
                NPVariant *npparams, uint32_t npcount)
{
#if defined(XP_UNIX) || defined(XP_WIN)
    events.callback(event, npparams, npcount);
    NPN_PluginThreadAsyncCall(getBrowser(), eventAsync, this);
#else
#   warning NPN_PluginThreadAsyncCall not implemented yet.
    printf("No NPN_PluginThreadAsyncCall(), doing nothing.\n");
#endif
}
static void Android_NPN_PluginThreadAsyncCall(NPP instance,
                                              void (*func) (void *),
                                              void *userData)
{
    // Translate all instance == NULL to a dummy actual npp.
    static DummyNpp dummyNpp;
    if (instance == NULL) {
        instance = dummyNpp.getInstance();
    }
    // Call through to the wrapped function.
    NPN_PluginThreadAsyncCall(instance, func, userData);
}
예제 #4
0
/**
 * Handles callbacks for async functions with a reply
 * 
 * @param obj Object that contains the plugin
 * @param reply Reply structure that contains which callback should be called, and with what args
 */
void 
jsInvokeCallback(jsInterfaceObject* obj, ScriptReply* reply)
{
    NPP plugin;

    plugin = obj->plugin;
    assert(plugin);
    if (reply) 
    {
        // Populate the reply structure
        reply->plugin = plugin;
        NPN_PluginThreadAsyncCall(plugin, (NPCallback)jsReply, reply);
    }
}
void nsScriptableObjectRawInput::ExecuteMethod(PluginMethod* method) {

  while ((!shutting_down_) && nullptr != method) {
	  method->Execute();

	  if (!method->HasCallback()) {
		delete method;
		return;
	  }

	  NPN_PluginThreadAsyncCall(
		npp_, 
		nsScriptableObjectRawInput::ExecuteCallback, 
		method);
  }
  if (nullptr != method)
	  delete method;
}
예제 #6
0
 void ScheduleAsyncCallback( void* scheduleUserData, void (*callbackFunc)(void *), void *callbackFuncUserData )
 {
   NPN_PluginThreadAsyncCall( (NPP)scheduleUserData, callbackFunc, callbackFuncUserData );
 }