Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
npn.h File Reference
#include "npapi.h"
#include "npupp.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NP_EXPORT

Functions

NPError NP_EXPORT NPN_RequestRead (NPStream *pstream, NPByteRange *rangeList)
NPError NP_EXPORT NPN_GetURLNotify (NPP npp, const char *relativeURL, const char *target, void *notifyData)
NPError NP_EXPORT NPN_GetValue (NPP npp, NPNVariable variable, void *r_value)
NPError NP_EXPORT NPN_SetValue (NPP npp, NPPVariable variable, void *r_value)
NPError NP_EXPORT NPN_GetURL (NPP npp, const char *relativeURL, const char *target)
NPError NP_EXPORT NPN_PostURLNotify (NPP npp, const char *relativeURL, const char *target, uint32 len, const char *buf, NPBool file, void *notifyData)
NPError NP_EXPORT NPN_PostURL (NPP npp, const char *relativeURL, const char *target, uint32 len, const char *buf, NPBool file)
NPError NP_EXPORT NPN_NewStream (NPP npp, NPMIMEType type, const char *window, NPStream **pstream)
int32 NP_EXPORT NPN_Write (NPP npp, NPStream *pstream, int32 len, void *buffer)
NPError NP_EXPORT NPN_DestroyStream (NPP npp, NPStream *pstream, NPError reason)
void NP_EXPORT NPN_Status (NPP npp, const char *message)
void *NP_EXPORT NPN_MemAlloc (uint32 size)
void NP_EXPORT NPN_MemFree (void *ptr)
uint32 NP_EXPORT NPN_MemFlush (uint32 size)
void NP_EXPORT NPN_ReloadPlugins (NPBool reloadPages)
void NP_EXPORT NPN_InvalidateRect (NPP npp, NPRect *invalidRect)
void NP_EXPORT NPN_InvalidateRegion (NPP npp, NPRegion invalidRegion)
const char *NP_EXPORT NPN_UserAgent (NPP npp)
JRIEnv *NP_EXPORT NPN_GetJavaEnv (void)
jref NP_EXPORT NPN_GetJavaPeer (NPP npp)
java_lang_Class *NP_EXPORT NPN_GetJavaClass (void *handle)
void NP_EXPORT NPN_ForceRedraw (NPP npp)

Define Documentation

Definition at line 43 of file npn.h.


Function Documentation

NPError NP_EXPORT NPN_DestroyStream ( NPP  npp,
NPStream pstream,
NPError  reason 
)

Definition at line 264 of file npwin.cpp.

{
       int navMinorVersion = g_pNavigatorFuncs->version & 0xFF;
       NPError err;

       if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) {
              err = g_pNavigatorFuncs->destroystream(instance, stream, reason);
       }
       else {
              err = NPERR_INCOMPATIBLE_VERSION_ERROR;
       }
       return err;
}

Definition at line 331 of file npn.cpp.

{
    if (!npp)
    {
        return;
    }
    // TODO - windowless plugins
}
java_lang_Class* NP_EXPORT NPN_GetJavaClass ( void handle)

Definition at line 444 of file npn.cpp.

{
    return NULL;
}

Definition at line 316 of file npwin.cpp.

Definition at line 321 of file npwin.cpp.

{
       return g_pNavigatorFuncs->getJavaPeer(instance);
}
NPError NP_EXPORT NPN_GetURL ( NPP  npp,
const char *  relativeURL,
const char *  target 
)

Definition at line 193 of file npwin.cpp.

{
    return g_pNavigatorFuncs->geturl(instance, url, target);
}
NPError NP_EXPORT NPN_GetURLNotify ( NPP  npp,
const char *  relativeURL,
const char *  target,
void notifyData 
)

Definition at line 178 of file npwin.cpp.

{
       int navMinorVers = g_pNavigatorFuncs->version & 0xFF;
       NPError err;
       if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) {
              err = g_pNavigatorFuncs->geturlnotify(instance, url, target, notifyData);
       }
       else {
              err = NPERR_INCOMPATIBLE_VERSION_ERROR;
       }
       return err;
}
NPError NP_EXPORT NPN_GetValue ( NPP  npp,
NPNVariable  variable,
void r_value 
)

Definition at line 326 of file npwin.cpp.

{
    return g_pNavigatorFuncs->getvalue(instance, variable, result);
}
void NP_EXPORT NPN_InvalidateRect ( NPP  npp,
NPRect invalidRect 
)

Definition at line 306 of file npn.cpp.

{
    if (!npp)
    {
        return;
    }

    // TODO - windowless plugins
}
void NP_EXPORT NPN_InvalidateRegion ( NPP  npp,
NPRegion  invalidRegion 
)

Definition at line 319 of file npn.cpp.

{
    if (!npp)
    {
        return;
    }
    // TODO - windowless plugins
}

Definition at line 297 of file npwin.cpp.

Definition at line 291 of file npn.cpp.

{
    return 0;
}

Definition at line 304 of file npwin.cpp.

NPError NP_EXPORT NPN_NewStream ( NPP  npp,
NPMIMEType  type,
const char *  window,
NPStream **  pstream 
)

Definition at line 229 of file npwin.cpp.

{
       int navMinorVersion = g_pNavigatorFuncs->version & 0xFF;
       NPError err;

       if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) {
              err = g_pNavigatorFuncs->newstream(instance, type, target, stream);
       }
       else {
              err = NPERR_INCOMPATIBLE_VERSION_ERROR;
       }
       return err;
}
NPError NP_EXPORT NPN_PostURL ( NPP  npp,
const char *  relativeURL,
const char *  target,
uint32  len,
const char *  buf,
NPBool  file 
)

Definition at line 212 of file npwin.cpp.

{
    return g_pNavigatorFuncs->posturl(instance, url, window, len, buf, file);
}
NPError NP_EXPORT NPN_PostURLNotify ( NPP  npp,
const char *  relativeURL,
const char *  target,
uint32  len,
const char *  buf,
NPBool  file,
void notifyData 
)

Definition at line 198 of file npwin.cpp.

{
       int navMinorVers = g_pNavigatorFuncs->version & 0xFF;
       NPError err;
       if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) {
              err = g_pNavigatorFuncs->posturlnotify(instance, url, window, len, buf, file, notifyData);
       }
       else {
              err = NPERR_INCOMPATIBLE_VERSION_ERROR;
       }
       return err;
}

Definition at line 311 of file npwin.cpp.

{
    g_pNavigatorFuncs->reloadplugins(reloadPages);
}
NPError NP_EXPORT NPN_RequestRead ( NPStream pstream,
NPByteRange rangeList 
)

Definition at line 221 of file npwin.cpp.

{
    return g_pNavigatorFuncs->requestread(stream, rangeList);
}
NPError NP_EXPORT NPN_SetValue ( NPP  npp,
NPPVariable  variable,
void r_value 
)

Definition at line 399 of file npn.cpp.

{
    if (!npp)
    {
        return NPERR_INVALID_INSTANCE_ERROR;
    }

    // TODO windowless
    // NPPVpluginWindowBool
    // NPPVpluginTransparentBool

    return NPERR_GENERIC_ERROR;
}
void NP_EXPORT NPN_Status ( NPP  npp,
const char *  message 
)

Definition at line 280 of file npwin.cpp.

{
    g_pNavigatorFuncs->status(instance, message);
}
const char* NP_EXPORT NPN_UserAgent ( NPP  npp)

Definition at line 287 of file npwin.cpp.

{
    return g_pNavigatorFuncs->uagent(instance);
}
int32 NP_EXPORT NPN_Write ( NPP  npp,
NPStream pstream,
int32  len,
void buffer 
)

Definition at line 246 of file npwin.cpp.

{
       int navMinorVersion = g_pNavigatorFuncs->version & 0xFF;
       int32 result;

       if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) {
              result = g_pNavigatorFuncs->write(instance, stream, len, buffer);
       }
       else {
              result = -1;
       }
       return result;
}