revert previous commit
[moon.git] / plugin / moz-sdk / npapi.h
blobf4ff688c4dfb17958ce97f739d1bc75c9fa5d313
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #ifndef npapi_h_
39 #define npapi_h_
41 #ifdef __OS2__
42 #pragma pack(1)
43 #endif
45 #include "nptypes.h"
47 #ifdef OJI
48 #include "jri.h" /* Java Runtime Interface */
49 #endif
51 #if defined (__OS2__) || defined (OS2)
52 # ifndef XP_OS2
53 # define XP_OS2 1
54 # endif /* XP_OS2 */
55 #endif /* __OS2__ */
57 #ifdef _WINDOWS
58 # include <windef.h>
59 # ifndef XP_WIN
60 # define XP_WIN 1
61 # endif /* XP_WIN */
62 #endif /* _WINDOWS */
64 #ifdef __MWERKS__
65 # define _declspec __declspec
66 # ifdef __INTEL__
67 # undef NULL
68 # ifndef XP_WIN
69 # define XP_WIN 1
70 # endif /* XP_WIN */
71 # endif /* __INTEL__ */
72 #endif /* __MWERKS__ */
74 #ifdef XP_MACOSX
75 #include <Carbon/Carbon.h>
76 #ifdef __LP64__
77 #define NP_NO_QUICKDRAW
78 #endif
79 #endif
81 #if defined(XP_UNIX)
82 # include <stdio.h>
83 # if defined(MOZ_X11)
84 # include <X11/Xlib.h>
85 # include <X11/Xutil.h>
86 # endif
87 #endif
89 /*----------------------------------------------------------------------*/
90 /* Plugin Version Constants */
91 /*----------------------------------------------------------------------*/
93 #define NP_VERSION_MAJOR 0
94 #define NP_VERSION_MINOR 21
97 /* The OS/2 version of Netscape uses RC_DATA to define the
98 mime types, file extensions, etc that are required.
99 Use a vertical bar to separate types, end types with \0.
100 FileVersion and ProductVersion are 32bit ints, all other
101 entries are strings the MUST be terminated wwith a \0.
103 AN EXAMPLE:
105 RCDATA NP_INFO_ProductVersion { 1,0,0,1,}
107 RCDATA NP_INFO_MIMEType { "video/x-video|",
108 "video/x-flick\0" }
109 RCDATA NP_INFO_FileExtents { "avi|",
110 "flc\0" }
111 RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|",
112 "MMOS2 Flc/Fli player(*.flc)\0" }
114 RCDATA NP_INFO_FileVersion { 1,0,0,1 }
115 RCDATA NP_INFO_CompanyName { "Netscape Communications\0" }
116 RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0"
117 RCDATA NP_INFO_InternalName { "NPAVI32\0" )
118 RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0"
119 RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" }
120 RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" }
122 /* RC_DATA types for version info - required */
123 #define NP_INFO_ProductVersion 1
124 #define NP_INFO_MIMEType 2
125 #define NP_INFO_FileOpenName 3
126 #define NP_INFO_FileExtents 4
127 /* RC_DATA types for version info - used if found */
128 #define NP_INFO_FileDescription 5
129 #define NP_INFO_ProductName 6
130 /* RC_DATA types for version info - optional */
131 #define NP_INFO_CompanyName 7
132 #define NP_INFO_FileVersion 8
133 #define NP_INFO_InternalName 9
134 #define NP_INFO_LegalCopyright 10
135 #define NP_INFO_OriginalFilename 11
137 #ifndef RC_INVOKED
139 /*----------------------------------------------------------------------*/
140 /* Definition of Basic Types */
141 /*----------------------------------------------------------------------*/
143 typedef unsigned char NPBool;
144 typedef int16_t NPError;
145 typedef int16_t NPReason;
146 typedef char* NPMIMEType;
148 /*----------------------------------------------------------------------*/
149 /* Structures and definitions */
150 /*----------------------------------------------------------------------*/
153 * NPP is a plug-in's opaque instance handle
155 typedef struct _NPP
157 void* pdata; /* plug-in private data */
158 void* ndata; /* netscape private data */
159 } NPP_t;
161 typedef NPP_t* NPP;
163 typedef struct _NPStream
165 void* pdata; /* plug-in private data */
166 void* ndata; /* netscape private data */
167 const char* url;
168 uint32_t end;
169 uint32_t lastmodified;
170 void* notifyData;
171 const char* headers; /* Response headers from host.
172 * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS.
173 * Used for HTTP only; NULL for non-HTTP.
174 * Available from NPP_NewStream onwards.
175 * Plugin should copy this data before storing it.
176 * Includes HTTP status line and all headers,
177 * preferably verbatim as received from server,
178 * headers formatted as in HTTP ("Header: Value"),
179 * and newlines (\n, NOT \r\n) separating lines.
180 * Terminated by \n\0 (NOT \n\n\0). */
181 } NPStream;
183 typedef struct _NPByteRange
185 int32_t offset; /* negative offset means from the end */
186 uint32_t length;
187 struct _NPByteRange* next;
188 } NPByteRange;
190 typedef struct _NPSavedData
192 int32_t len;
193 void* buf;
194 } NPSavedData;
196 typedef struct _NPRect
198 uint16_t top;
199 uint16_t left;
200 uint16_t bottom;
201 uint16_t right;
202 } NPRect;
204 typedef struct _NPSize
206 int32_t width;
207 int32_t height;
208 } NPSize;
210 #ifdef XP_UNIX
212 * Unix specific structures and definitions
216 * Callback Structures.
218 * These are used to pass additional platform specific information.
220 enum {
221 NP_SETWINDOW = 1,
222 NP_PRINT
225 typedef struct
227 int32_t type;
228 } NPAnyCallbackStruct;
230 typedef struct
232 int32_t type;
233 #ifdef MOZ_X11
234 Display* display;
235 Visual* visual;
236 Colormap colormap;
237 unsigned int depth;
238 #endif
239 } NPSetWindowCallbackStruct;
241 typedef struct
243 int32_t type;
244 FILE* fp;
245 } NPPrintCallbackStruct;
247 #endif /* XP_UNIX */
249 #ifdef XP_MACOSX
250 typedef enum {
251 #ifndef NP_NO_QUICKDRAW
252 NPDrawingModelQuickDraw = 0,
253 #endif
254 NPDrawingModelCoreGraphics = 1
255 } NPDrawingModel;
256 #endif
259 * The following masks are applied on certain platforms to NPNV and
260 * NPPV selectors that pass around pointers to COM interfaces. Newer
261 * compilers on some platforms may generate vtables that are not
262 * compatible with older compilers. To prevent older plugins from
263 * not understanding a new browser's ABI, these masks change the
264 * values of those selectors on those platforms. To remain backwards
265 * compatible with differenet versions of the browser, plugins can
266 * use these masks to dynamically determine and use the correct C++
267 * ABI that the browser is expecting. This does not apply to Windows
268 * as Microsoft's COM ABI will likely not change.
271 #define NP_ABI_GCC3_MASK 0x10000000
273 * gcc 3.x generated vtables on UNIX and OSX are incompatible with
274 * previous compilers.
276 #if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
277 #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
278 #else
279 #define _NP_ABI_MIXIN_FOR_GCC3 0
280 #endif
282 #define NP_ABI_MACHO_MASK 0x01000000
284 * On OSX, the Mach-O executable format is significantly
285 * different than CFM. In addition to having a different
286 * C++ ABI, it also has has different C calling convention.
287 * You must use glue code when calling between CFM and
288 * Mach-O C functions.
290 #if (defined(TARGET_RT_MAC_MACHO))
291 #define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK
292 #else
293 #define _NP_ABI_MIXIN_FOR_MACHO 0
294 #endif
296 #define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO)
299 * List of variable names for which NPP_GetValue shall be implemented
301 typedef enum {
302 NPPVpluginNameString = 1,
303 NPPVpluginDescriptionString,
304 NPPVpluginWindowBool,
305 NPPVpluginTransparentBool,
306 NPPVjavaClass, /* Not implemented in Mozilla 1.0 */
307 NPPVpluginWindowSize,
308 NPPVpluginTimerInterval,
310 NPPVpluginScriptableInstance = (10 | NP_ABI_MASK),
311 NPPVpluginScriptableIID = 11,
313 /* Introduced in Mozilla 0.9.9 */
314 NPPVjavascriptPushCallerBool = 12,
316 /* Introduced in Mozilla 1.0 */
317 NPPVpluginKeepLibraryInMemory = 13,
318 NPPVpluginNeedsXEmbed = 14,
320 /* Get the NPObject for scripting the plugin. Introduced in Firefox
321 * 1.0 (NPAPI minor version 14).
323 NPPVpluginScriptableNPObject = 15,
325 /* Get the plugin value (as \0-terminated UTF-8 string data) for
326 * form submission if the plugin is part of a form. Use
327 * NPN_MemAlloc() to allocate memory for the string data. Introduced
328 * in Mozilla 1.8b2 (NPAPI minor version 15).
330 NPPVformValue = 16,
332 NPPVpluginUrlRequestsDisplayedBool = 17,
334 /* Checks if the plugin is interested in receiving the http body of
335 * all http requests (including failed ones, http status != 200).
337 NPPVpluginWantsAllNetworkStreams = 18,
339 NPPVcursor = 19
341 #ifdef XP_MACOSX
342 /* Used for negotiating drawing models */
343 , NPPVpluginDrawingModel = 1000
344 #endif
345 } NPPVariable;
348 * List of variable names for which NPN_GetValue is implemented by Mozilla
350 typedef enum {
351 NPNVxDisplay = 1,
352 NPNVxtAppContext,
353 NPNVnetscapeWindow,
354 NPNVjavascriptEnabledBool,
355 NPNVasdEnabledBool,
356 NPNVisOfflineBool,
358 /* 10 and over are available on Mozilla builds starting with 0.9.4 */
359 NPNVserviceManager = (10 | NP_ABI_MASK),
360 NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */
361 NPNVDOMWindow = (12 | NP_ABI_MASK),
362 NPNVToolkit = (13 | NP_ABI_MASK),
363 NPNVSupportsXEmbedBool = 14,
365 /* Get the NPObject wrapper for the browser window. */
366 NPNVWindowNPObject = 15,
368 /* Get the NPObject wrapper for the plugins DOM element. */
369 NPNVPluginElementNPObject = 16,
371 NPNVSupportsWindowless = 17,
373 NPNVSupportsWindowlessCursors = 18
375 #ifdef XP_MACOSX
376 /* Used for negotiating drawing models */
377 , NPNVpluginDrawingModel = 1000
378 #ifndef NP_NO_QUICKDRAW
379 , NPNVsupportsQuickDrawBool = 2000
380 #endif
381 , NPNVsupportsCoreGraphicsBool = 2001
382 #endif
383 } NPNVariable;
385 typedef enum {
386 // CSS standard cursors
387 NPCursorAlias = 1,
388 NPCursorAllScroll = 2,
389 NPCursorAuto = 3,
390 NPCursorCell = 4,
391 NPCursorContextMenu = 5,
392 NPCursorCopy = 6,
393 NPCursorCrosshair = 7,
394 NPCursorDefault = 8,
395 NPCursorHelp = 9,
396 NPCursorMove = 10,
397 NPCursorNoDrop = 11,
398 NPCursorNone = 12,
399 NPCursorNotAllowed = 13,
400 NPCursorPointer = 14,
401 NPCursorProgress = 15,
402 NPCursorText = 16,
403 NPCursorVerticalText = 17,
404 NPCursorWait = 18,
406 // CSS standard resize cursors
407 NPCursorColResize = 19,
408 NPCursorEResize = 20,
409 NPCursorEWResize = 21,
410 NPCursorNEResize = 22,
411 NPCursorNESWResize = 23,
412 NPCursorNResize = 24,
413 NPCursorNSResize = 25,
414 NPCursorNWResize = 26,
415 NPCursorNWSEResize = 27,
416 NPCursorRowResize = 28,
417 NPCursorSEResize = 29,
418 NPCursorSResize = 30,
419 NPCursorSWResize = 31,
420 NPCursorWResize = 32
421 } NPCursor;
424 * The type of Tookkit the widgets use
426 typedef enum {
427 NPNVGtk12 = 1,
428 NPNVGtk2
429 } NPNToolkitType;
432 * The type of a NPWindow - it specifies the type of the data structure
433 * returned in the window field.
435 typedef enum {
436 NPWindowTypeWindow = 1,
437 NPWindowTypeDrawable
438 } NPWindowType;
440 typedef struct _NPWindow
442 void* window; /* Platform specific window handle */
443 /* OS/2: x - Position of bottom left corner */
444 /* OS/2: y - relative to visible netscape window */
445 int32_t x; /* Position of top left corner relative */
446 int32_t y; /* to a netscape page. */
447 uint32_t width; /* Maximum window size */
448 uint32_t height;
449 NPRect clipRect; /* Clipping rectangle in port coordinates */
450 /* Used by MAC only. */
451 #if defined(XP_UNIX) && !defined(XP_MACOSX)
452 void * ws_info; /* Platform-dependent additonal data */
453 #endif /* XP_UNIX */
454 NPWindowType type; /* Is this a window or a drawable? */
455 } NPWindow;
458 typedef struct _NPFullPrint
460 NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */
461 NPBool printOne; /* TRUE if plugin should print one copy to default
462 printer */
463 void* platformPrint; /* Platform-specific printing info */
464 } NPFullPrint;
466 typedef struct _NPEmbedPrint
468 NPWindow window;
469 void* platformPrint; /* Platform-specific printing info */
470 } NPEmbedPrint;
472 typedef struct _NPPrint
474 uint16_t mode; /* NP_FULL or NP_EMBED */
475 union
477 NPFullPrint fullPrint; /* if mode is NP_FULL */
478 NPEmbedPrint embedPrint; /* if mode is NP_EMBED */
479 } print;
480 } NPPrint;
482 #ifdef XP_MACOSX
483 typedef EventRecord NPEvent;
484 #elif defined(XP_WIN)
485 typedef struct _NPEvent
487 uint16_t event;
488 uint32_t wParam;
489 uint32_t lParam;
490 } NPEvent;
491 #elif defined(XP_OS2)
492 typedef struct _NPEvent
494 uint32_t event;
495 uint32_t wParam;
496 uint32_t lParam;
497 } NPEvent;
498 #elif defined (XP_UNIX) && defined(MOZ_X11)
499 typedef XEvent NPEvent;
500 #else
501 typedef void* NPEvent;
502 #endif /* XP_MACOSX */
504 #ifdef XP_MACOSX
506 typedef void* NPRegion;
507 #ifndef NP_NO_QUICKDRAW
508 typedef RgnHandle NPQDRegion;
509 #endif
510 typedef CGPathRef NPCGRegion;
511 #elif defined(XP_WIN)
512 typedef HRGN NPRegion;
513 #elif defined(XP_UNIX) && defined(MOZ_X11)
514 typedef Region NPRegion;
515 #else
516 typedef void *NPRegion;
517 #endif
519 #ifdef XP_MACOSX
520 typedef struct NP_Port
522 CGrafPtr port;
523 int32_t portx; /* position inside the topmost window */
524 int32_t porty;
525 } NP_Port;
527 typedef struct NP_CGContext
529 CGContextRef context;
530 WindowRef window;
531 } NP_CGContext;
533 /* Non-standard event types that can be passed to HandleEvent */
534 enum NPEventType {
535 NPEventType_GetFocusEvent = (osEvt + 16),
536 NPEventType_LoseFocusEvent,
537 NPEventType_AdjustCursorEvent,
538 NPEventType_MenuCommandEvent,
539 NPEventType_ClippingChangedEvent,
540 NPEventType_ScrollingBeginsEvent = 1000,
541 NPEventType_ScrollingEndsEvent
544 #ifdef OBSOLETE
545 #define getFocusEvent (osEvt + 16)
546 #define loseFocusEvent (osEvt + 17)
547 #define adjustCursorEvent (osEvt + 18)
548 #endif
550 #endif /* XP_MACOSX */
553 * Values for mode passed to NPP_New:
555 #define NP_EMBED 1
556 #define NP_FULL 2
559 * Values for stream type passed to NPP_NewStream:
561 #define NP_NORMAL 1
562 #define NP_SEEK 2
563 #define NP_ASFILE 3
564 #define NP_ASFILEONLY 4
566 #define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
569 /*----------------------------------------------------------------------*/
570 /* Error and Reason Code definitions */
571 /*----------------------------------------------------------------------*/
574 * Values of type NPError:
576 #define NPERR_BASE 0
577 #define NPERR_NO_ERROR (NPERR_BASE + 0)
578 #define NPERR_GENERIC_ERROR (NPERR_BASE + 1)
579 #define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2)
580 #define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3)
581 #define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4)
582 #define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5)
583 #define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6)
584 #define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7)
585 #define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8)
586 #define NPERR_INVALID_PARAM (NPERR_BASE + 9)
587 #define NPERR_INVALID_URL (NPERR_BASE + 10)
588 #define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11)
589 #define NPERR_NO_DATA (NPERR_BASE + 12)
590 #define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13)
593 * Values of type NPReason:
595 #define NPRES_BASE 0
596 #define NPRES_DONE (NPRES_BASE + 0)
597 #define NPRES_NETWORK_ERR (NPRES_BASE + 1)
598 #define NPRES_USER_BREAK (NPRES_BASE + 2)
601 * Don't use these obsolete error codes any more.
603 #define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR
604 #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR
605 #define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK
608 * Version feature information
610 #define NPVERS_HAS_STREAMOUTPUT 8
611 #define NPVERS_HAS_NOTIFICATION 9
612 #define NPVERS_HAS_LIVECONNECT 9
613 #define NPVERS_WIN16_HAS_LIVECONNECT 9
614 #define NPVERS_68K_HAS_LIVECONNECT 11
615 #define NPVERS_HAS_WINDOWLESS 11
616 #define NPVERS_HAS_XPCONNECT_SCRIPTING 13
617 #define NPVERS_HAS_NPRUNTIME_SCRIPTING 14
618 #define NPVERS_HAS_FORM_VALUES 15
619 #define NPVERS_HAS_POPUPS_ENABLED_STATE 16
620 #define NPVERS_HAS_RESPONSE_HEADERS 17
621 #define NPVERS_HAS_NPOBJECT_ENUM 18
622 #define NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL 19
623 #define NPVERS_HAS_ALL_NETWORK_STREAMS 20
624 #define NPVERS_HAS_WINDOWLESS_CURSORS 21
626 /*----------------------------------------------------------------------*/
627 /* Function Prototypes */
628 /*----------------------------------------------------------------------*/
630 #if defined(__OS2__)
631 #define NP_LOADDS _System
632 #else
633 #define NP_LOADDS
634 #endif
636 #ifdef __cplusplus
637 extern "C" {
638 #endif
640 /* NPP_* functions are provided by the plugin and called by the navigator. */
642 #ifdef XP_UNIX
643 char* NPP_GetMIMEDescription(void);
644 #endif
646 NPError NP_LOADDS NPP_Initialize(void);
647 void NP_LOADDS NPP_Shutdown(void);
648 NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
649 uint16_t mode, int16_t argc, char* argn[],
650 char* argv[], NPSavedData* saved);
651 NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
652 NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
653 NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
654 NPStream* stream, NPBool seekable,
655 uint16_t* stype);
656 NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream,
657 NPReason reason);
658 int32_t NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
659 int32_t NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32_t offset,
660 int32_t len, void* buffer);
661 void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
662 const char* fname);
663 void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
664 int16_t NP_LOADDS NPP_HandleEvent(NPP instance, void* event);
665 void NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
666 NPReason reason, void* notifyData);
667 #ifdef OJI
668 jref NP_LOADDS NPP_GetJavaClass(void);
669 #endif
670 NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value);
671 NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value);
673 /* NPN_* functions are provided by the navigator and called by the plugin. */
674 void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor,
675 int* netscape_major, int* netscape_minor);
676 NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url,
677 const char* target, void* notifyData);
678 NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url,
679 const char* target);
680 NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url,
681 const char* target, uint32_t len,
682 const char* buf, NPBool file,
683 void* notifyData);
684 NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url,
685 const char* target, uint32_t len,
686 const char* buf, NPBool file);
687 NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
688 NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type,
689 const char* target, NPStream** stream);
690 int32_t NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32_t len,
691 void* buffer);
692 NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream,
693 NPReason reason);
694 void NP_LOADDS NPN_Status(NPP instance, const char* message);
695 const char* NP_LOADDS NPN_UserAgent(NPP instance);
696 void* NP_LOADDS NPN_MemAlloc(uint32_t size);
697 void NP_LOADDS NPN_MemFree(void* ptr);
698 uint32_t NP_LOADDS NPN_MemFlush(uint32_t size);
699 void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages);
700 #ifdef OJI
701 JRIEnv* NP_LOADDS NPN_GetJavaEnv(void);
702 jref NP_LOADDS NPN_GetJavaPeer(NPP instance);
703 #endif
704 NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable,
705 void *value);
706 NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable,
707 void *value);
708 void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
709 void NP_LOADDS NPN_InvalidateRegion(NPP instance,
710 NPRegion invalidRegion);
711 void NP_LOADDS NPN_ForceRedraw(NPP instance);
712 void NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
713 void NP_LOADDS NPN_PopPopupsEnabledState(NPP instance);
714 void NP_LOADDS NPN_PluginThreadAsyncCall(NPP instance,
715 void (*func) (void *), void *userData);
717 #ifdef __cplusplus
718 } /* end extern "C" */
719 #endif
721 #endif /* RC_INVOKED */
722 #ifdef __OS2__
723 #pragma pack()
724 #endif
726 #endif /* npapi_h_ */