Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
npn_gate.cpp File Reference
#include "xp.h"

Go to the source code of this file.

Functions

void NPN_Version (int *plugin_major, int *plugin_minor, int *netscape_major, int *netscape_minor)
NPError NPN_GetURLNotify (NPP instance, const char *url, const char *target, void *notifyData)
NPError NPN_GetURL (NPP instance, const char *url, const char *target)
NPError NPN_PostURLNotify (NPP instance, const char *url, const char *window, uint32 len, const char *buf, NPBool file, void *notifyData)
NPError NPN_PostURL (NPP instance, const char *url, const char *window, uint32 len, const char *buf, NPBool file)
NPError NPN_RequestRead (NPStream *stream, NPByteRange *rangeList)
NPError NPN_NewStream (NPP instance, NPMIMEType type, const char *target, NPStream **stream)
int32 NPN_Write (NPP instance, NPStream *stream, int32 len, void *buffer)
NPError NPN_DestroyStream (NPP instance, NPStream *stream, NPError reason)
void NPN_Status (NPP instance, const char *message)
const char * NPN_UserAgent (NPP instance)
voidNPN_MemAlloc (uint32 size)
void NPN_MemFree (void *ptr)
uint32 NPN_MemFlush (uint32 size)
void NPN_ReloadPlugins (NPBool reloadPages)
JRIEnvNPN_GetJavaEnv (void)
jref NPN_GetJavaPeer (NPP instance)
NPError NPN_GetValue (NPP instance, NPNVariable variable, void *value)
NPError NPN_SetValue (NPP instance, NPPVariable variable, void *value)
void NPN_InvalidateRect (NPP instance, NPRect *invalidRect)
void NPN_InvalidateRegion (NPP instance, NPRegion invalidRegion)
void NPN_ForceRedraw (NPP instance)

Variables

NPNetscapeFuncs NPNFuncs

Function Documentation

NPError NPN_DestroyStream ( NPP  instance,
NPStream stream,
NPError  reason 
)

Definition at line 148 of file npn_gate.cpp.

{
       int navMinorVersion = NPNFuncs.version & 0xFF;
  NPError rv = NPERR_NO_ERROR;

  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
              rv = CallNPN_DestroyStreamProc(NPNFuncs.destroystream, instance, stream, reason);
       else
              rv = NPERR_INCOMPATIBLE_VERSION_ERROR;

  return rv;
}
void NPN_ForceRedraw ( NPP  instance)

Definition at line 232 of file npn_gate.cpp.

Definition at line 196 of file npn_gate.cpp.

jref NPN_GetJavaPeer ( NPP  instance)

Definition at line 203 of file npn_gate.cpp.

{
  jref rv;
  rv = CallNPN_GetJavaPeerProc(NPNFuncs.getJavaPeer, instance);
  return rv;
}
NPError NPN_GetURL ( NPP  instance,
const char *  url,
const char *  target 
)

Definition at line 90 of file npn_gate.cpp.

{
  NPError rv = CallNPN_GetURLProc(NPNFuncs.geturl, instance, url, target);
  return rv;
}
NPError NPN_GetURLNotify ( NPP  instance,
const char *  url,
const char *  target,
void notifyData 
)

Definition at line 77 of file npn_gate.cpp.

{
       int navMinorVers = NPNFuncs.version & 0xFF;
  NPError rv = NPERR_NO_ERROR;

  if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
              rv = CallNPN_GetURLNotifyProc(NPNFuncs.geturlnotify, instance, url, target, notifyData);
       else
              rv = NPERR_INCOMPATIBLE_VERSION_ERROR;

  return rv;
}
NPError NPN_GetValue ( NPP  instance,
NPNVariable  variable,
void value 
)

Definition at line 210 of file npn_gate.cpp.

{
  NPError rv = CallNPN_GetValueProc(NPNFuncs.getvalue, instance, variable, value);
  return rv;
}
void NPN_InvalidateRect ( NPP  instance,
NPRect invalidRect 
)

Definition at line 222 of file npn_gate.cpp.

{
  CallNPN_InvalidateRectProc(NPNFuncs.invalidaterect, instance, invalidRect);
}
void NPN_InvalidateRegion ( NPP  instance,
NPRegion  invalidRegion 
)

Definition at line 227 of file npn_gate.cpp.

void* NPN_MemAlloc ( uint32  size)

Definition at line 173 of file npn_gate.cpp.

{
  void * rv = NULL;
  rv = CallNPN_MemAllocProc(NPNFuncs.memalloc, size);
  return rv;
}

Definition at line 185 of file npn_gate.cpp.

void NPN_MemFree ( void ptr)

Definition at line 180 of file npn_gate.cpp.

NPError NPN_NewStream ( NPP  instance,
NPMIMEType  type,
const char *  target,
NPStream **  stream 
)

Definition at line 121 of file npn_gate.cpp.

{
       int navMinorVersion = NPNFuncs.version & 0xFF;

  NPError rv = NPERR_NO_ERROR;

       if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
              rv = CallNPN_NewStreamProc(NPNFuncs.newstream, instance, type, target, stream);
       else
              rv = NPERR_INCOMPATIBLE_VERSION_ERROR;

  return rv;
}
NPError NPN_PostURL ( NPP  instance,
const char *  url,
const char *  window,
uint32  len,
const char *  buf,
NPBool  file 
)

Definition at line 109 of file npn_gate.cpp.

{
  NPError rv = CallNPN_PostURLProc(NPNFuncs.posturl, instance, url, window, len, buf, file);
  return rv;
} 
NPError NPN_PostURLNotify ( NPP  instance,
const char *  url,
const char *  window,
uint32  len,
const char *  buf,
NPBool  file,
void notifyData 
)

Definition at line 96 of file npn_gate.cpp.

{
       int navMinorVers = NPNFuncs.version & 0xFF;
  NPError rv = NPERR_NO_ERROR;

       if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
              rv = CallNPN_PostURLNotifyProc(NPNFuncs.posturlnotify, instance, url, window, len, buf, file, notifyData);
       else
              rv = NPERR_INCOMPATIBLE_VERSION_ERROR;

  return rv;
}
void NPN_ReloadPlugins ( NPBool  reloadPages)

Definition at line 191 of file npn_gate.cpp.

NPError NPN_RequestRead ( NPStream stream,
NPByteRange rangeList 
)

Definition at line 115 of file npn_gate.cpp.

{
  NPError rv = CallNPN_RequestReadProc(NPNFuncs.requestread, stream, rangeList);
  return rv;
}
NPError NPN_SetValue ( NPP  instance,
NPPVariable  variable,
void value 
)

Definition at line 216 of file npn_gate.cpp.

{
  NPError rv = CallNPN_SetValueProc(NPNFuncs.setvalue, instance, variable, value);
  return rv;
}
void NPN_Status ( NPP  instance,
const char *  message 
)

Definition at line 161 of file npn_gate.cpp.

const char* NPN_UserAgent ( NPP  instance)

Definition at line 166 of file npn_gate.cpp.

{
  const char * rv = NULL;
  rv = CallNPN_UserAgentProc(NPNFuncs.uagent, instance);
  return rv;
}
void NPN_Version ( int plugin_major,
int plugin_minor,
int netscape_major,
int netscape_minor 
)

Definition at line 69 of file npn_gate.cpp.

{
  *plugin_major   = NP_VERSION_MAJOR;
  *plugin_minor   = NP_VERSION_MINOR;
  *netscape_major = HIBYTE(NPNFuncs.version);
  *netscape_minor = LOBYTE(NPNFuncs.version);
}
int32 NPN_Write ( NPP  instance,
NPStream stream,
int32  len,
void buffer 
)

Definition at line 135 of file npn_gate.cpp.

{
       int navMinorVersion = NPNFuncs.version & 0xFF;
  int32 rv = 0;

  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
              rv = CallNPN_WriteProc(NPNFuncs.write, instance, stream, len, buffer);
       else
              rv = -1;

  return rv;
}

Variable Documentation

Definition at line 45 of file np_entry.cpp.