File indexing completed on 2024-04-21 15:38:02
0001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 0002 /* ***** BEGIN LICENSE BLOCK ***** 0003 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 0004 * 0005 * The contents of this file are subject to the Mozilla Public License Version 0006 * 1.1 (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * http://www.mozilla.org/MPL/ 0009 * 0010 * Software distributed under the License is distributed on an "AS IS" basis, 0011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 0012 * for the specific language governing rights and limitations under the 0013 * License. 0014 * 0015 * The Original Code is mozilla.org code. 0016 * 0017 * The Initial Developer of the Original Code is 0018 * Netscape Communications Corporation. 0019 * Portions created by the Initial Developer are Copyright (C) 1998 0020 * the Initial Developer. All Rights Reserved. 0021 * 0022 * Contributor(s): 0023 * 0024 * Alternatively, the contents of this file may be used under the terms of 0025 * either the GNU General Public License Version 2 or later (the "GPL"), or 0026 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 0027 * in which case the provisions of the GPL or the LGPL are applicable instead 0028 * of those above. If you wish to allow use of your version of this file only 0029 * under the terms of either the GPL or the LGPL, and not to allow others to 0030 * use your version of this file under the terms of the MPL, indicate your 0031 * decision by deleting the provisions above and replace them with the notice 0032 * and other provisions required by the GPL or the LGPL. If you do not delete 0033 * the provisions above, a recipient may use your version of this file under 0034 * the terms of any one of the MPL, the GPL or the LGPL. 0035 * 0036 * ***** END LICENSE BLOCK ***** */ 0037 0038 #ifndef npapi_h_ 0039 #define npapi_h_ 0040 0041 #ifdef __OS2__ 0042 #pragma pack(1) 0043 #endif 0044 0045 #include "nptypes.h" 0046 0047 #ifdef OJI 0048 #include "jri.h" /* Java Runtime Interface */ 0049 #endif 0050 0051 #if defined (__OS2__) || defined (OS2) 0052 # ifndef XP_OS2 0053 # define XP_OS2 1 0054 # endif /* XP_OS2 */ 0055 #endif /* __OS2__ */ 0056 0057 #ifdef _WINDOWS 0058 # include <windef.h> 0059 # ifndef XP_WIN 0060 # define XP_WIN 1 0061 # endif /* XP_WIN */ 0062 #endif /* _WINDOWS */ 0063 0064 #ifdef __MWERKS__ 0065 # define _declspec __declspec 0066 # ifdef __INTEL__ 0067 # undef NULL 0068 # ifndef XP_WIN 0069 # define XP_WIN 1 0070 # endif /* XP_WIN */ 0071 # endif /* __INTEL__ */ 0072 #endif /* __MWERKS__ */ 0073 0074 #ifdef XP_MACOSX 0075 #include <Carbon/Carbon.h> 0076 #ifdef __LP64__ 0077 #define NP_NO_QUICKDRAW 0078 #endif 0079 #endif 0080 0081 #if defined(XP_UNIX) 0082 # include <stdio.h> 0083 # if defined(MOZ_X11) 0084 # include <X11/Xlib.h> 0085 # include <X11/Xutil.h> 0086 # endif 0087 #endif 0088 0089 /*----------------------------------------------------------------------*/ 0090 /* Plugin Version Constants */ 0091 /*----------------------------------------------------------------------*/ 0092 0093 #define NP_VERSION_MAJOR 0 0094 #define NP_VERSION_MINOR 22 0095 0096 0097 /* The OS/2 version of Netscape uses RC_DATA to define the 0098 mime types, file extensions, etc that are required. 0099 Use a vertical bar to separate types, end types with \0. 0100 FileVersion and ProductVersion are 32bit ints, all other 0101 entries are strings the MUST be terminated wwith a \0. 0102 0103 AN EXAMPLE: 0104 0105 RCDATA NP_INFO_ProductVersion { 1,0,0,1,} 0106 0107 RCDATA NP_INFO_MIMEType { "video/x-video|", 0108 "video/x-flick\0" } 0109 RCDATA NP_INFO_FileExtents { "avi|", 0110 "flc\0" } 0111 RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", 0112 "MMOS2 Flc/Fli player(*.flc)\0" } 0113 0114 RCDATA NP_INFO_FileVersion { 1,0,0,1 } 0115 RCDATA NP_INFO_CompanyName { "Netscape Communications\0" } 0116 RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0" 0117 RCDATA NP_INFO_InternalName { "NPAVI32\0" ) 0118 RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0" 0119 RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" } 0120 RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } 0121 */ 0122 /* RC_DATA types for version info - required */ 0123 #define NP_INFO_ProductVersion 1 0124 #define NP_INFO_MIMEType 2 0125 #define NP_INFO_FileOpenName 3 0126 #define NP_INFO_FileExtents 4 0127 /* RC_DATA types for version info - used if found */ 0128 #define NP_INFO_FileDescription 5 0129 #define NP_INFO_ProductName 6 0130 /* RC_DATA types for version info - optional */ 0131 #define NP_INFO_CompanyName 7 0132 #define NP_INFO_FileVersion 8 0133 #define NP_INFO_InternalName 9 0134 #define NP_INFO_LegalCopyright 10 0135 #define NP_INFO_OriginalFilename 11 0136 0137 #ifndef RC_INVOKED 0138 0139 /*----------------------------------------------------------------------*/ 0140 /* Definition of Basic Types */ 0141 /*----------------------------------------------------------------------*/ 0142 0143 typedef unsigned char NPBool; 0144 typedef int16_t NPError; 0145 typedef int16_t NPReason; 0146 typedef char* NPMIMEType; 0147 0148 /*----------------------------------------------------------------------*/ 0149 /* Structures and definitions */ 0150 /*----------------------------------------------------------------------*/ 0151 0152 #if !defined(__LP64__) 0153 #if defined(XP_MAC) || defined(XP_MACOSX) 0154 #pragma options align=mac68k 0155 #endif 0156 #endif /* __LP64__ */ 0157 0158 /* 0159 * NPP is a plug-in's opaque instance handle 0160 */ 0161 typedef struct _NPP 0162 { 0163 void* pdata; /* plug-in private data */ 0164 void* ndata; /* netscape private data */ 0165 } NPP_t; 0166 0167 typedef NPP_t* NPP; 0168 0169 typedef struct _NPStream 0170 { 0171 void* pdata; /* plug-in private data */ 0172 void* ndata; /* netscape private data */ 0173 const char* url; 0174 uint32_t end; 0175 uint32_t lastmodified; 0176 void* notifyData; 0177 const char* headers; /* Response headers from host. 0178 * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS. 0179 * Used for HTTP only; NULL for non-HTTP. 0180 * Available from NPP_NewStream onwards. 0181 * Plugin should copy this data before storing it. 0182 * Includes HTTP status line and all headers, 0183 * preferably verbatim as received from server, 0184 * headers formatted as in HTTP ("Header: Value"), 0185 * and newlines (\n, NOT \r\n) separating lines. 0186 * Terminated by \n\0 (NOT \n\n\0). */ 0187 } NPStream; 0188 0189 typedef struct _NPByteRange 0190 { 0191 int32_t offset; /* negative offset means from the end */ 0192 uint32_t length; 0193 struct _NPByteRange* next; 0194 } NPByteRange; 0195 0196 typedef struct _NPSavedData 0197 { 0198 int32_t len; 0199 void* buf; 0200 } NPSavedData; 0201 0202 typedef struct _NPRect 0203 { 0204 uint16_t top; 0205 uint16_t left; 0206 uint16_t bottom; 0207 uint16_t right; 0208 } NPRect; 0209 0210 typedef struct _NPSize 0211 { 0212 int32_t width; 0213 int32_t height; 0214 } NPSize; 0215 0216 #ifdef XP_UNIX 0217 /* 0218 * Unix specific structures and definitions 0219 */ 0220 0221 /* 0222 * Callback Structures. 0223 * 0224 * These are used to pass additional platform specific information. 0225 */ 0226 enum { 0227 NP_SETWINDOW = 1, 0228 NP_PRINT 0229 }; 0230 0231 typedef struct 0232 { 0233 int32_t type; 0234 } NPAnyCallbackStruct; 0235 0236 typedef struct 0237 { 0238 int32_t type; 0239 #ifdef MOZ_X11 0240 Display* display; 0241 Visual* visual; 0242 Colormap colormap; 0243 unsigned int depth; 0244 #endif 0245 } NPSetWindowCallbackStruct; 0246 0247 typedef struct 0248 { 0249 int32_t type; 0250 FILE* fp; 0251 } NPPrintCallbackStruct; 0252 0253 #endif /* XP_UNIX */ 0254 0255 #ifdef XP_MACOSX 0256 typedef enum { 0257 #ifndef NP_NO_QUICKDRAW 0258 NPDrawingModelQuickDraw = 0, 0259 #endif 0260 NPDrawingModelCoreGraphics = 1 0261 } NPDrawingModel; 0262 #endif 0263 0264 /* 0265 * The following masks are applied on certain platforms to NPNV and 0266 * NPPV selectors that pass around pointers to COM interfaces. Newer 0267 * compilers on some platforms may generate vtables that are not 0268 * compatible with older compilers. To prevent older plugins from 0269 * not understanding a new browser's ABI, these masks change the 0270 * values of those selectors on those platforms. To remain backwards 0271 * compatible with differenet versions of the browser, plugins can 0272 * use these masks to dynamically determine and use the correct C++ 0273 * ABI that the browser is expecting. This does not apply to Windows 0274 * as Microsoft's COM ABI will likely not change. 0275 */ 0276 0277 #define NP_ABI_GCC3_MASK 0x10000000 0278 /* 0279 * gcc 3.x generated vtables on UNIX and OSX are incompatible with 0280 * previous compilers. 0281 */ 0282 #if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) 0283 #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK 0284 #else 0285 #define _NP_ABI_MIXIN_FOR_GCC3 0 0286 #endif 0287 0288 #define NP_ABI_MACHO_MASK 0x01000000 0289 /* 0290 * On OSX, the Mach-O executable format is significantly 0291 * different than CFM. In addition to having a different 0292 * C++ ABI, it also has has different C calling convention. 0293 * You must use glue code when calling between CFM and 0294 * Mach-O C functions. 0295 */ 0296 #if (defined(TARGET_RT_MAC_MACHO)) 0297 #define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK 0298 #else 0299 #define _NP_ABI_MIXIN_FOR_MACHO 0 0300 #endif 0301 0302 #define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) 0303 0304 /* 0305 * List of variable names for which NPP_GetValue shall be implemented 0306 */ 0307 typedef enum { 0308 NPPVpluginNameString = 1, 0309 NPPVpluginDescriptionString, 0310 NPPVpluginWindowBool, 0311 NPPVpluginTransparentBool, 0312 NPPVjavaClass, /* Not implemented in Mozilla 1.0 */ 0313 NPPVpluginWindowSize, 0314 NPPVpluginTimerInterval, 0315 0316 NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), 0317 NPPVpluginScriptableIID = 11, 0318 0319 /* Introduced in Mozilla 0.9.9 */ 0320 NPPVjavascriptPushCallerBool = 12, 0321 0322 /* Introduced in Mozilla 1.0 */ 0323 NPPVpluginKeepLibraryInMemory = 13, 0324 NPPVpluginNeedsXEmbed = 14, 0325 0326 /* Get the NPObject for scripting the plugin. Introduced in Firefox 0327 * 1.0 (NPAPI minor version 14). 0328 */ 0329 NPPVpluginScriptableNPObject = 15, 0330 0331 /* Get the plugin value (as \0-terminated UTF-8 string data) for 0332 * form submission if the plugin is part of a form. Use 0333 * NPN_MemAlloc() to allocate memory for the string data. Introduced 0334 * in Mozilla 1.8b2 (NPAPI minor version 15). 0335 */ 0336 NPPVformValue = 16, 0337 0338 NPPVpluginUrlRequestsDisplayedBool = 17, 0339 0340 /* Checks if the plugin is interested in receiving the http body of 0341 * all http requests (including failed ones, http status != 200). 0342 */ 0343 NPPVpluginWantsAllNetworkStreams = 18 0344 0345 #ifdef XP_MACOSX 0346 /* Used for negotiating drawing models */ 0347 , NPPVpluginDrawingModel = 1000 0348 #endif 0349 } NPPVariable; 0350 0351 /* 0352 * List of variable names for which NPN_GetValue is implemented by Mozilla 0353 */ 0354 typedef enum { 0355 NPNVxDisplay = 1, 0356 NPNVxtAppContext, 0357 NPNVnetscapeWindow, 0358 NPNVjavascriptEnabledBool, 0359 NPNVasdEnabledBool, 0360 NPNVisOfflineBool, 0361 0362 /* 10 and over are available on Mozilla builds starting with 0.9.4 */ 0363 NPNVserviceManager = (10 | NP_ABI_MASK), 0364 NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */ 0365 NPNVDOMWindow = (12 | NP_ABI_MASK), 0366 NPNVToolkit = (13 | NP_ABI_MASK), 0367 NPNVSupportsXEmbedBool = 14, 0368 0369 /* Get the NPObject wrapper for the browser window. */ 0370 NPNVWindowNPObject = 15, 0371 0372 /* Get the NPObject wrapper for the plugins DOM element. */ 0373 NPNVPluginElementNPObject = 16, 0374 0375 NPNVSupportsWindowless = 17, 0376 0377 NPNVprivateModeBool = 18 0378 0379 #ifdef XP_MACOSX 0380 /* Used for negotiating drawing models */ 0381 , NPNVpluginDrawingModel = 1000 0382 #ifndef NP_NO_QUICKDRAW 0383 , NPNVsupportsQuickDrawBool = 2000 0384 #endif 0385 , NPNVsupportsCoreGraphicsBool = 2001 0386 #endif 0387 } NPNVariable; 0388 0389 typedef enum { 0390 NPNURLVCookie = 501, 0391 NPNURLVProxy 0392 } NPNURLVariable; 0393 0394 /* 0395 * The type of Tookkit the widgets use 0396 */ 0397 typedef enum { 0398 NPNVGtk12 = 1, 0399 NPNVGtk2 0400 } NPNToolkitType; 0401 0402 /* 0403 * The type of a NPWindow - it specifies the type of the data structure 0404 * returned in the window field. 0405 */ 0406 typedef enum { 0407 NPWindowTypeWindow = 1, 0408 NPWindowTypeDrawable 0409 } NPWindowType; 0410 0411 typedef struct _NPWindow 0412 { 0413 void* window; /* Platform specific window handle */ 0414 /* OS/2: x - Position of bottom left corner */ 0415 /* OS/2: y - relative to visible netscape window */ 0416 int32_t x; /* Position of top left corner relative */ 0417 int32_t y; /* to a netscape page. */ 0418 uint32_t width; /* Maximum window size */ 0419 uint32_t height; 0420 NPRect clipRect; /* Clipping rectangle in port coordinates */ 0421 /* Used by MAC only. */ 0422 #if defined(XP_UNIX) && !defined(XP_MACOSX) 0423 void * ws_info; /* Platform-dependent additonal data */ 0424 #endif /* XP_UNIX */ 0425 NPWindowType type; /* Is this a window or a drawable? */ 0426 } NPWindow; 0427 0428 0429 typedef struct _NPFullPrint 0430 { 0431 NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ 0432 NPBool printOne; /* TRUE if plugin should print one copy to default 0433 printer */ 0434 void* platformPrint; /* Platform-specific printing info */ 0435 } NPFullPrint; 0436 0437 typedef struct _NPEmbedPrint 0438 { 0439 NPWindow window; 0440 void* platformPrint; /* Platform-specific printing info */ 0441 } NPEmbedPrint; 0442 0443 typedef struct _NPPrint 0444 { 0445 uint16_t mode; /* NP_FULL or NP_EMBED */ 0446 union 0447 { 0448 NPFullPrint fullPrint; /* if mode is NP_FULL */ 0449 NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ 0450 } print; 0451 } NPPrint; 0452 0453 #ifdef XP_MACOSX 0454 typedef EventRecord NPEvent; 0455 #elif defined(XP_WIN) 0456 typedef struct _NPEvent 0457 { 0458 uint16_t event; 0459 uint32_t wParam; 0460 uint32_t lParam; 0461 } NPEvent; 0462 #elif defined(XP_OS2) 0463 typedef struct _NPEvent 0464 { 0465 uint32_t event; 0466 uint32_t wParam; 0467 uint32_t lParam; 0468 } NPEvent; 0469 #elif defined (XP_UNIX) && defined(MOZ_X11) 0470 typedef XEvent NPEvent; 0471 #else 0472 typedef void* NPEvent; 0473 #endif /* XP_MACOSX */ 0474 0475 #ifdef XP_MACOSX 0476 0477 typedef void* NPRegion; 0478 #ifndef NP_NO_QUICKDRAW 0479 typedef RgnHandle NPQDRegion; 0480 #endif 0481 typedef CGPathRef NPCGRegion; 0482 #elif defined(XP_WIN) 0483 typedef HRGN NPRegion; 0484 #elif defined(XP_UNIX) && defined(MOZ_X11) 0485 typedef Region NPRegion; 0486 #else 0487 typedef void *NPRegion; 0488 #endif 0489 0490 #ifdef XP_MACOSX 0491 typedef struct NP_Port 0492 { 0493 CGrafPtr port; 0494 int32_t portx; /* position inside the topmost window */ 0495 int32_t porty; 0496 } NP_Port; 0497 0498 typedef struct NP_CGContext 0499 { 0500 CGContextRef context; 0501 WindowRef window; 0502 } NP_CGContext; 0503 0504 /* Non-standard event types that can be passed to HandleEvent */ 0505 enum NPEventType { 0506 NPEventType_GetFocusEvent = (osEvt + 16), 0507 NPEventType_LoseFocusEvent, 0508 NPEventType_AdjustCursorEvent, 0509 NPEventType_MenuCommandEvent, 0510 NPEventType_ClippingChangedEvent, 0511 NPEventType_ScrollingBeginsEvent = 1000, 0512 NPEventType_ScrollingEndsEvent 0513 }; 0514 0515 #ifdef OBSOLETE 0516 #define getFocusEvent (osEvt + 16) 0517 #define loseFocusEvent (osEvt + 17) 0518 #define adjustCursorEvent (osEvt + 18) 0519 #endif 0520 0521 #endif /* XP_MACOSX */ 0522 0523 /* 0524 * Values for mode passed to NPP_New: 0525 */ 0526 #define NP_EMBED 1 0527 #define NP_FULL 2 0528 0529 /* 0530 * Values for stream type passed to NPP_NewStream: 0531 */ 0532 #define NP_NORMAL 1 0533 #define NP_SEEK 2 0534 #define NP_ASFILE 3 0535 #define NP_ASFILEONLY 4 0536 0537 #define NP_MAXREADY (((unsigned)(~0)<<1)>>1) 0538 0539 #if !defined(__LP64__) 0540 #if defined(XP_MAC) || defined(XP_MACOSX) 0541 #pragma options align=reset 0542 #endif 0543 #endif /* __LP64__ */ 0544 0545 /*----------------------------------------------------------------------*/ 0546 /* Error and Reason Code definitions */ 0547 /*----------------------------------------------------------------------*/ 0548 0549 /* 0550 * Values of type NPError: 0551 */ 0552 #define NPERR_BASE 0 0553 #define NPERR_NO_ERROR (NPERR_BASE + 0) 0554 #define NPERR_GENERIC_ERROR (NPERR_BASE + 1) 0555 #define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) 0556 #define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) 0557 #define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) 0558 #define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) 0559 #define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) 0560 #define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) 0561 #define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) 0562 #define NPERR_INVALID_PARAM (NPERR_BASE + 9) 0563 #define NPERR_INVALID_URL (NPERR_BASE + 10) 0564 #define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) 0565 #define NPERR_NO_DATA (NPERR_BASE + 12) 0566 #define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) 0567 0568 /* 0569 * Values of type NPReason: 0570 */ 0571 #define NPRES_BASE 0 0572 #define NPRES_DONE (NPRES_BASE + 0) 0573 #define NPRES_NETWORK_ERR (NPRES_BASE + 1) 0574 #define NPRES_USER_BREAK (NPRES_BASE + 2) 0575 0576 /* 0577 * Don't use these obsolete error codes any more. 0578 */ 0579 #define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR 0580 #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR 0581 #define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK 0582 0583 /* 0584 * Version feature information 0585 */ 0586 #define NPVERS_HAS_STREAMOUTPUT 8 0587 #define NPVERS_HAS_NOTIFICATION 9 0588 #define NPVERS_HAS_LIVECONNECT 9 0589 #define NPVERS_WIN16_HAS_LIVECONNECT 9 0590 #define NPVERS_68K_HAS_LIVECONNECT 11 0591 #define NPVERS_HAS_WINDOWLESS 11 0592 #define NPVERS_HAS_XPCONNECT_SCRIPTING 13 0593 #define NPVERS_HAS_NPRUNTIME_SCRIPTING 14 0594 #define NPVERS_HAS_FORM_VALUES 15 0595 #define NPVERS_HAS_POPUPS_ENABLED_STATE 16 0596 #define NPVERS_HAS_RESPONSE_HEADERS 17 0597 #define NPVERS_HAS_NPOBJECT_ENUM 18 0598 #define NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL 19 0599 #define NPVERS_HAS_ALL_NETWORK_STREAMS 20 0600 #define NPVERS_HAS_URL_AND_AUTH_INFO 21 0601 0602 /*----------------------------------------------------------------------*/ 0603 /* Function Prototypes */ 0604 /*----------------------------------------------------------------------*/ 0605 0606 #if defined(__OS2__) 0607 #define NP_LOADDS _System 0608 #else 0609 #define NP_LOADDS 0610 #endif 0611 0612 #ifdef __cplusplus 0613 extern "C" { 0614 #endif 0615 0616 /* NPP_* functions are provided by the plugin and called by the navigator. */ 0617 0618 #ifdef XP_UNIX 0619 char* NPP_GetMIMEDescription(); 0620 #endif 0621 0622 NPError NP_LOADDS NPP_Initialize(); 0623 void NP_LOADDS NPP_Shutdown(); 0624 NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, 0625 uint16_t mode, int16_t argc, char* argn[], 0626 char* argv[], NPSavedData* saved); 0627 NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); 0628 NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); 0629 NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, 0630 NPStream* stream, NPBool seekable, 0631 uint16_t* stype); 0632 NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, 0633 NPReason reason); 0634 int32_t NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); 0635 int32_t NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32_t offset, 0636 int32_t len, void* buffer); 0637 void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, 0638 const char* fname); 0639 void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); 0640 int16_t NP_LOADDS NPP_HandleEvent(NPP instance, void* event); 0641 void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, 0642 NPReason reason, void* notifyData); 0643 #ifdef OJI 0644 jref NP_LOADDS NPP_GetJavaClass(); 0645 #endif 0646 NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); 0647 NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); 0648 0649 /* NPN_* functions are provided by the navigator and called by the plugin. */ 0650 void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, 0651 int* netscape_major, int* netscape_minor); 0652 NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, 0653 const char* target, void* notifyData); 0654 NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url, 0655 const char* target); 0656 NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, 0657 const char* target, uint32_t len, 0658 const char* buf, NPBool file, 0659 void* notifyData); 0660 NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url, 0661 const char* target, uint32_t len, 0662 const char* buf, NPBool file); 0663 NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); 0664 NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, 0665 const char* target, NPStream** stream); 0666 int32_t NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32_t len, 0667 void* buffer); 0668 NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, 0669 NPReason reason); 0670 void NP_LOADDS NPN_Status(NPP instance, const char* message); 0671 const char* NP_LOADDS NPN_UserAgent(NPP instance); 0672 void* NP_LOADDS NPN_MemAlloc(uint32_t size); 0673 void NP_LOADDS NPN_MemFree(void* ptr); 0674 uint32_t NP_LOADDS NPN_MemFlush(uint32_t size); 0675 void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages); 0676 #ifdef OJI 0677 JRIEnv* NP_LOADDS NPN_GetJavaEnv(); 0678 jref NP_LOADDS NPN_GetJavaPeer(NPP instance); 0679 #endif 0680 NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, 0681 void *value); 0682 NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, 0683 void *value); 0684 void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect); 0685 void NP_LOADDS NPN_InvalidateRegion(NPP instance, 0686 NPRegion invalidRegion); 0687 void NP_LOADDS NPN_ForceRedraw(NPP instance); 0688 void NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled); 0689 void NP_LOADDS NPN_PopPopupsEnabledState(NPP instance); 0690 void NP_LOADDS NPN_PluginThreadAsyncCall(NPP instance, 0691 void (*func) (void *), 0692 void *userData); 0693 NPError NP_LOADDS NPN_GetValueForURL(NPP instance, NPNURLVariable variable, 0694 const char *url, char **value, 0695 uint32_t *len); 0696 NPError NP_LOADDS NPN_SetValueForURL(NPP instance, NPNURLVariable variable, 0697 const char *url, const char *value, 0698 uint32_t len); 0699 NPError NP_LOADDS NPN_GetAuthenticationInfo(NPP instance, 0700 const char *protocol, 0701 const char *host, int32_t port, 0702 const char *scheme, 0703 const char *realm, 0704 char **username, uint32_t *ulen, 0705 char **password, 0706 uint32_t *plen); 0707 0708 #ifdef __cplusplus 0709 } /* end extern "C" */ 0710 #endif 0711 0712 #endif /* RC_INVOKED */ 0713 #ifdef __OS2__ 0714 #pragma pack() 0715 #endif 0716 0717 #endif /* npapi_h_ */