src/npp_gate.cpp
NPError	NPP_GetValue(NPP instance, NPPVariable variable, void *value)
{
  if(instance == NULL)
    return NPERR_INVALID_INSTANCE_ERROR;

  NPError rv = NPERR_NO_ERROR;

  if(instance == NULL)
    return NPERR_GENERIC_ERROR;

  Plugin * plugin = (Plugin *)instance->pdata;
  if(plugin == NULL)
    return NPERR_GENERIC_ERROR;

  switch (variable) {
  case NPPVpluginNameString:
    *((char **)value) = "NPVR";
    break;
  case NPPVpluginDescriptionString:
    *((char **)value) = "NPAPI plugin to expose fun VR devices.";
    break;
  case NPPVpluginScriptableNPObject:
    *(NPObject **)value = plugin->vr_object();
    break;
  default:
    rv = NPERR_GENERIC_ERROR;
  }

  return rv;
}
// ==============================
// ! Scriptability related code !
// ==============================
//
// here the plugin is asked by Mozilla to tell if it is scriptable
// we should return a valid interface id and a pointer to
// nsScriptablePeer interface which we should have implemented
// and which should be defined in the corressponding *.xpt file
// in the bin/components folder

Scriptability related code !

here the plugin is asked by Mozilla to tell if it is scriptable
we should return a valid interface id and a pointer to
nsScriptablePeer interface which we should have implemented
and which should be defined in the corressponding *.xpt file
in the bin/components folder
Scriptability related code ! here the plugin is asked by Mozilla to tell if it is scriptable we should return a valid interface id and a pointer to nsScriptablePeer interface which we should have implemented and which should be defined in the corressponding * . xpt file in the bin / components folder
NPError	NPP_GetValue(NPP instance, NPPVariable variable, void *value)
{
  if(instance == NULL)
    return NPERR_INVALID_INSTANCE_ERROR;
  NPError rv = NPERR_NO_ERROR;
  if(instance == NULL)
    return NPERR_GENERIC_ERROR;
  Plugin * plugin = (Plugin *)instance->pdata;
  if(plugin == NULL)
    return NPERR_GENERIC_ERROR;
  switch (variable) {
  case NPPVpluginNameString:
    *((char **)value) = "NPVR";
    break;
  case NPPVpluginDescriptionString:
    *((char **)value) = "NPAPI plugin to expose fun VR devices.";
    break;
  case NPPVpluginScriptableNPObject:
    *(NPObject **)value = plugin->vr_object();
    break;
  default:
    rv = NPERR_GENERIC_ERROR;
  }
  return rv;
}
NPError NPP_GetValue ( NPP instance , NPPVariable variable , void * value ) { if ( instance == NULL ) return NPERR_INVALID_INSTANCE_ERROR ; NPError rv = NPERR_NO_ERROR ; if ( instance == NULL ) return NPERR_GENERIC_ERROR ; Plugin * plugin = ( Plugin * ) instance -> pdata ; if ( plugin == NULL ) return NPERR_GENERIC_ERROR ; switch ( variable ) { case NPPVpluginNameString : * ( ( char * * ) value ) = " " ; break ; case NPPVpluginDescriptionString : * ( ( char * * ) value ) = " " ; break ; case NPPVpluginScriptableNPObject : * ( NPObject * * ) value = plugin -> vr_object ( ) ; break ; default : rv = NPERR_GENERIC_ERROR ; } return rv ; }
Scriptability related code !
Scriptability related code !