home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
np40sdk.exe
/
NP40SDK.OS2
/
common
/
npos2.cpp
Wrap
Text File
|
1998-09-23
|
21KB
|
627 lines
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//
// FILE: npos2.cpp
// DESCRIPT: Common source file for building OS/2 plugins
// VERSION: 4.0
//
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\// INCLUDE
#include <os2.h>
#define DWORD ULONG
#define LPVOID PVOID
// netscape specific includes
#include "npapi.h"
#include "npupp.h"
//\\// DEFINES
#define NP_EXPORT _Export
//\\// GLOBAL DATA
// We need these to be global since we have to fill the structures
// with data (class) which requires knowledge of the navigator
// jump-table. This jump table is known at Initialize time (NP_Initialize)
// which is called after NP_GetEntryPoint.
NPNetscapeFuncs* g_pNavigatorFuncs = NULL;
NPPluginFuncs* g_pluginFuncs;
#ifdef _cplusplus
extern "C" {
#endif
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// DllEntryPoint
//
//
BOOL DLLInitTerm( HMODULE hmod, int Flag)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"DLLInitTerm","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return 0;
}
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// PLUGIN DLL entry points
//
// These are the OS/2 specific DLL entry points. They must be exoprted.
//
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// NP_GetEntryPoints
//
// Fills in the func table used by Navigator to call entry points in the
// plugin DLL. Note that these entry points ensure that DS is loaded
// by using the NP_EXPORT macro.
//
NPError
NP_GetEntryPoints(NPPluginFuncs* pFuncs)
{
char temp[100];
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NP_GetEntryPoints","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
// trap a NULL ptr
if (pFuncs == NULL)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"passed in pointer fFuncs is NULL","DEBUG1: npos2.cpp:NP_GetEntryPoints",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return NPERR_INVALID_FUNCTABLE_ERROR;
}
// if the plugin's function table is smaller than the plugin expects,
// then they are incompatible, and should return an error
#ifdef DEBUG1
sprintf(temp,"pFuncs->size = %d NPPluginFuncs = %d",
pFuncs->size,sizeof(NPPluginFuncs));
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
temp,"DEBUG1: npos2.cpp:NP_GetEntryPoints",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
// if (pFuncs->size < sizeof( NPPluginFuncs))
// return NPERR_INVALID_FUNCTABLE_ERROR;
#ifdef DEBUG1
if (pFuncs->size < sizeof( NPPluginFuncs))
{
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"difference in pFuncs table size",
"DEBUG1: npos2.cpp:NP_GetEntryPoints",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
}
#endif
pFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
pFuncs->newp = NPP_New;
pFuncs->destroy = NPP_Destroy;
pFuncs->setwindow = NPP_SetWindow;
pFuncs->newstream = NPP_NewStream;
pFuncs->destroystream = NPP_DestroyStream;
pFuncs->asfile = NPP_StreamAsFile;
pFuncs->writeready = NPP_WriteReady;
pFuncs->write = NPP_Write;
pFuncs->print = NPP_Print;
#ifdef IBMJAVA
pFuncs->event = (NPP_HandleEventUPP) NPP_HandleEvent;
pFuncs->urlnotify = NPP_URLNotify;
pFuncs->javaClass = NULL;
pFuncs->getvalue = (NPP_GetValueUPP) NPP_GetValue;
pFuncs->setvalue = (NPP_SetValueUPP) NPP_SetValue;
#endif
g_pluginFuncs = pFuncs;
return NPERR_NO_ERROR;
}
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// NP_Initialize
//
// Called immediately after the plugin DLL is loaded (after call to
// NP_GetEntryPoints).
//
NPError
NP_Initialize(NPNetscapeFuncs* pFuncs)
{
jclass sclass; // From GetEntryPoints
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NP_Initialize","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
// trap a NULL ptr
if (pFuncs == NULL)
{
return NPERR_INVALID_FUNCTABLE_ERROR;
}
g_pNavigatorFuncs = pFuncs; // save it for future reference
// if the plugin's major ver level is lower than the Navigator's,
// then they are incompatible, and should return an error
if (HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
{
return NPERR_INCOMPATIBLE_VERSION_ERROR;
}
// if the Navigator's function table is smaller than the plugin expects,
// then they are incompatible, and should return an error
if (pFuncs->size < sizeof (NPNetscapeFuncs))
{
return NPERR_INVALID_FUNCTABLE_ERROR;
}
#ifdef IBMJAVA
g_pluginFuncs->javaClass = NPP_GetJavaClass();
#endif
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"after NPP_GetJavaClass","DEBUG1: npsimple.cpp: NP_Initialize: ",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return NPP_Initialize();
}
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// NP_Shutdown
//
// Called immediately before the plugin DLL is unloaded.
// This function should check for some ref count on the dll to see if it is
// unloadable or it needs to stay in memory.
//
NPError
NP_Shutdown()
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NP_Shutdown","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
NPP_Shutdown();
g_pNavigatorFuncs = NULL;
return NPERR_NO_ERROR;
}
#ifdef _cplusplus
}
#endif
// END - PLUGIN DLL entry points
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NAVIGATOR Entry points
//
// These entry points expect to be called from within the plugin. The
// noteworthy assumption is that DS has already been set to point to the
// plugin's DLL data segment. Don't call these functions from outside
// the plugin without ensuring DS is set to the DLLs data segment first.
//
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NP_Version
//
// Returns the major/minor version numbers of the Plugin API for the plugin
// and the Navigator
//
void
NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_Version","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
*plugin_major = NP_VERSION_MAJOR;
*plugin_minor = NP_VERSION_MINOR;
*netscape_major = HIBYTE(g_pNavigatorFuncs->version);
*netscape_minor = LOBYTE(g_pNavigatorFuncs->version);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_GetURL
//
// Causes the specified URL to be fetched and streamed in
//
NPError
NPN_GetURL(NPP instance, const char *url, const char *window)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_GetURL","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->geturl(instance, url, window);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_PostURL
//
//
//
NPError
NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_PostURL","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->posturl(instance, url, window, len, buf, file);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_RequestRead
//
// Requests that a number of bytes be provided on a stream. Typically
// this would be used if a stream was in "pull" mode. An optional
// position can be provided for streams which are seekable.
//
NPError
NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_RequestRead","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->requestread(stream, rangeList);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_NewStream
//
// Creates a new stream of data from the plug-in to be interpreted
// by Netscape in the current window.
//
NPError
NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_NewStream","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->newstream(instance, type, target, stream);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_Write
//
// Provides len bytes of data.
//
int32
NPN_Write(NPP instance, NPStream *stream,
int32 len, void *buffer)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_Write","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->write(instance, stream, len, buffer);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_DestroyStream
//
// Closes a stream object. Reason indicates why the stream was closed.
//
NPError
NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_DestroyStream","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->destroystream(instance, stream, reason);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_Status
//
// Provides a text status message in the Netscape client user interface
//
void
NPN_Status(NPP instance, const char *message)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_Status","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
g_pNavigatorFuncs->status(instance, message);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_UserAgent
//
// Returns the user agent string of Navigator, which contains version info
//
const char*
NPN_UserAgent(NPP instance)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_UserAgent","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->uagent(instance);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_MemAlloc
//
// Allocates memory from the Navigator's memory space. Necessary so that
// saved instance data may be freed by Navigator when exiting.
//
void*
NPN_MemAlloc(uint32 size)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_MemAlloc","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->memalloc(size);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_MemFree
//
// Reciprocal of MemAlloc() above
//
void
NPN_MemFree(void* ptr)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_MemFree","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
g_pNavigatorFuncs->memfree(ptr);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_ReloadPLugins
//
// Private function to Netscape. do not use!
//
void
NPN_ReloadPlugins(NPBool reloadPages)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_ReloadPlugins","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
g_pNavigatorFuncs->reloadplugins(reloadPages);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_GetJavaEnv
//
//
//
JNIEnv*
NPN_GetJavaEnv(void)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_GetJavaEnv","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->getJavaEnv();
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_GetJavaPeer
//
//
//
jref
NPN_GetJavaPeer(NPP instance)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_GetJavaPeer","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->getJavaPeer(instance);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_GetURLNotify
//
//
//
NPError
NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_GetURLNotify","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->geturlnotify(instance, url, window, notifyData);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_PostURLNotify
//
//
//
NPError
NPN_PostURLNotify(NPP instance, const char* url, const char* target,
uint32 len, const char* buf, NPBool file, void* notifyData)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_PostURLNotify","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->posturlnotify(instance, url, target, len,
buf, file, notifyData);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_GetValue
//
// Retrieves value of specified browser variable.
//
NPError
NPN_GetValue(NPP instance, NPNVariable variable, void* value)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_GetValue","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->getvalue(instance, variable, value);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_SetValue
//
// Sets value of specified browser variable.
//
NPError
NPN_SetValue(NPP instance, NPPVariable variable, void* value)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_SetValue","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
return g_pNavigatorFuncs->setvalue(instance, variable, value);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_InvalidateRect
//
// Invalidate rectangle of windowless plugin.
//
void
NPN_InvalidateRect(NPP instance, NPRect* rect)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_InvalidateRect","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
g_pNavigatorFuncs->invalidaterect(instance, rect);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_InvalidateRegion
//
// Invalidate region of windowless plugin.
//
void
NPN_InvalidateRegion(NPP instance, NPRegion region)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_InvalidateRegion","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
g_pNavigatorFuncs->invalidateregion(instance, region);
}
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_ForceRedraw
//
// Cause windowless plugin to be updated.
//
void
NPN_ForceRedraw(NPP instance)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_ForceRedraw","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
g_pNavigatorFuncs->forceredraw(instance);
}
#ifdef NAVIGATOR40
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
// NPN_SevereError
//
// Notify Navigator that the plugin has had a severe error and can not
// continue. The reason parm notifies the Navigator whether the single
// specified instance has been destroyed or whether the plugin is unloading
// and all instances should be destroyed. Choices are:
// NPRES_INSTANCE_DESTROYED
// NPRES_PLUGIN_UNLOADING
//
// After receiving this call the Navigator will no longer make any calls
// to the plugin instance(s).
//
void
NPN_SevereError(NPP instance, NPError reason)
{
#ifdef DEBUG1
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
"NPN_SevereError","DEBUG1: npos2.cpp",
0, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
#endif
g_pNavigatorFuncs->severeerror(instance, reason);
}
#endif
// END NAVIGATOR Entry points
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.