Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
plugin.cpp File Reference
#include "plugin.h"

Go to the source code of this file.

Defines

#define MIME_TYPES_HANDLED   "application/basic-plugin"
#define PLUGIN_NAME   "Basic Example Plug-in for Mozilla"
#define MIME_TYPES_DESCRIPTION   MIME_TYPES_HANDLED":bsc:"PLUGIN_NAME
#define PLUGIN_DESCRIPTION   PLUGIN_NAME " (Plug-ins SDK sample)"

Functions

char * NPP_GetMIMEDescription (void)
NPError NS_PluginInitialize ()
void NS_PluginShutdown ()
NPError NS_PluginGetValue (NPPVariable aVariable, void *aValue)
nsPluginInstanceBaseNS_NewPluginInstance (nsPluginCreateData *aCreateDataStruct)
void NS_DestroyPluginInstance (nsPluginInstanceBase *aPlugin)
static void xt_event_handler (Widget xtwidget, nsPluginInstance *plugin, XEvent *xevent, Boolean *b)

Define Documentation

Definition at line 42 of file plugin.cpp.

#define MIME_TYPES_HANDLED   "application/basic-plugin"

Definition at line 40 of file plugin.cpp.

#define PLUGIN_DESCRIPTION   PLUGIN_NAME " (Plug-ins SDK sample)"

Definition at line 43 of file plugin.cpp.

#define PLUGIN_NAME   "Basic Example Plug-in for Mozilla"

Definition at line 41 of file plugin.cpp.


Function Documentation

Definition at line 46 of file plugin.cpp.

Definition at line 94 of file plugin.cpp.

{
  if(aPlugin)
    delete (nsPluginInstance *)aPlugin;
}

Definition at line 85 of file plugin.cpp.

{
  if(!aCreateDataStruct)
    return NULL;

  nsPluginInstance * plugin = new nsPluginInstance(aCreateDataStruct->instance);
  return plugin;
}
NPError NS_PluginGetValue ( NPPVariable  aVariable,
void aValue 
)

Definition at line 64 of file plugin.cpp.

{
  NPError err = NPERR_NO_ERROR;
  switch (aVariable) {
    case NPPVpluginNameString:
      *((char **)aValue) = PLUGIN_NAME;
      break;
    case NPPVpluginDescriptionString:
      *((char **)aValue) = PLUGIN_DESCRIPTION;
      break;
    default:
      err = NPERR_INVALID_PARAM;
      break;
  }
  return err;
}

Here is the caller graph for this function:

Definition at line 54 of file plugin.cpp.

{
  return NPERR_NO_ERROR;
}

Definition at line 59 of file plugin.cpp.

{
}
static void xt_event_handler ( Widget  xtwidget,
nsPluginInstance plugin,
XEvent *  xevent,
Boolean b 
) [static]

Definition at line 118 of file plugin.cpp.

{
  switch (xevent->type) {
    case Expose:
      // get rid of all other exposure events
      if (plugin) {
        //while(XCheckTypedWindowEvent(plugin->Display(), plugin->Window(), Expose, xevent));
        plugin->draw();
      }
      default:
        break;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function: