]> git.saurik.com Git - apple/javascriptcore.git/blame_incremental - bindings/npapi.h
JavaScriptCore-466.1.tar.gz
[apple/javascriptcore.git] / bindings / npapi.h
... / ...
CommitLineData
1/* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3 *
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
8 *
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
13 *
14 * The Original Code is mozilla.org code.
15 *
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation.
18 * Portions created by the Initial Developer are Copyright (C) 1998
19 * the Initial Developer. All Rights Reserved.
20 *
21 * Contributor(s):
22 *
23 * Alternatively, the contents of this file may be used under the terms of
24 * either the GNU General Public License Version 2 or later (the "GPL"), or
25 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 * in which case the provisions of the GPL or the LGPL are applicable instead
27 * of those above. If you wish to allow use of your version of this file only
28 * under the terms of either the GPL or the LGPL, and not to allow others to
29 * use your version of this file under the terms of the MPL, indicate your
30 * decision by deleting the provisions above and replace them with the notice
31 * and other provisions required by the GPL or the LGPL. If you do not delete
32 * the provisions above, a recipient may use your version of this file under
33 * the terms of any one of the MPL, the GPL or the LGPL.
34 *
35 * ***** END LICENSE BLOCK ***** */
36
37
38 /*
39 * Netscape client plug-in API spec
40 */
41
42
43#ifndef _NPAPI_H_
44#define _NPAPI_H_
45
46#include <wtf/Platform.h>
47
48#if ENABLE(NETSCAPE_API)
49
50#ifdef INCLUDE_JAVA
51#include "jri.h" /* Java Runtime Interface */
52#else
53#define jref void *
54#define JRIEnv void
55#endif
56
57#ifdef _WIN32
58# ifndef XP_WIN
59# define XP_WIN 1
60# endif /* XP_WIN */
61#endif /* _WIN32 */
62
63#ifdef __MWERKS__
64# define _declspec __declspec
65# ifdef macintosh
66# ifndef XP_MAC
67# define XP_MAC 1
68# endif /* XP_MAC */
69# endif /* macintosh */
70# ifdef __INTEL__
71# undef NULL
72# ifndef XP_WIN
73# define XP_WIN 1
74# endif /* __INTEL__ */
75# endif /* XP_PC */
76#endif /* __MWERKS__ */
77
78#if defined(__APPLE_CC__) && !defined(__MACOS_CLASSIC__) && !defined(XP_UNIX)
79# define XP_MACOSX
80#endif
81
82#ifdef XP_MAC
83 #include <Quickdraw.h>
84 #include <Events.h>
85#endif
86
87#ifdef XP_MACOSX
88 #include <Carbon/Carbon.h>
89 #include <ApplicationServices/ApplicationServices.h>
90 #include <OpenGL/OpenGL.h>
91#endif
92
93#ifdef XP_UNIX
94 #include <X11/Xlib.h>
95 #include <X11/Xutil.h>
96 #include <stdio.h>
97#endif
98
99#ifdef XP_WIN
100 #include <windows.h>
101#endif
102
103#if defined(XP_MACOSX) && defined(__LP64__)
104#error 64-bit Netscape plug-ins are not supported on Mac OS X
105#endif
106
107/*----------------------------------------------------------------------*/
108/* Plugin Version Constants */
109/*----------------------------------------------------------------------*/
110
111#define NP_VERSION_MAJOR 0
112#define NP_VERSION_MINOR 18
113
114
115
116/*----------------------------------------------------------------------*/
117/* Definition of Basic Types */
118/*----------------------------------------------------------------------*/
119
120#ifndef _UINT16
121#define _UINT16
122typedef unsigned short uint16;
123#endif
124
125#ifndef _UINT32
126#define _UINT32
127#ifdef __LP64__
128typedef unsigned int uint32;
129#else /* __LP64__ */
130typedef unsigned long uint32;
131#endif /* __LP64__ */
132#endif
133
134#ifndef _INT16
135#define _INT16
136typedef short int16;
137#endif
138
139#ifndef _INT32
140#define _INT32
141#ifdef __LP64__
142typedef int int32;
143#else /* __LP64__ */
144typedef long int32;
145#endif /* __LP64__ */
146#endif
147
148#ifndef FALSE
149#define FALSE (0)
150#endif
151#ifndef TRUE
152#define TRUE (1)
153#endif
154#ifndef NULL
155#define NULL (0L)
156#endif
157
158typedef unsigned char NPBool;
159typedef int16 NPError;
160typedef int16 NPReason;
161typedef char* NPMIMEType;
162
163
164
165/*----------------------------------------------------------------------*/
166/* Structures and definitions */
167/*----------------------------------------------------------------------*/
168
169#if !defined(__LP64__)
170#if defined(XP_MAC) || defined(XP_MACOSX)
171#pragma options align=mac68k
172#endif
173#endif /* __LP64__ */
174
175/*
176 * NPP is a plug-in's opaque instance handle
177 */
178typedef struct _NPP
179{
180 void* pdata; /* plug-in private data */
181 void* ndata; /* netscape private data */
182} NPP_t;
183
184typedef NPP_t* NPP;
185
186
187typedef struct _NPStream
188{
189 void* pdata; /* plug-in private data */
190 void* ndata; /* netscape private data */
191 const char* url;
192 uint32 end;
193 uint32 lastmodified;
194 void* notifyData;
195 const char* headers; /* Response headers from host.
196 * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS.
197 * Used for HTTP only; NULL for non-HTTP.
198 * Available from NPP_NewStream onwards.
199 * Plugin should copy this data before storing it.
200 * Includes HTTP status line and all headers,
201 * preferably verbatim as received from server,
202 * headers formatted as in HTTP ("Header: Value"),
203 * and newlines (\n, NOT \r\n) separating lines.
204 * Terminated by \n\0 (NOT \n\n\0). */
205} NPStream;
206
207
208typedef struct _NPByteRange
209{
210 int32 offset; /* negative offset means from the end */
211 uint32 length;
212 struct _NPByteRange* next;
213} NPByteRange;
214
215
216typedef struct _NPSavedData
217{
218 int32 len;
219 void* buf;
220} NPSavedData;
221
222
223typedef struct _NPRect
224{
225 uint16 top;
226 uint16 left;
227 uint16 bottom;
228 uint16 right;
229} NPRect;
230
231
232#ifdef XP_UNIX
233/*
234 * Unix specific structures and definitions
235 */
236
237/*
238 * Callback Structures.
239 *
240 * These are used to pass additional platform specific information.
241 */
242enum {
243 NP_SETWINDOW = 1,
244 NP_PRINT
245};
246
247typedef struct
248{
249 int32 type;
250} NPAnyCallbackStruct;
251
252typedef struct
253{
254 int32 type;
255 Display* display;
256 Visual* visual;
257 Colormap colormap;
258 unsigned int depth;
259} NPSetWindowCallbackStruct;
260
261typedef struct
262{
263 int32 type;
264 FILE* fp;
265} NPPrintCallbackStruct;
266
267#endif /* XP_UNIX */
268
269/*
270 * The following masks are applied on certain platforms to NPNV and
271 * NPPV selectors that pass around pointers to COM interfaces. Newer
272 * compilers on some platforms may generate vtables that are not
273 * compatible with older compilers. To prevent older plugins from
274 * not understanding a new browser's ABI, these masks change the
275 * values of those selectors on those platforms. To remain backwards
276 * compatible with differenet versions of the browser, plugins can
277 * use these masks to dynamically determine and use the correct C++
278 * ABI that the browser is expecting. This does not apply to Windows
279 * as Microsoft's COM ABI will likely not change.
280 */
281
282#define NP_ABI_GCC3_MASK 0x10000000
283/*
284 * gcc 3.x generated vtables on UNIX and OSX are incompatible with
285 * previous compilers.
286 */
287#if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
288#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
289#else
290#define _NP_ABI_MIXIN_FOR_GCC3 0
291#endif
292
293#define NP_ABI_MACHO_MASK 0x01000000
294/*
295 * On OSX, the Mach-O executable format is significantly
296 * different than CFM. In addition to having a different
297 * C++ ABI, it also has has different C calling convention.
298 * You must use glue code when calling between CFM and
299 * Mach-O C functions.
300 */
301#if (defined(TARGET_RT_MAC_MACHO))
302#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK
303#else
304#define _NP_ABI_MIXIN_FOR_MACHO 0
305#endif
306
307
308#define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO)
309
310/*
311 * List of variable names for which NPP_GetValue shall be implemented
312 */
313typedef enum {
314 NPPVpluginNameString = 1,
315 NPPVpluginDescriptionString,
316 NPPVpluginWindowBool,
317 NPPVpluginTransparentBool,
318
319 NPPVjavaClass, /* Not implemented in WebKit */
320 NPPVpluginWindowSize, /* Not implemented in WebKit */
321 NPPVpluginTimerInterval, /* Not implemented in WebKit */
322
323 NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), /* Not implemented in WebKit */
324 NPPVpluginScriptableIID = 11, /* Not implemented in WebKit */
325
326 /* 12 and over are available on Mozilla builds starting with 0.9.9 */
327 NPPVjavascriptPushCallerBool = 12, /* Not implemented in WebKit */
328 NPPVpluginKeepLibraryInMemory = 13, /* Not implemented in WebKit */
329 NPPVpluginNeedsXEmbed = 14, /* Not implemented in WebKit */
330
331 /* Get the NPObject for scripting the plugin. */
332 NPPVpluginScriptableNPObject = 15,
333
334 /* Get the plugin value (as \0-terminated UTF-8 string data) for
335 * form submission if the plugin is part of a form. Use
336 * NPN_MemAlloc() to allocate memory for the string data.
337 */
338 NPPVformValue = 16, /* Not implemented in WebKit */
339#ifdef XP_MACOSX
340 /* Used for negotiating drawing models */
341 NPPVpluginDrawingModel = 1000
342#endif
343} NPPVariable;
344
345/*
346 * List of variable names for which NPN_GetValue is implemented by Mozilla
347 */
348typedef enum {
349 NPNVxDisplay = 1,
350 NPNVxtAppContext,
351 NPNVnetscapeWindow,
352 NPNVjavascriptEnabledBool,
353 NPNVasdEnabledBool,
354 NPNVisOfflineBool,
355
356 /* 10 and over are available on Mozilla builds starting with 0.9.4 */
357 NPNVserviceManager = (10 | NP_ABI_MASK), /* Not implemented in WebKit */
358 NPNVDOMElement = (11 | NP_ABI_MASK), /* Not implemented in WebKit */
359 NPNVDOMWindow = (12 | NP_ABI_MASK), /* Not implemented in WebKit */
360 NPNVToolkit = (13 | NP_ABI_MASK), /* Not implemented in WebKit */
361 NPNVSupportsXEmbedBool = 14, /* Not implemented in WebKit */
362
363 /* Get the NPObject wrapper for the browser window. */
364 NPNVWindowNPObject = 15,
365
366 /* Get the NPObject wrapper for the plugins DOM element. */
367 NPNVPluginElementNPObject
368
369#ifdef XP_MACOSX
370 , NPNVpluginDrawingModel = 1000 /* The NPDrawingModel specified by the plugin */
371
372#ifndef NP_NO_QUICKDRAW
373 , NPNVsupportsQuickDrawBool = 2000 /* TRUE if the browser supports the QuickDraw drawing model */
374#endif
375 , NPNVsupportsCoreGraphicsBool = 2001 /* TRUE if the browser supports the CoreGraphics drawing model */
376 , NPNVsupportsOpenGLBool = 2002 /* TRUE if the browser supports the OpenGL drawing model (CGL on Mac) */
377#endif /* XP_MACOSX */
378} NPNVariable;
379
380/*
381 * The type of a NPWindow - it specifies the type of the data structure
382 * returned in the window field.
383 */
384typedef enum {
385 NPWindowTypeWindow = 1,
386 NPWindowTypeDrawable
387} NPWindowType;
388
389#ifdef XP_MACOSX
390
391/*
392 * The drawing model for a Mac OS X plugin. These are the possible values for the NPNVpluginDrawingModel variable.
393 */
394
395typedef enum {
396#ifndef NP_NO_QUICKDRAW
397 NPDrawingModelQuickDraw = 0,
398#endif
399 NPDrawingModelCoreGraphics = 1,
400 NPDrawingModelOpenGL = 2
401} NPDrawingModel;
402
403#endif
404
405typedef struct _NPWindow
406{
407 void* window; /* Platform specific window handle */
408 int32 x; /* Position of top left corner relative */
409 int32 y; /* to a netscape page. */
410 uint32 width; /* Maximum window size */
411 uint32 height;
412 NPRect clipRect; /* Clipping rectangle in port coordinates */
413 /* Used by MAC only. */
414#ifdef XP_UNIX
415 void * ws_info; /* Platform-dependent additonal data */
416#endif /* XP_UNIX */
417 NPWindowType type; /* Is this a window or a drawable? */
418} NPWindow;
419
420
421typedef struct _NPFullPrint
422{
423 NPBool pluginPrinted; /* Set TRUE if plugin handled fullscreen */
424 /* printing */
425 NPBool printOne; /* TRUE if plugin should print one copy */
426 /* to default printer */
427 void* platformPrint; /* Platform-specific printing info */
428} NPFullPrint;
429
430typedef struct _NPEmbedPrint
431{
432 NPWindow window;
433 void* platformPrint; /* Platform-specific printing info */
434} NPEmbedPrint;
435
436typedef struct _NPPrint
437{
438 uint16 mode; /* NP_FULL or NP_EMBED */
439 union
440 {
441 NPFullPrint fullPrint; /* if mode is NP_FULL */
442 NPEmbedPrint embedPrint; /* if mode is NP_EMBED */
443 } print;
444} NPPrint;
445
446#if defined(XP_MAC) || defined(XP_MACOSX)
447typedef EventRecord NPEvent;
448#elif defined(XP_WIN)
449typedef struct _NPEvent
450{
451 uint16 event;
452 uint32 wParam;
453 uint32 lParam;
454} NPEvent;
455#elif defined (XP_UNIX)
456typedef XEvent NPEvent;
457#else
458typedef void* NPEvent;
459#endif /* XP_MAC */
460
461#if defined(XP_MAC)
462typedef RgnHandle NPRegion;
463#elif defined(XP_MACOSX)
464/*
465 * NPRegion's type depends on the drawing model specified by the plugin (see NPNVpluginDrawingModel).
466 * NPQDRegion represents a QuickDraw RgnHandle and is used with the QuickDraw drawing model.
467 * NPCGRegion repesents a graphical region when using any other drawing model.
468 */
469typedef void *NPRegion;
470#ifndef NP_NO_QUICKDRAW
471typedef RgnHandle NPQDRegion;
472#endif
473typedef CGPathRef NPCGRegion;
474#elif defined(XP_WIN)
475typedef HRGN NPRegion;
476#elif defined(XP_UNIX)
477typedef Region NPRegion;
478#else
479typedef void *NPRegion;
480#endif /* XP_MAC */
481
482#ifdef XP_MACOSX
483
484/*
485 * NP_CGContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelCoreGraphics
486 * as its drawing model.
487 */
488
489typedef struct NP_CGContext
490{
491 CGContextRef context;
492 WindowRef window;
493} NP_CGContext;
494
495/*
496 * NP_GLContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelOpenGL as its
497 * drawing model.
498 */
499
500typedef struct NP_GLContext
501{
502 CGLContextObj context;
503 WindowRef window;
504} NP_GLContext;
505
506#endif /* XP_MACOSX */
507
508#if defined(XP_MAC) || defined(XP_MACOSX)
509
510/*
511 * Mac-specific structures and definitions.
512 */
513
514#ifndef NP_NO_QUICKDRAW
515
516/*
517 * NP_Port is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelQuickDraw as its
518 * drawing model, or the plugin does not specify a drawing model.
519 *
520 * It is not recommended that new plugins use NPDrawingModelQuickDraw or NP_Port, as QuickDraw has been
521 * deprecated in Mac OS X 10.5. CoreGraphics is the preferred drawing API.
522 *
523 * NP_Port is not available in 64-bit.
524 */
525
526typedef struct NP_Port
527{
528 CGrafPtr port; /* Grafport */
529 int32 portx; /* position inside the topmost window */
530 int32 porty;
531} NP_Port;
532
533#endif /* NP_NO_QUICKDRAW */
534
535/*
536 * Non-standard event types that can be passed to HandleEvent
537 */
538#define getFocusEvent (osEvt + 16)
539#define loseFocusEvent (osEvt + 17)
540#define adjustCursorEvent (osEvt + 18)
541
542#endif /* XP_MAC */
543
544
545/*
546 * Values for mode passed to NPP_New:
547 */
548#define NP_EMBED 1
549#define NP_FULL 2
550
551/*
552 * Values for stream type passed to NPP_NewStream:
553 */
554#define NP_NORMAL 1
555#define NP_SEEK 2
556#define NP_ASFILE 3
557#define NP_ASFILEONLY 4
558
559#define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
560
561#if !defined(__LP64__)
562#if defined(XP_MAC) || defined(XP_MACOSX)
563#pragma options align=reset
564#endif
565#endif /* __LP64__ */
566
567
568/*----------------------------------------------------------------------*/
569/* Error and Reason Code definitions */
570/*----------------------------------------------------------------------*/
571
572/*
573 * Values of type NPError:
574 */
575#define NPERR_BASE 0
576#define NPERR_NO_ERROR (NPERR_BASE + 0)
577#define NPERR_GENERIC_ERROR (NPERR_BASE + 1)
578#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2)
579#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3)
580#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4)
581#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5)
582#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6)
583#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7)
584#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8)
585#define NPERR_INVALID_PARAM (NPERR_BASE + 9)
586#define NPERR_INVALID_URL (NPERR_BASE + 10)
587#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11)
588#define NPERR_NO_DATA (NPERR_BASE + 12)
589#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13)
590
591/*
592 * Values of type NPReason:
593 */
594#define NPRES_BASE 0
595#define NPRES_DONE (NPRES_BASE + 0)
596#define NPRES_NETWORK_ERR (NPRES_BASE + 1)
597#define NPRES_USER_BREAK (NPRES_BASE + 2)
598
599/*
600 * Don't use these obsolete error codes any more.
601 */
602#define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR
603#define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR
604#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK
605
606/*
607 * Version feature information
608 */
609#define NPVERS_HAS_STREAMOUTPUT 8
610#define NPVERS_HAS_NOTIFICATION 9
611#define NPVERS_HAS_LIVECONNECT 9
612#define NPVERS_WIN16_HAS_LIVECONNECT 9
613#define NPVERS_68K_HAS_LIVECONNECT 11
614#define NPVERS_HAS_WINDOWLESS 11
615#define NPVERS_HAS_XPCONNECT_SCRIPTING 13 /* Not implemented in WebKit */
616#define NPVERS_HAS_NPRUNTIME_SCRIPTING 14
617#define NPVERS_HAS_FORM_VALUES 15 /* Not implemented in WebKit; see bug 13061 */
618#define NPVERS_HAS_POPUPS_ENABLED_STATE 16 /* Not implemented in WebKit */
619#define NPVERS_HAS_RESPONSE_HEADERS 17
620#define NPVERS_HAS_NPOBJECT_ENUM 18
621
622
623/*----------------------------------------------------------------------*/
624/* Function Prototypes */
625/*----------------------------------------------------------------------*/
626
627#if defined(_WINDOWS) && !defined(WIN32)
628#define NP_LOADDS _loadds
629#else
630#define NP_LOADDS
631#endif
632
633#ifdef __cplusplus
634extern "C" {
635#endif
636
637/*
638 * NPP_* functions are provided by the plugin and called by the navigator.
639 */
640
641#ifdef XP_UNIX
642char* NPP_GetMIMEDescription(void);
643#endif /* XP_UNIX */
644
645NPError NPP_Initialize(void);
646void NPP_Shutdown(void);
647NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
648 uint16 mode, int16 argc, char* argn[],
649 char* argv[], NPSavedData* saved);
650NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
651NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
652NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
653 NPStream* stream, NPBool seekable,
654 uint16* stype);
655NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream,
656 NPReason reason);
657int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
658int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset,
659 int32 len, void* buffer);
660void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
661 const char* fname);
662void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
663int16 NPP_HandleEvent(NPP instance, void* event);
664void NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
665 NPReason reason, void* notifyData);
666jref NP_LOADDS NPP_GetJavaClass(void);
667NPError NPP_GetValue(NPP instance, NPPVariable variable,
668 void *value);
669NPError NPP_SetValue(NPP instance, NPNVariable variable,
670 void *value);
671
672/*
673 * NPN_* functions are provided by the navigator and called by the plugin.
674 */
675
676void NPN_Version(int* plugin_major, int* plugin_minor,
677 int* netscape_major, int* netscape_minor);
678NPError NPN_GetURLNotify(NPP instance, const char* url,
679 const char* target, void* notifyData);
680NPError NPN_GetURL(NPP instance, const char* url,
681 const char* target);
682NPError NPN_PostURLNotify(NPP instance, const char* url,
683 const char* target, uint32 len,
684 const char* buf, NPBool file,
685 void* notifyData);
686NPError NPN_PostURL(NPP instance, const char* url,
687 const char* target, uint32 len,
688 const char* buf, NPBool file);
689NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
690NPError NPN_NewStream(NPP instance, NPMIMEType type,
691 const char* target, NPStream** stream);
692int32 NPN_Write(NPP instance, NPStream* stream, int32 len,
693 void* buffer);
694NPError NPN_DestroyStream(NPP instance, NPStream* stream,
695 NPReason reason);
696void NPN_Status(NPP instance, const char* message);
697const char* NPN_UserAgent(NPP instance);
698void* NPN_MemAlloc(uint32 size);
699void NPN_MemFree(void* ptr);
700uint32 NPN_MemFlush(uint32 size);
701void NPN_ReloadPlugins(NPBool reloadPages);
702JRIEnv* NPN_GetJavaEnv(void);
703jref NPN_GetJavaPeer(NPP instance);
704NPError NPN_GetValue(NPP instance, NPNVariable variable,
705 void *value);
706NPError NPN_SetValue(NPP instance, NPPVariable variable,
707 void *value);
708void NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
709void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion);
710void NPN_ForceRedraw(NPP instance);
711void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
712void NPN_PopPopupsEnabledState(NPP instance);
713
714#ifdef __cplusplus
715} /* end extern "C" */
716#endif
717
718#endif // ENABLE(NETSCAPE_API)
719
720#endif /* _NPAPI_H_ */