NPError
NPP_GetValue(NPP          instance,
	     NPPVariable  variable,
	     void        *value)
{
  g_debug ("NPP_GetValue called");

  switch (variable) {
  case NPPVpluginScriptableNPObject:
    g_debug ("creating scriptable object");
    init_methods_and_properties ();

    *(NPObject**)value = funcs.createobject (instance, &plugin_class);
    break;

  case NPPVpluginNeedsXEmbed:
    *(bool *)value = TRUE;
    break;

  default:
    ;
  }

  return NPERR_NO_ERROR;
}
Beispiel #2
0
NPObject* NPN_CreateObject(NPP id, NPClass *cl)
{
    char msg[1024];
    sprintf(msg, "NPN_CreateObject");
    logger->logMessage(msg);

    NPObject *rv = NPNFuncs.createobject(id, cl);

    sprintf(msg, "--Return: %x", rv);
    logger->logMessage(msg);

    return rv;
}
NPObject *NPN_CreateObject(NPP npp, NPClass *aClass)
{
  return NPNFuncs.createobject(npp, aClass);
}