00001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* ***** BEGIN LICENSE BLOCK ***** 00003 * Version: NPL 1.1/GPL 2.0/LGPL 2.1 00004 * 00005 * The contents of this file are subject to the Netscape Public License 00006 * Version 1.1 (the "License"); you may not use this file except in 00007 * compliance with the License. You may obtain a copy of the License at 00008 * http://www.mozilla.org/NPL/ 00009 * 00010 * Software distributed under the License is distributed on an "AS IS" basis, 00011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 00012 * for the specific language governing rights and limitations under the 00013 * License. 00014 * 00015 * The Original Code is mozilla.org code. 00016 * 00017 * The Initial Developer of the Original Code is 00018 * Netscape Communications Corporation. 00019 * Portions created by the Initial Developer are Copyright (C) 1998 00020 * the Initial Developer. All Rights Reserved. 00021 * 00022 * Contributor(s): 00023 * Portions Copyright (c) 2004-2006, Nokia Corporation 00024 * 00025 * 00026 * Alternatively, the contents of this file may be used under the terms of 00027 * either the GNU General Public License Version 2 or later (the "GPL"), or 00028 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 00029 * in which case the provisions of the GPL or the LGPL are applicable instead 00030 * of those above. If you wish to allow use of your version of this file only 00031 * under the terms of either the GPL or the LGPL, and not to allow others to 00032 * use your version of this file under the terms of the NPL, indicate your 00033 * decision by deleting the provisions above and replace them with the notice 00034 * and other provisions required by the GPL or the LGPL. If you do not delete 00035 * the provisions above, a recipient may use your version of this file under 00036 * the terms of any one of the NPL, the GPL or the LGPL. 00037 * 00038 * ***** END LICENSE BLOCK ***** */ 00039 00040 /* NOTES: 00041 * Nokia modified this file, by changing certain variables for the purpose of 00042 * porting the file to the Symbian platform on May 1st, 2004. 00043 */ 00044 00045 00046 /* 00047 * npapi.h $Revision: 3.31 $ 00048 * Netscape client plug-in API spec 00049 */ 00050 00051 #ifndef _NPAPI_H_ 00052 #define _NPAPI_H_ 00053 00054 #ifdef __OS2__ 00055 #pragma pack(1) 00056 #endif 00057 00058 #include "prtypes.h" 00059 /* Copied from xp_core.h */ 00060 /* removed #ifdef for hpux defined in /usr/include/model.h */ 00061 #ifndef XP_MAC 00062 #ifndef _INT16 00063 #define _INT16 00064 #endif 00065 #ifndef _INT32 00066 #define _INT32 00067 #endif 00068 #ifndef _UINT16 00069 #define _UINT16 00070 #endif 00071 #ifndef _UINT32 00072 #define _UINT32 00073 #endif 00074 #endif 00075 00076 /* 00077 * NO_NSPR_10_SUPPORT disables the inclusion 00078 * of obsolete/protypes.h, whose int16, uint16, 00079 * int32, and uint32 typedefs conflict with those 00080 * in this file. 00081 */ 00082 #ifndef NO_NSPR_10_SUPPORT 00083 #define NO_NSPR_10_SUPPORT 00084 #endif 00085 #ifdef OJI 00086 #include "jri.h" /* Java Runtime Interface */ 00087 #endif 00088 00089 #if defined (__OS2__ ) || defined (OS2) 00090 # ifndef XP_OS2 00091 # define XP_OS2 1 00092 # endif /* XP_OS2 */ 00093 #endif /* __OS2__ */ 00094 00095 #ifdef _WINDOWS 00096 # include <windef.h> 00097 # ifndef XP_WIN 00098 # define XP_WIN 1 00099 # endif /* XP_WIN */ 00100 #endif /* _WINDOWS */ 00101 00102 #ifdef __MWERKS__ 00103 # define _declspec __declspec 00104 # ifdef macintosh 00105 # ifndef XP_MAC 00106 # define XP_MAC 1 00107 # endif /* XP_MAC */ 00108 # endif /* macintosh */ 00109 # ifdef __INTEL__ 00110 # undef NULL 00111 # ifndef XP_WIN 00112 # define XP_WIN 1 00113 # endif /* XP_WIN */ 00114 # endif /* __INTEL__ */ 00115 #endif /* __MWERKS__ */ 00116 00117 #ifndef __SYMBIAN32__ 00118 #if defined(XP_MAC) || defined(XP_MACOSX) 00119 #include <Quickdraw.h> 00120 #include <Events.h> 00121 #endif 00122 00123 #if defined(XP_UNIX) 00124 # include <stdio.h> 00125 # if defined(MOZ_X11) 00126 # include <X11/Xlib.h> 00127 # include <X11/Xutil.h> 00128 # endif 00129 #endif 00130 #endif 00131 00132 /*----------------------------------------------------------------------*/ 00133 /* Plugin Version Constants */ 00134 /*----------------------------------------------------------------------*/ 00135 00136 #define NP_VERSION_MAJOR 0 00137 #define NP_VERSION_MINOR 13 00138 00139 00140 /* The OS/2 version of Netscape uses RC_DATA to define the 00141 mime types, file extentions, etc that are required. 00142 Use a vertical bar to separate types, end types with \0. 00143 FileVersion and ProductVersion are 32bit ints, all other 00144 entries are strings the MUST be terminated wwith a \0. 00145 00146 AN EXAMPLE: 00147 00148 RCDATA NP_INFO_ProductVersion { 1,0,0,1,} 00149 00150 RCDATA NP_INFO_MIMEType { "video/x-video|", 00151 "video/x-flick\0" } 00152 RCDATA NP_INFO_FileExtents { "avi|", 00153 "flc\0" } 00154 RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", 00155 "MMOS2 Flc/Fli player(*.flc)\0" } 00156 00157 RCDATA NP_INFO_FileVersion { 1,0,0,1 } 00158 RCDATA NP_INFO_CompanyName { "Netscape Communications\0" } 00159 RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0" 00160 RCDATA NP_INFO_InternalName { "NPAVI32\0" ) 00161 RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0" 00162 RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" } 00163 RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } 00164 00165 */ 00166 00167 00168 /* RC_DATA types for version info - required */ 00169 #define NP_INFO_ProductVersion 1 00170 #define NP_INFO_MIMEType 2 00171 #define NP_INFO_FileOpenName 3 00172 #define NP_INFO_FileExtents 4 00173 00174 /* RC_DATA types for version info - used if found */ 00175 #define NP_INFO_FileDescription 5 00176 #define NP_INFO_ProductName 6 00177 00178 /* RC_DATA types for version info - optional */ 00179 #define NP_INFO_CompanyName 7 00180 #define NP_INFO_FileVersion 8 00181 #define NP_INFO_InternalName 9 00182 #define NP_INFO_LegalCopyright 10 00183 #define NP_INFO_OriginalFilename 11 00184 00185 #ifndef RC_INVOKED 00186 00187 00188 00189 /*----------------------------------------------------------------------*/ 00190 /* Definition of Basic Types */ 00191 /*----------------------------------------------------------------------*/ 00192 00193 #ifndef _UINT16 00194 typedef unsigned short uint16; 00195 #endif 00196 00197 #ifndef _UINT32 00198 # if defined(__alpha) 00199 typedef unsigned int uint32; 00200 # else /* __alpha */ 00201 typedef unsigned long uint32; 00202 # endif /* __alpha */ 00203 #endif 00204 00205 /* 00206 * AIX defines these in sys/inttypes.h included from sys/types.h 00207 */ 00208 #ifndef AIX 00209 #ifndef _INT16 00210 typedef short int16; 00211 #endif 00212 00213 #ifndef _INT32 00214 # if defined(__alpha) 00215 typedef int int32; 00216 # else /* __alpha */ 00217 typedef long int32; 00218 # endif /* __alpha */ 00219 #endif 00220 #endif 00221 00222 #ifndef FALSE 00223 #define FALSE (0) 00224 #endif 00225 #ifndef TRUE 00226 #define TRUE (1) 00227 #endif 00228 #ifndef NULL 00229 #define NULL (0L) 00230 #endif 00231 00232 typedef unsigned char NPBool; 00233 typedef int16 NPError; 00234 typedef int16 NPReason; 00235 #ifndef __SYMBIAN32__ 00236 typedef char* NPMIMEType; 00237 #else/* __SYMBIAN32__ */ 00238 typedef const TDesC8& NPMIMEType; 00239 #endif 00240 00241 00242 00243 /*----------------------------------------------------------------------*/ 00244 /* Structures and definitions */ 00245 /*----------------------------------------------------------------------*/ 00246 00247 #ifdef XP_MAC 00248 #pragma options align=mac68k 00249 #endif 00250 00251 /* 00252 * NPP is a plug-in's opaque instance handle 00253 */ 00254 typedef struct _NPP 00255 { 00256 void* pdata; /* plug-in private data */ 00257 void* ndata; /* netscape private data */ 00258 } NPP_t; 00259 00260 typedef NPP_t* NPP; 00261 00262 00263 typedef struct _NPStream 00264 { 00265 void* pdata; /* plug-in private data */ 00266 void* ndata; /* netscape private data */ 00267 #ifndef __SYMBIAN32__ 00268 const char* url; 00269 #else/* __SYMBIAN32__ */ 00270 HBufC* url; 00271 #endif 00272 uint32 end; 00273 uint32 lastmodified; 00274 void* notifyData; 00275 } NPStream; 00276 00277 00278 typedef struct _NPByteRange 00279 { 00280 int32 offset; /* negative offset means from the end */ 00281 uint32 length; 00282 struct _NPByteRange* next; 00283 } NPByteRange; 00284 00285 00286 typedef struct _NPSavedData 00287 { 00288 int32 len; 00289 void* buf; 00290 } NPSavedData; 00291 00292 00293 typedef struct _NPRect 00294 { 00295 uint16 top; 00296 uint16 left; 00297 uint16 bottom; 00298 uint16 right; 00299 } NPRect; 00300 00301 typedef struct _NPSize 00302 { 00303 int32 width; 00304 int32 height; 00305 } NPSize; 00306 00307 #ifdef XP_UNIX 00308 /* 00309 * Unix specific structures and definitions 00310 */ 00311 00312 /* 00313 * Callback Structures. 00314 * 00315 * These are used to pass additional platform specific information. 00316 */ 00317 enum { 00318 NP_SETWINDOW = 1, 00319 NP_PRINT 00320 }; 00321 00322 typedef struct 00323 { 00324 int32 type; 00325 } NPAnyCallbackStruct; 00326 00327 typedef struct 00328 { 00329 int32 type; 00330 #ifdef MOZ_X11 00331 Display* display; 00332 Visual* visual; 00333 Colormap colormap; 00334 unsigned int depth; 00335 #endif 00336 } NPSetWindowCallbackStruct; 00337 00338 typedef struct 00339 { 00340 int32 type; 00341 FILE* fp; 00342 } NPPrintCallbackStruct; 00343 00344 #endif /* XP_UNIX */ 00345 00346 00347 /* 00348 * The following masks are applied on certain platforms to NPNV and 00349 * NPPV selectors that pass around pointers to COM interfaces. Newer 00350 * compilers on some platforms may generate vtables that are not 00351 * compatible with older compilers. To prevent older plugins from 00352 * not understanding a new browser's ABI, these masks change the 00353 * values of those selectors on those platforms. To remain backwards 00354 * compatible with differenet versions of the browser, plugins can 00355 * use these masks to dynamically determine and use the correct C++ 00356 * ABI that the browser is expecting. This does not apply to Windows 00357 * as Microsoft's COM ABI will likely not change. 00358 */ 00359 00360 #define NP_ABI_GCC3_MASK 0x10000000 00361 /* 00362 * gcc 3.x generated vtables on UNIX and OSX are incompatible with 00363 * previous compilers. 00364 */ 00365 #if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) 00366 #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK 00367 #else 00368 #define _NP_ABI_MIXIN_FOR_GCC3 0 00369 #endif 00370 00371 00372 #define NP_ABI_MACHO_MASK 0x01000000 00373 /* 00374 * On OSX, the Mach-O executable format is significantly 00375 * different than CFM. In addition to having a different 00376 * C++ ABI, it also has has different C calling convention. 00377 * You must use glue code when calling between CFM and 00378 * Mach-O C functions. 00379 */ 00380 #if (defined(TARGET_RT_MAC_MACHO)) 00381 #define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK 00382 #else 00383 #define _NP_ABI_MIXIN_FOR_MACHO 0 00384 #endif 00385 00386 00387 #define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) 00388 00389 /* 00390 * List of variable names for which NPP_GetValue shall be implemented 00391 */ 00392 typedef enum { 00393 NPPVpluginNameString = 1, 00394 NPPVpluginDescriptionString, 00395 NPPVpluginWindowBool, 00396 NPPVpluginTransparentBool, 00397 NPPVjavaClass, /* Not implemented in Mozilla 1.0 */ 00398 NPPVpluginWindowSize, 00399 NPPVpluginTimerInterval, 00400 00401 NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), 00402 NPPVpluginScriptableIID = 11, 00403 00404 /* 12 and over are available on Mozilla builds starting with 0.9.9 */ 00405 NPPVjavascriptPushCallerBool = 12, 00406 NPPVpluginKeepLibraryInMemory = 13 /* available in Mozilla 1.0 */ 00407 #ifdef RD_BROWSER_WIDGETS 00408 ,NPPVpluginNeedsXEmbed = 14, /* Not implemented in WebKit */ 00409 /* started from 100. The numbers 13 to 1000 are left 00410 * for standarization and other future use. Value return is zero for 00411 * ineteractive and 'one' for non-interactive. 00412 */ 00413 NPPVpluginScriptableNPObject = 15, 00414 #endif 00415 NPPVpluginInteractiveBool = 1000 00416 } NPPVariable; 00417 00418 /* 00419 * List of variable names for which NPN_GetValue is implemented by Mozilla 00420 */ 00421 typedef enum { 00422 NPNVxDisplay = 1, 00423 NPNVxtAppContext, 00424 NPNVnetscapeWindow, 00425 NPNVjavascriptEnabledBool, 00426 NPNVasdEnabledBool, 00427 NPNVisOfflineBool, 00428 00429 /* 10 and over are available on Mozilla builds starting with 0.9.4 */ 00430 NPNVserviceManager = (10 | NP_ABI_MASK), 00431 NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */ 00432 NPNVDOMWindow = (12 | NP_ABI_MASK) 00433 #ifdef RD_BROWSER_WIDGETS 00434 ,NPNVToolkit = (13 | NP_ABI_MASK), /* Not implemented in WebKit */ 00435 NPNVSupportsXEmbedBool = 14, /* Not implemented in WebKit */ 00436 00437 /* Get the NPObject wrapper for the browser window. */ 00438 NPNVWindowNPObject = 15, 00439 00440 /* Get the NPObject wrapper for the plugins DOM element. */ 00441 NPNVPluginElementNPObject /* Not implemented in WebKit */ 00442 #endif 00443 } NPNVariable; 00444 00445 /* 00446 * The type of a NPWindow - it specifies the type of the data structure 00447 * returned in the window field. 00448 */ 00449 typedef enum { 00450 NPWindowTypeWindow = 1, 00451 NPWindowTypeDrawable 00452 } NPWindowType; 00453 00454 typedef struct _NPWindow 00455 { 00456 void* window; /* Platform specific window handle */ 00457 /* OS/2: x - Position of bottom left corner */ 00458 /* OS/2: y - relative to visible netscape window */ 00459 int32 x; /* Position of top left corner relative */ 00460 int32 y; /* to a netscape page. */ 00461 uint32 width; /* Maximum window size */ 00462 uint32 height; 00463 NPRect clipRect; /* Clipping rectangle in port coordinates */ 00464 /* Used by MAC only. */ 00465 #if defined(XP_UNIX) && !defined(XP_MACOSX) 00466 void * ws_info; /* Platform-dependent additonal data */ 00467 #endif /* XP_UNIX */ 00468 NPWindowType type; /* Is this a window or a drawable? */ 00469 } NPWindow; 00470 00471 00472 typedef struct _NPFullPrint 00473 { 00474 NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ 00475 NPBool printOne; /* TRUE if plugin should print one copy to default printer */ 00476 void* platformPrint; /* Platform-specific printing info */ 00477 } NPFullPrint; 00478 00479 typedef struct _NPEmbedPrint 00480 { 00481 NPWindow window; 00482 void* platformPrint; /* Platform-specific printing info */ 00483 } NPEmbedPrint; 00484 00485 typedef struct _NPPrint 00486 { 00487 uint16 mode; /* NP_FULL or NP_EMBED */ 00488 union 00489 { 00490 NPFullPrint fullPrint; /* if mode is NP_FULL */ 00491 NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ 00492 } print; 00493 } NPPrint; 00494 00495 #if defined(XP_MAC) || defined(XP_MACOSX) 00496 typedef EventRecord NPEvent; 00497 #elif defined(XP_WIN) 00498 typedef struct _NPEvent 00499 { 00500 uint16 event; 00501 uint32 wParam; 00502 uint32 lParam; 00503 } NPEvent; 00504 #elif defined(XP_OS2) 00505 typedef struct _NPEvent 00506 { 00507 uint32 event; 00508 uint32 wParam; 00509 uint32 lParam; 00510 } NPEvent; 00511 #elif defined (XP_UNIX) && defined(MOZ_X11) 00512 typedef XEvent NPEvent; 00513 #else 00514 typedef void* NPEvent; 00515 #endif /* XP_MAC */ 00516 00517 #if defined(XP_MAC) || defined(XP_MACOSX) 00518 typedef RgnHandle NPRegion; 00519 #elif defined(XP_WIN) 00520 typedef HRGN NPRegion; 00521 #elif defined(XP_UNIX) && defined(MOZ_X11) 00522 typedef Region NPRegion; 00523 #else 00524 typedef void *NPRegion; 00525 #endif /* XP_MAC */ 00526 00527 #if defined(XP_MAC) || defined(XP_MACOSX) 00528 /* 00529 * Mac-specific structures and definitions. 00530 */ 00531 00532 typedef struct NP_Port 00533 { 00534 CGrafPtr port; /* Grafport */ 00535 int32 portx; /* position inside the topmost window */ 00536 int32 porty; 00537 } NP_Port; 00538 00539 /* 00540 * Non-standard event types that can be passed to HandleEvent 00541 */ 00542 00543 enum NPEventType { 00544 NPEventType_GetFocusEvent = (osEvt + 16), 00545 NPEventType_LoseFocusEvent, 00546 NPEventType_AdjustCursorEvent, 00547 NPEventType_MenuCommandEvent, 00548 NPEventType_ClippingChangedEvent, 00549 NPEventType_ScrollingBeginsEvent = 1000, 00550 NPEventType_ScrollingEndsEvent 00551 }; 00552 00553 #ifdef OBSOLETE 00554 #define getFocusEvent (osEvt + 16) 00555 #define loseFocusEvent (osEvt + 17) 00556 #define adjustCursorEvent (osEvt + 18) 00557 #endif 00558 #endif /* XP_MAC */ 00559 00560 /* 00561 * Values for mode passed to NPP_New: 00562 */ 00563 #define NP_EMBED 1 00564 #define NP_FULL 2 00565 00566 /* 00567 * Values for stream type passed to NPP_NewStream: 00568 */ 00569 #define NP_NORMAL 1 00570 #define NP_SEEK 2 00571 #define NP_ASFILE 3 00572 #define NP_ASFILEONLY 4 00573 00574 #define NP_MAXREADY (((unsigned)(~0)<<1)>>1) 00575 00576 #ifdef XP_MAC 00577 #pragma options align=reset 00578 #endif 00579 00580 00581 /*----------------------------------------------------------------------*/ 00582 /* Error and Reason Code definitions */ 00583 /*----------------------------------------------------------------------*/ 00584 00585 /* 00586 * Values of type NPError: 00587 */ 00588 #define NPERR_BASE 0 00589 #define NPERR_NO_ERROR (NPERR_BASE + 0) 00590 #define NPERR_GENERIC_ERROR (NPERR_BASE + 1) 00591 #define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) 00592 #define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) 00593 #define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) 00594 #define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) 00595 #define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) 00596 #define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) 00597 #define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) 00598 #define NPERR_INVALID_PARAM (NPERR_BASE + 9) 00599 #define NPERR_INVALID_URL (NPERR_BASE + 10) 00600 #define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) 00601 #define NPERR_NO_DATA (NPERR_BASE + 12) 00602 #define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) 00603 00604 /* 00605 * Values of type NPReason: 00606 */ 00607 #define NPRES_BASE 0 00608 #define NPRES_DONE (NPRES_BASE + 0) 00609 #define NPRES_NETWORK_ERR (NPRES_BASE + 1) 00610 #define NPRES_USER_BREAK (NPRES_BASE + 2) 00611 00612 /* 00613 * Don't use these obsolete error codes any more. 00614 */ 00615 #define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR 00616 #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR 00617 #define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK 00618 00619 /* 00620 * Version feature information 00621 */ 00622 #define NPVERS_HAS_STREAMOUTPUT 8 00623 #define NPVERS_HAS_NOTIFICATION 9 00624 #define NPVERS_HAS_LIVECONNECT 9 00625 #define NPVERS_WIN16_HAS_LIVECONNECT 9 00626 #define NPVERS_68K_HAS_LIVECONNECT 11 00627 #define NPVERS_HAS_WINDOWLESS 11 00628 #define NPVERS_HAS_XPCONNECT_SCRIPTING 13 00629 00630 /*----------------------------------------------------------------------*/ 00631 /* Function Prototypes */ 00632 /*----------------------------------------------------------------------*/ 00633 00634 #if defined(_WINDOWS) && !defined(WIN32) 00635 #define NP_LOADDS _loadds 00636 #else 00637 #if defined(__OS2__) 00638 #define NP_LOADDS _System 00639 #else 00640 #define NP_LOADDS 00641 #endif 00642 #endif 00643 00644 #ifndef __SYMBIAN32__ 00645 #ifdef __cplusplus 00646 extern "C" { 00647 #endif 00648 #endif 00649 00650 /* 00651 * NPP_* functions are provided by the plugin and called by the navigator. 00652 */ 00653 00654 #ifdef XP_UNIX 00655 char* NPP_GetMIMEDescription(void); 00656 #endif /* XP_UNIX */ 00657 00658 #ifdef __SYMBIAN32__ 00659 #include <badesca.h> 00660 IMPORT_C const TDesC* NPP_GetMIMEDescription(void); 00661 #endif /* __SYMBIAN32__ */ 00662 00663 NPError NP_LOADDS NPP_Initialize(void); 00664 #ifdef __SYMBIAN32__ 00665 IMPORT_C 00666 #endif /* __SYMBIAN32__ */ 00667 void NP_LOADDS NPP_Shutdown(void); 00668 00669 #ifndef __SYMBIAN32__ 00670 NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, 00671 uint16 mode, int16 argc, char* argn[], 00672 char* argv[], NPSavedData* saved); 00673 #else 00674 NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, 00675 uint16 mode, CDesCArray* argn, 00676 CDesCArray* argv, NPSavedData* saved); 00677 #endif /* __SYMBIAN32__ */ 00678 00679 NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); 00680 NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); 00681 NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, 00682 NPStream* stream, NPBool seekable, 00683 uint16* stype); 00684 NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, 00685 NPReason reason); 00686 int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); 00687 int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, 00688 int32 len, void* buffer); 00689 00690 #ifndef __SYMBIAN32__ 00691 void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, 00692 const char* fname); 00693 #else/* __SYMBIAN32__ */ 00694 void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, 00695 const TDesC& fname); 00696 #endif /* __SYMBIAN32__ */ 00697 00698 void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); 00699 int16 NP_LOADDS NPP_HandleEvent(NPP instance, void* event); 00700 00701 #ifndef __SYMBIAN32__ 00702 void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, 00703 NPReason reason, void* notifyData); 00704 #else/* __SYMBIAN32__ */ 00705 void NP_LOADDS NPP_URLNotify(NPP instance, const TDesC& url, 00706 NPReason reason, void* notifyData); 00707 #endif /* __SYMBIAN32__ */ 00708 00709 #ifdef OJI 00710 jref NP_LOADDS NPP_GetJavaClass(void); 00711 #endif 00712 00713 #ifdef __SYMBIAN32__ 00714 IMPORT_C 00715 #endif /* __SYMBIAN32__ */ 00716 NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); 00717 NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); 00718 00719 /* 00720 * NPN_* functions are provided by the navigator and called by the plugin. 00721 */ 00722 void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, 00723 int* netscape_major, int* netscape_minor); 00724 00725 #ifndef __SYMBIAN32__ 00726 NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, 00727 const char* target, void* notifyData); 00728 NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url, 00729 const char* target); 00730 NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, 00731 const char* target, uint32 len, 00732 const char* buf, NPBool file, 00733 void* notifyData); 00734 NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url, 00735 const char* target, uint32 len, 00736 const char* buf, NPBool file); 00737 #else/* __SYMBIAN32__ */ 00738 NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const TDesC& url, 00739 const TDesC* target, void* notifyData); 00740 NPError NP_LOADDS NPN_GetURL(NPP instance, const TDesC& url, 00741 const TDesC* target); 00742 NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const TDesC& url, 00743 const TDesC* target, 00744 const TDesC& buf, NPBool file, 00745 void* notifyData); 00746 NPError NP_LOADDS NPN_PostURL(NPP instance, const TDesC& url, 00747 const TDesC* target, 00748 const TDesC& buf, NPBool file); 00749 #endif /* __SYMBIAN32__ */ 00750 00751 NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); 00752 00753 #ifndef __SYMBIAN32__ 00754 NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, 00755 const char* target, NPStream** stream); 00756 #else/* __SYMBIAN32__ */ 00757 NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, 00758 const TDesC* target, NPStream** stream); 00759 #endif /* __SYMBIAN32__ */ 00760 00761 int32 NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer); 00762 NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason); 00763 00764 #ifndef __SYMBIAN32__ 00765 void NP_LOADDS NPN_Status(NPP instance, const char* message); 00766 #else/* __SYMBIAN32__ */ 00767 void NP_LOADDS NPN_Status(NPP instance, const TDesC& message); 00768 #endif /* __SYMBIAN32__ */ 00769 00770 #ifndef __SYMBIAN32__ 00771 const char* NP_LOADDS NPN_UserAgent(NPP instance); 00772 #else/* __SYMBIAN32__ */ 00773 const TDesC* NP_LOADDS NPN_UserAgent(NPP instance); 00774 #endif /* __SYMBIAN32__ */ 00775 00776 00777 void* NP_LOADDS NPN_MemAlloc(uint32 size); 00778 void NP_LOADDS NPN_MemFree(void* ptr); 00779 uint32 NP_LOADDS NPN_MemFlush(uint32 size); 00780 void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages); 00781 #ifdef OJI 00782 JRIEnv* NP_LOADDS NPN_GetJavaEnv(void); 00783 jref NP_LOADDS NPN_GetJavaPeer(NPP instance); 00784 #endif 00785 NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value); 00786 NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value); 00787 void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect); 00788 void NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); 00789 void NP_LOADDS NPN_ForceRedraw(NPP instance); 00790 00791 #ifndef __SYMBIAN32__ 00792 #ifdef __cplusplus 00793 } /* end extern "C" */ 00794 #endif 00795 #endif 00796 00797 #endif /* RC_INVOKED */ 00798 #ifdef __OS2__ 00799 #pragma pack() 00800 #endif 00801 00802 #endif /* _NPAPI_H_ */