FreeWRL/FreeX3D  3.0.0
npapi.h
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
4  *
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/
9  *
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.
14  *
15  * The Original Code is mozilla.org code.
16  *
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.
21  *
22  * Contributor(s):
23  *
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.
35  *
36  * ***** END LICENSE BLOCK ***** */
37 
38 #ifndef npapi_h_
39 #define npapi_h_
40 
41 #ifdef __OS2__
42 #pragma pack(1)
43 #endif
44 
45 #include "nptypes.h"
46 
47 #if defined (__OS2__) || defined (OS2)
48 # ifndef XP_OS2
49 # define XP_OS2 1
50 # endif /* XP_OS2 */
51 #endif /* __OS2__ */
52 
53 #ifdef _WINDOWS
54 # include <windef.h>
55 # ifndef XP_WIN
56 # define XP_WIN 1
57 # endif /* XP_WIN */
58 #endif /* _WINDOWS */
59 
60 #ifdef XP_MACOSX
61 #ifdef __LP64__
62 #define NP_NO_QUICKDRAW
63 #else
64 #include <Carbon/Carbon.h>
65 #endif
66 #endif
67 
68 #if defined(XP_UNIX)
69 # include <stdio.h>
70 # if defined(MOZ_X11)
71 # include <X11/Xlib.h>
72 # include <X11/Xutil.h>
73 # endif
74 #endif
75 
76 /*----------------------------------------------------------------------*/
77 /* Plugin Version Constants */
78 /*----------------------------------------------------------------------*/
79 
80 #define NP_VERSION_MAJOR 0
81 #define NP_VERSION_MINOR 22
82 
83 
84 /* The OS/2 version of Netscape uses RC_DATA to define the
85  mime types, file extensions, etc that are required.
86  Use a vertical bar to separate types, end types with \0.
87  FileVersion and ProductVersion are 32bit ints, all other
88  entries are strings the MUST be terminated wwith a \0.
89 
90 AN EXAMPLE:
91 
92 RCDATA NP_INFO_ProductVersion { 1,0,0,1,}
93 
94 RCDATA NP_INFO_MIMEType { "video/x-video|",
95  "video/x-flick\0" }
96 RCDATA NP_INFO_FileExtents { "avi|",
97  "flc\0" }
98 RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|",
99  "MMOS2 Flc/Fli player(*.flc)\0" }
100 
101 RCDATA NP_INFO_FileVersion { 1,0,0,1 }
102 RCDATA NP_INFO_CompanyName { "Netscape Communications\0" }
103 RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0"
104 RCDATA NP_INFO_InternalName { "NPAVI32\0" )
105 RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0"
106 RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" }
107 RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" }
108 */
109 /* RC_DATA types for version info - required */
110 #define NP_INFO_ProductVersion 1
111 #define NP_INFO_MIMEType 2
112 #define NP_INFO_FileOpenName 3
113 #define NP_INFO_FileExtents 4
114 /* RC_DATA types for version info - used if found */
115 #define NP_INFO_FileDescription 5
116 #define NP_INFO_ProductName 6
117 /* RC_DATA types for version info - optional */
118 #define NP_INFO_CompanyName 7
119 #define NP_INFO_FileVersion 8
120 #define NP_INFO_InternalName 9
121 #define NP_INFO_LegalCopyright 10
122 #define NP_INFO_OriginalFilename 11
123 
124 #ifndef RC_INVOKED
125 
126 /*----------------------------------------------------------------------*/
127 /* Definition of Basic Types */
128 /*----------------------------------------------------------------------*/
129 
130 typedef unsigned char NPBool;
131 typedef int16_t NPError;
132 typedef int16_t NPReason;
133 typedef char* NPMIMEType;
134 
135 /*----------------------------------------------------------------------*/
136 /* Structures and definitions */
137 /*----------------------------------------------------------------------*/
138 
139 #if !defined(__LP64__)
140 #if defined(XP_MAC) || defined(XP_MACOSX)
141 #pragma options align=mac68k
142 #endif
143 #endif /* __LP64__ */
144 
145 /*
146  * NPP is a plug-in's opaque instance handle
147  */
148 typedef struct _NPP
149 {
150  void* pdata; /* plug-in private data */
151  void* ndata; /* netscape private data */
152 } NPP_t;
153 
154 typedef NPP_t* NPP;
155 
156 typedef struct _NPStream
157 {
158  void* pdata; /* plug-in private data */
159  void* ndata; /* netscape private data */
160  const char* url;
161  uint32_t end;
162  uint32_t lastmodified;
163  void* notifyData;
164  const char* headers; /* Response headers from host.
165  * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS.
166  * Used for HTTP only; NULL for non-HTTP.
167  * Available from NPP_NewStream onwards.
168  * Plugin should copy this data before storing it.
169  * Includes HTTP status line and all headers,
170  * preferably verbatim as received from server,
171  * headers formatted as in HTTP ("Header: Value"),
172  * and newlines (\n, NOT \r\n) separating lines.
173  * Terminated by \n\0 (NOT \n\n\0). */
174 } NPStream;
175 
176 typedef struct _NPByteRange
177 {
178  int32_t offset; /* negative offset means from the end */
179  uint32_t length;
180  struct _NPByteRange* next;
181 } NPByteRange;
182 
183 typedef struct _NPSavedData
184 {
185  int32_t len;
186  void* buf;
187 } NPSavedData;
188 
189 typedef struct _NPRect
190 {
191  uint16_t top;
192  uint16_t left;
193  uint16_t bottom;
194  uint16_t right;
195 } NPRect;
196 
197 typedef struct _NPSize
198 {
199  int32_t width;
200  int32_t height;
201 } NPSize;
202 
203 #ifdef XP_UNIX
204 /*
205  * Unix specific structures and definitions
206  */
207 
208 /*
209  * Callback Structures.
210  *
211  * These are used to pass additional platform specific information.
212  */
213 enum {
214  NP_SETWINDOW = 1,
215  NP_PRINT
216 };
217 
218 typedef struct
219 {
220  int32_t type;
221 } NPAnyCallbackStruct;
222 
223 typedef struct
224 {
225  int32_t type;
226 #ifdef MOZ_X11
227  Display* display;
228  Visual* visual;
229  Colormap colormap;
230  unsigned int depth;
231 #endif
232 } NPSetWindowCallbackStruct;
233 
234 typedef struct
235 {
236  int32_t type;
237  FILE* fp;
238 } NPPrintCallbackStruct;
239 
240 #endif /* XP_UNIX */
241 
242 #ifdef XP_MACOSX
243 typedef enum {
244 #ifndef NP_NO_QUICKDRAW
245  NPDrawingModelQuickDraw = 0,
246 #endif
247  NPDrawingModelCoreGraphics = 1
248 } NPDrawingModel;
249 #endif
250 
251 /*
252  * The following masks are applied on certain platforms to NPNV and
253  * NPPV selectors that pass around pointers to COM interfaces. Newer
254  * compilers on some platforms may generate vtables that are not
255  * compatible with older compilers. To prevent older plugins from
256  * not understanding a new browser's ABI, these masks change the
257  * values of those selectors on those platforms. To remain backwards
258  * compatible with differenet versions of the browser, plugins can
259  * use these masks to dynamically determine and use the correct C++
260  * ABI that the browser is expecting. This does not apply to Windows
261  * as Microsoft's COM ABI will likely not change.
262  */
263 
264 #define NP_ABI_GCC3_MASK 0x10000000
265 /*
266  * gcc 3.x generated vtables on UNIX and OSX are incompatible with
267  * previous compilers.
268  */
269 #if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
270 #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
271 #else
272 #define _NP_ABI_MIXIN_FOR_GCC3 0
273 #endif
274 
275 #ifdef XP_MACOSX
276 #define NP_ABI_MACHO_MASK 0x01000000
277 #define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK
278 #else
279 #define _NP_ABI_MIXIN_FOR_MACHO 0
280 #endif
281 
282 #define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO)
283 
284 /*
285  * List of variable names for which NPP_GetValue shall be implemented
286  */
287 typedef enum {
288  NPPVpluginNameString = 1,
289  NPPVpluginDescriptionString,
290  NPPVpluginWindowBool,
291  NPPVpluginTransparentBool,
292  NPPVjavaClass, /* Not implemented in Mozilla 1.0 */
293  NPPVpluginWindowSize,
294  NPPVpluginTimerInterval,
295 
296  NPPVpluginScriptableInstance = (10 | NP_ABI_MASK),
297  NPPVpluginScriptableIID = 11,
298 
299  /* Introduced in Mozilla 0.9.9 */
300  NPPVjavascriptPushCallerBool = 12,
301 
302  /* Introduced in Mozilla 1.0 */
303  NPPVpluginKeepLibraryInMemory = 13,
304  NPPVpluginNeedsXEmbed = 14,
305 
306  /* Get the NPObject for scripting the plugin. Introduced in Firefox
307  * 1.0 (NPAPI minor version 14).
308  */
309  NPPVpluginScriptableNPObject = 15,
310 
311  /* Get the plugin value (as \0-terminated UTF-8 string data) for
312  * form submission if the plugin is part of a form. Use
313  * NPN_MemAlloc() to allocate memory for the string data. Introduced
314  * in Mozilla 1.8b2 (NPAPI minor version 15).
315  */
316  NPPVformValue = 16,
317 
318  NPPVpluginUrlRequestsDisplayedBool = 17,
319 
320  /* Checks if the plugin is interested in receiving the http body of
321  * all http requests (including failed ones, http status != 200).
322  */
323  NPPVpluginWantsAllNetworkStreams = 18
324 
325 #ifdef XP_MACOSX
326  /* Used for negotiating drawing models */
327  , NPPVpluginDrawingModel = 1000
328 #endif
329 
330 #if (MOZ_PLATFORM_MAEMO == 5)
331  , NPPVpluginWindowlessLocalBool = 2002
332 #endif
333 } NPPVariable;
334 
335 /*
336  * List of variable names for which NPN_GetValue is implemented by Mozilla
337  */
338 typedef enum {
339  NPNVxDisplay = 1,
340  NPNVxtAppContext,
341  NPNVnetscapeWindow,
342  NPNVjavascriptEnabledBool,
343  NPNVasdEnabledBool,
344  NPNVisOfflineBool,
345 
346  /* 10 and over are available on Mozilla builds starting with 0.9.4 */
347  NPNVserviceManager = (10 | NP_ABI_MASK),
348  NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */
349  NPNVDOMWindow = (12 | NP_ABI_MASK),
350  NPNVToolkit = (13 | NP_ABI_MASK),
351  NPNVSupportsXEmbedBool = 14,
352 
353  /* Get the NPObject wrapper for the browser window. */
354  NPNVWindowNPObject = 15,
355 
356  /* Get the NPObject wrapper for the plugins DOM element. */
357  NPNVPluginElementNPObject = 16,
358 
359  NPNVSupportsWindowless = 17,
360 
361  NPNVprivateModeBool = 18
362 
363 #ifdef XP_MACOSX
364  /* Used for negotiating drawing models */
365  , NPNVpluginDrawingModel = 1000
366 #ifndef NP_NO_QUICKDRAW
367  , NPNVsupportsQuickDrawBool = 2000
368 #endif
369  , NPNVsupportsCoreGraphicsBool = 2001
370 #endif
371 
372 #if (MOZ_PLATFORM_MAEMO == 5)
373  , NPNVSupportsWindowlessLocal = 2002
374 #endif
375 
376 } NPNVariable;
377 
378 typedef enum {
379  NPNURLVCookie = 501,
380  NPNURLVProxy
381 } NPNURLVariable;
382 
383 /*
384  * The type of Tookkit the widgets use
385  */
386 typedef enum {
387  NPNVGtk12 = 1,
388  NPNVGtk2
389 } NPNToolkitType;
390 
391 /*
392  * The type of a NPWindow - it specifies the type of the data structure
393  * returned in the window field.
394  */
395 typedef enum {
396  NPWindowTypeWindow = 1,
397  NPWindowTypeDrawable
398 } NPWindowType;
399 
400 typedef struct _NPWindow
401 {
402  void* window; /* Platform specific window handle */
403  /* OS/2: x - Position of bottom left corner */
404  /* OS/2: y - relative to visible netscape window */
405  int32_t x; /* Position of top left corner relative */
406  int32_t y; /* to a netscape page. */
407  uint32_t width; /* Maximum window size */
408  uint32_t height;
409  NPRect clipRect; /* Clipping rectangle in port coordinates */
410  /* Used by MAC only. */
411 #if defined(XP_UNIX) && !defined(XP_MACOSX)
412  void * ws_info; /* Platform-dependent additonal data */
413 #endif /* XP_UNIX */
414  NPWindowType type; /* Is this a window or a drawable? */
415 } NPWindow;
416 
417 typedef struct _NPImageExpose
418 {
419  char* data; /* image pointer */
420  int32_t stride; /* Stride of data image pointer */
421  int32_t depth; /* Depth of image pointer */
422  int32_t x; /* Expose x */
423  int32_t y; /* Expose y */
424  uint32_t width; /* Expose width */
425  uint32_t height; /* Expose height */
426  NPSize dataSize; /* Data buffer size */
427  float translateX; /* translate X matrix value */
428  float translateY; /* translate Y matrix value */
429  float scaleX; /* scale X matrix value */
430  float scaleY; /* scale Y matrix value */
431 } NPImageExpose;
432 
433 typedef struct _NPFullPrint
434 {
435  NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */
436  NPBool printOne; /* TRUE if plugin should print one copy to default
437  printer */
438  void* platformPrint; /* Platform-specific printing info */
439 } NPFullPrint;
440 
441 typedef struct _NPEmbedPrint
442 {
443  NPWindow window;
444  void* platformPrint; /* Platform-specific printing info */
445 } NPEmbedPrint;
446 
447 typedef struct _NPPrint
448 {
449  uint16_t mode; /* NP_FULL or NP_EMBED */
450  union
451  {
452  NPFullPrint fullPrint; /* if mode is NP_FULL */
453  NPEmbedPrint embedPrint; /* if mode is NP_EMBED */
454  } print;
455 } NPPrint;
456 
457 #ifdef XP_MACOSX
458 typedef EventRecord NPEvent;
459 #elif defined(XP_WIN)
460 typedef struct _NPEvent
461 {
462  uint16_t event;
463  uintptr_t wParam;
464  uintptr_t lParam;
465 } NPEvent;
466 #elif defined(XP_OS2)
467 typedef struct _NPEvent
468 {
469  uint32_t event;
470  uint32_t wParam;
471  uint32_t lParam;
472 } NPEvent;
473 #elif defined (XP_UNIX) && defined(MOZ_X11)
474 typedef XEvent NPEvent;
475 #else
476 typedef void* NPEvent;
477 #endif /* XP_MACOSX */
478 
479 #ifdef XP_MACOSX
480 
481 typedef void* NPRegion;
482 #ifndef NP_NO_QUICKDRAW
483 typedef RgnHandle NPQDRegion;
484 #endif
485 typedef CGPathRef NPCGRegion;
486 #elif defined(XP_WIN)
487 typedef HRGN NPRegion;
488 #elif defined(XP_UNIX) && defined(MOZ_X11)
489 typedef Region NPRegion;
490 #else
491 typedef void *NPRegion;
492 #endif
493 
494 #ifdef XP_MACOSX
495 typedef struct NP_Port
496 {
497  CGrafPtr port;
498  int32_t portx; /* position inside the topmost window */
499  int32_t porty;
500 } NP_Port;
501 
502 typedef struct NP_CGContext
503 {
504  CGContextRef context;
505  WindowRef window;
506 } NP_CGContext;
507 
508 /* Non-standard event types that can be passed to HandleEvent */
509 enum NPEventType {
510  NPEventType_GetFocusEvent = (osEvt + 16),
511  NPEventType_LoseFocusEvent,
512  NPEventType_AdjustCursorEvent,
513  NPEventType_MenuCommandEvent,
514  NPEventType_ClippingChangedEvent,
515  NPEventType_ScrollingBeginsEvent = 1000,
516  NPEventType_ScrollingEndsEvent
517 };
518 
519 #ifdef OBSOLETE
520 #define getFocusEvent (osEvt + 16)
521 #define loseFocusEvent (osEvt + 17)
522 #define adjustCursorEvent (osEvt + 18)
523 #endif
524 
525 #endif /* XP_MACOSX */
526 
527 /*
528  * Values for mode passed to NPP_New:
529  */
530 #define NP_EMBED 1
531 #define NP_FULL 2
532 
533 /*
534  * Values for stream type passed to NPP_NewStream:
535  */
536 #define NP_NORMAL 1
537 #define NP_SEEK 2
538 #define NP_ASFILE 3
539 #define NP_ASFILEONLY 4
540 
541 #define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
542 
543 #if !defined(__LP64__)
544 #if defined(XP_MAC) || defined(XP_MACOSX)
545 #pragma options align=reset
546 #endif
547 #endif /* __LP64__ */
548 
549 /*----------------------------------------------------------------------*/
550 /* Error and Reason Code definitions */
551 /*----------------------------------------------------------------------*/
552 
553 /*
554  * Values of type NPError:
555  */
556 #define NPERR_BASE 0
557 #define NPERR_NO_ERROR (NPERR_BASE + 0)
558 #define NPERR_GENERIC_ERROR (NPERR_BASE + 1)
559 #define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2)
560 #define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3)
561 #define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4)
562 #define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5)
563 #define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6)
564 #define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7)
565 #define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8)
566 #define NPERR_INVALID_PARAM (NPERR_BASE + 9)
567 #define NPERR_INVALID_URL (NPERR_BASE + 10)
568 #define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11)
569 #define NPERR_NO_DATA (NPERR_BASE + 12)
570 #define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13)
571 
572 /*
573  * Values of type NPReason:
574  */
575 #define NPRES_BASE 0
576 #define NPRES_DONE (NPRES_BASE + 0)
577 #define NPRES_NETWORK_ERR (NPRES_BASE + 1)
578 #define NPRES_USER_BREAK (NPRES_BASE + 2)
579 
580 /*
581  * Don't use these obsolete error codes any more.
582  */
583 #define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR
584 #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR
585 #define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK
586 
587 /*
588  * Version feature information
589  */
590 #define NPVERS_HAS_STREAMOUTPUT 8
591 #define NPVERS_HAS_NOTIFICATION 9
592 #define NPVERS_HAS_LIVECONNECT 9
593 #define NPVERS_68K_HAS_LIVECONNECT 11
594 #define NPVERS_HAS_WINDOWLESS 11
595 #define NPVERS_HAS_XPCONNECT_SCRIPTING 13
596 #define NPVERS_HAS_NPRUNTIME_SCRIPTING 14
597 #define NPVERS_HAS_FORM_VALUES 15
598 #define NPVERS_HAS_POPUPS_ENABLED_STATE 16
599 #define NPVERS_HAS_RESPONSE_HEADERS 17
600 #define NPVERS_HAS_NPOBJECT_ENUM 18
601 #define NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL 19
602 #define NPVERS_HAS_ALL_NETWORK_STREAMS 20
603 #define NPVERS_HAS_URL_AND_AUTH_INFO 21
604 
605 /*----------------------------------------------------------------------*/
606 /* Function Prototypes */
607 /*----------------------------------------------------------------------*/
608 
609 #if defined(__OS2__)
610 #define NP_LOADDS _System
611 #else
612 #define NP_LOADDS
613 #endif
614 
615 #ifdef __cplusplus
616 extern "C" {
617 #endif
618 
619 /* NPP_* functions are provided by the plugin and called by the navigator. */
620 
621 #ifdef XP_UNIX
622 char* NPP_GetMIMEDescription();
623 #endif
624 
625 NPError NP_LOADDS NPP_Initialize();
626 void NP_LOADDS NPP_Shutdown();
627 NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
628  uint16_t mode, int16_t argc, char* argn[],
629  char* argv[], NPSavedData* saved);
630 NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
631 NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
632 NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
633  NPStream* stream, NPBool seekable,
634  uint16_t* stype);
635 NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream,
636  NPReason reason);
637 int32_t NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
638 int32_t NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32_t offset,
639  int32_t len, void* buffer);
640 void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
641  const char* fname);
642 void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
643 int16_t NP_LOADDS NPP_HandleEvent(NPP instance, void* event);
644 void NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
645  NPReason reason, void* notifyData);
646 NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value);
647 NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value);
648 
649 /* NPN_* functions are provided by the navigator and called by the plugin. */
650 void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor,
651  int* netscape_major, int* netscape_minor);
652 NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url,
653  const char* target, void* notifyData);
654 NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url,
655  const char* target);
656 NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url,
657  const char* target, uint32_t len,
658  const char* buf, NPBool file,
659  void* notifyData);
660 NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url,
661  const char* target, uint32_t len,
662  const char* buf, NPBool file);
663 NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
664 NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type,
665  const char* target, NPStream** stream);
666 int32_t NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32_t len,
667  void* buffer);
668 NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream,
669  NPReason reason);
670 void NP_LOADDS NPN_Status(NPP instance, const char* message);
671 const char* NP_LOADDS NPN_UserAgent(NPP instance);
672 void* NP_LOADDS NPN_MemAlloc(uint32_t size);
673 void NP_LOADDS NPN_MemFree(void* ptr);
674 uint32_t NP_LOADDS NPN_MemFlush(uint32_t size);
675 void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages);
676 NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable,
677  void *value);
678 NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable,
679  void *value);
680 void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
681 void NP_LOADDS NPN_InvalidateRegion(NPP instance,
682  NPRegion invalidRegion);
683 void NP_LOADDS NPN_ForceRedraw(NPP instance);
684 void NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
685 void NP_LOADDS NPN_PopPopupsEnabledState(NPP instance);
686 void NP_LOADDS NPN_PluginThreadAsyncCall(NPP instance,
687  void (*func) (void *),
688  void *userData);
689 NPError NP_LOADDS NPN_GetValueForURL(NPP instance, NPNURLVariable variable,
690  const char *url, char **value,
691  uint32_t *len);
692 NPError NP_LOADDS NPN_SetValueForURL(NPP instance, NPNURLVariable variable,
693  const char *url, const char *value,
694  uint32_t len);
695 NPError NP_LOADDS NPN_GetAuthenticationInfo(NPP instance,
696  const char *protocol,
697  const char *host, int32_t port,
698  const char *scheme,
699  const char *realm,
700  char **username, uint32_t *ulen,
701  char **password,
702  uint32_t *plen);
703 
704 #ifdef __cplusplus
705 } /* end extern "C" */
706 #endif
707 
708 #endif /* RC_INVOKED */
709 #ifdef __OS2__
710 #pragma pack()
711 #endif
712 
713 #endif /* npapi_h_ */
Definition: npapi.h:189
Definition: npapi.h:197
Definition: npapi.h:148