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
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.
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 ***** */
45 /* BEGIN GOOGLE MODIFICATIONS */
47 #ifndef __native_client__
51 #ifdef __native_client__
53 #include <sys/types.h>
55 #include "base/basictypes.h"
56 #endif /* __native_client__ */
58 /* END GOOGLE MODIFICATIONS */
60 #if defined(__OS2__) || defined(OS2)
66 #if defined(_WIN32) && !defined(__SYMBIAN32__)
73 /* BEGIN GOOGLE MODIFICATIONS */
74 /* On Linux and Mac, be sure to set Mozilla-specific macros. */
83 /* END GOOGLE MODIFICATIONS */
85 #if defined(__SYMBIAN32__)
92 #if defined(__APPLE_CC__) && !defined(XP_UNIX)
98 #if defined(XP_MACOSX) && defined(__LP64__)
99 #define NP_NO_QUICKDRAW
103 #if defined(XP_MACOSX)
104 #include <ApplicationServices/ApplicationServices.h>
105 #include <OpenGL/OpenGL.h>
107 #include <Carbon/Carbon.h>
113 /* BEGIN GOOGLE MODIFICATIONS */
115 /* END GOOGLE MODIFICATIONS */
117 #include <X11/Xlib.h>
118 #include <X11/Xutil.h>
120 /* BEGIN GOOGLE MODIFICATIONS */
122 /* END GOOGLE MODIFICATIONS */
125 #if defined(XP_SYMBIAN)
130 /*----------------------------------------------------------------------*/
131 /* Plugin Version Constants */
132 /*----------------------------------------------------------------------*/
134 #define NP_VERSION_MAJOR 0
135 #define NP_VERSION_MINOR 27
138 /* The OS/2 version of Netscape uses RC_DATA to define the
139 mime types, file extensions, etc that are required.
140 Use a vertical bar to separate types, end types with \0.
141 FileVersion and ProductVersion are 32bit ints, all other
142 entries are strings that MUST be terminated with a \0.
146 RCDATA NP_INFO_ProductVersion { 1,0,0,1,}
148 RCDATA NP_INFO_MIMEType { "video/x-video|",
150 RCDATA NP_INFO_FileExtents { "avi|",
152 RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|",
153 "MMOS2 Flc/Fli player(*.flc)\0" }
155 RCDATA NP_INFO_FileVersion { 1,0,0,1 }
156 RCDATA NP_INFO_CompanyName { "Netscape Communications\0" }
157 RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0"
158 RCDATA NP_INFO_InternalName { "NPAVI32\0" )
159 RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0"
160 RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" }
161 RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" }
163 /* RC_DATA types for version info - required */
164 #define NP_INFO_ProductVersion 1
165 #define NP_INFO_MIMEType 2
166 #define NP_INFO_FileOpenName 3
167 #define NP_INFO_FileExtents 4
168 /* RC_DATA types for version info - used if found */
169 #define NP_INFO_FileDescription 5
170 #define NP_INFO_ProductName 6
171 /* RC_DATA types for version info - optional */
172 #define NP_INFO_CompanyName 7
173 #define NP_INFO_FileVersion 8
174 #define NP_INFO_InternalName 9
175 #define NP_INFO_LegalCopyright 10
176 #define NP_INFO_OriginalFilename 11
180 /*----------------------------------------------------------------------*/
181 /* Definition of Basic Types */
182 /*----------------------------------------------------------------------*/
184 typedef unsigned char NPBool
;
185 typedef int16_t NPError
;
186 typedef int16_t NPReason
;
187 typedef char* NPMIMEType
;
189 /*----------------------------------------------------------------------*/
190 /* Structures and definitions */
191 /*----------------------------------------------------------------------*/
193 #if !defined(__LP64__)
194 #if defined(XP_MACOSX)
195 #pragma options align=mac68k
197 #endif /* __LP64__ */
200 * NPP is a plug-in's opaque instance handle
204 void* pdata
; /* plug-in private data */
205 void* ndata
; /* netscape private data */
210 typedef struct _NPStream
212 void* pdata
; /* plug-in private data */
213 void* ndata
; /* netscape private data */
216 uint32_t lastmodified
;
218 const char* headers
; /* Response headers from host.
219 * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS.
220 * Used for HTTP only; NULL for non-HTTP.
221 * Available from NPP_NewStream onwards.
222 * Plugin should copy this data before storing it.
223 * Includes HTTP status line and all headers,
224 * preferably verbatim as received from server,
225 * headers formatted as in HTTP ("Header: Value"),
226 * and newlines (\n, NOT \r\n) separating lines.
227 * Terminated by \n\0 (NOT \n\n\0). */
230 typedef struct _NPByteRange
232 int32_t offset
; /* negative offset means from the end */
234 struct _NPByteRange
* next
;
237 typedef struct _NPSavedData
243 typedef struct _NPRect
251 typedef struct _NPSize
262 /* Return values for NPP_HandleEvent */
263 #define kNPEventNotHandled 0
264 #define kNPEventHandled 1
265 /* Exact meaning must be spec'd in event model. */
266 #define kNPEventStartIME 2
270 * Unix specific structures and definitions
274 * Callback Structures.
276 * These are used to pass additional platform specific information.
286 } NPAnyCallbackStruct
;
288 /* BEGIN GOOGLE MODIFICATIONS */
289 typedef struct _NPSetWindowCallbackStruct NPSetWindowCallbackStruct
;
290 /* END GOOGLE MODIFICATIONS */
296 } NPPrintCallbackStruct
;
300 #if defined(XP_MACOSX)
302 #ifndef NP_NO_QUICKDRAW
303 NPDrawingModelQuickDraw
= 0,
305 NPDrawingModelCoreGraphics
= 1,
306 NPDrawingModelOpenGL
= 2,
307 NPDrawingModelCoreAnimation
= 3,
308 NPDrawingModelInvalidatingCoreAnimation
= 4
313 NPEventModelCarbon
= 0,
315 NPEventModelCocoa
= 1
320 * The following masks are applied on certain platforms to NPNV and
321 * NPPV selectors that pass around pointers to COM interfaces. Newer
322 * compilers on some platforms may generate vtables that are not
323 * compatible with older compilers. To prevent older plugins from
324 * not understanding a new browser's ABI, these masks change the
325 * values of those selectors on those platforms. To remain backwards
326 * compatible with different versions of the browser, plugins can
327 * use these masks to dynamically determine and use the correct C++
328 * ABI that the browser is expecting. This does not apply to Windows
329 * as Microsoft's COM ABI will likely not change.
332 #define NP_ABI_GCC3_MASK 0x10000000
334 * gcc 3.x generated vtables on UNIX and OSX are incompatible with
335 * previous compilers.
337 #if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
338 #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
340 #define _NP_ABI_MIXIN_FOR_GCC3 0
343 #if defined(XP_MACOSX)
344 #define NP_ABI_MACHO_MASK 0x01000000
345 #define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK
347 #define _NP_ABI_MIXIN_FOR_MACHO 0
350 #define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO)
353 * List of variable names for which NPP_GetValue shall be implemented
356 NPPVpluginNameString
= 1,
357 NPPVpluginDescriptionString
,
358 NPPVpluginWindowBool
,
359 NPPVpluginTransparentBool
,
361 NPPVpluginWindowSize
,
362 NPPVpluginTimerInterval
,
363 NPPVpluginScriptableInstance
= (10 | NP_ABI_MASK
),
364 NPPVpluginScriptableIID
= 11,
365 NPPVjavascriptPushCallerBool
= 12,
366 NPPVpluginKeepLibraryInMemory
= 13,
367 NPPVpluginNeedsXEmbed
= 14,
369 /* Get the NPObject for scripting the plugin. Introduced in NPAPI minor version 14.
371 NPPVpluginScriptableNPObject
= 15,
373 /* Get the plugin value (as \0-terminated UTF-8 string data) for
374 * form submission if the plugin is part of a form. Use
375 * NPN_MemAlloc() to allocate memory for the string data. Introduced
376 * in NPAPI minor version 15.
380 NPPVpluginUrlRequestsDisplayedBool
= 17,
382 /* Checks if the plugin is interested in receiving the http body of
383 * all http requests (including failed ones, http status != 200).
385 NPPVpluginWantsAllNetworkStreams
= 18,
387 /* Browsers can retrieve a native ATK accessibility plug ID via this variable. */
388 NPPVpluginNativeAccessibleAtkPlugId
= 19,
390 /* Checks to see if the plug-in would like the browser to load the "src" attribute. */
391 NPPVpluginCancelSrcStream
= 20,
393 NPPVsupportsAdvancedKeyHandling
= 21,
395 NPPVpluginUsesDOMForCursorBool
= 22
397 #if defined(XP_MACOSX)
398 /* Used for negotiating drawing models */
399 , NPPVpluginDrawingModel
= 1000
400 /* Used for negotiating event models */
401 , NPPVpluginEventModel
= 1001
402 /* In the NPDrawingModelCoreAnimation drawing model, the browser asks the plug-in for a Core Animation layer. */
403 , NPPVpluginCoreAnimationLayer
= 1003
406 #if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6))
407 , NPPVpluginWindowlessLocalBool
= 2002
412 * List of variable names for which NPN_GetValue should be implemented.
418 NPNVjavascriptEnabledBool
,
422 NPNVserviceManager
= (10 | NP_ABI_MASK
),
423 NPNVDOMElement
= (11 | NP_ABI_MASK
),
424 NPNVDOMWindow
= (12 | NP_ABI_MASK
),
425 NPNVToolkit
= (13 | NP_ABI_MASK
),
426 NPNVSupportsXEmbedBool
= 14,
428 /* Get the NPObject wrapper for the browser window. */
429 NPNVWindowNPObject
= 15,
431 /* Get the NPObject wrapper for the plugins DOM element. */
432 NPNVPluginElementNPObject
= 16,
434 NPNVSupportsWindowless
= 17,
436 NPNVprivateModeBool
= 18,
438 NPNVsupportsAdvancedKeyHandling
= 21,
440 NPNVdocumentOrigin
= 22
442 #if defined(XP_MACOSX)
443 /* Used for negotiating drawing models */
444 , NPNVpluginDrawingModel
= 1000
445 #ifndef NP_NO_QUICKDRAW
446 , NPNVsupportsQuickDrawBool
= 2000
448 , NPNVsupportsCoreGraphicsBool
= 2001
449 , NPNVsupportsOpenGLBool
= 2002
450 , NPNVsupportsCoreAnimationBool
= 2003
451 , NPNVsupportsInvalidatingCoreAnimationBool
= 2004
453 , NPNVsupportsCarbonBool
= 3000 /* TRUE if the browser supports the Carbon event model */
455 , NPNVsupportsCocoaBool
= 3001 /* TRUE if the browser supports the Cocoa event model */
456 , NPNVsupportsUpdatedCocoaTextInputBool
= 3002 /* TRUE if the browser supports the updated
457 Cocoa text input specification. */
458 , NPNVsupportsCompositingCoreAnimationPluginsBool
= 74656 /* TRUE if the browser supports
459 CA model compositing */
461 #if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6))
462 , NPNVSupportsWindowlessLocal
= 2002
472 * The type of Toolkit the widgets use
480 * The type of a NPWindow - it specifies the type of the data structure
481 * returned in the window field.
484 NPWindowTypeWindow
= 1,
488 typedef struct _NPWindow
490 void* window
; /* Platform specific window handle */
491 /* OS/2: x - Position of bottom left corner */
492 /* OS/2: y - relative to visible netscape window */
493 int32_t x
; /* Position of top left corner relative */
494 int32_t y
; /* to a netscape page. */
495 uint32_t width
; /* Maximum window size */
497 NPRect clipRect
; /* Clipping rectangle in port coordinates */
498 #if (defined(XP_UNIX) || defined(XP_SYMBIAN)) && !defined(XP_MACOSX)
499 void * ws_info
; /* Platform-dependent additional data */
501 NPWindowType type
; /* Is this a window or a drawable? */
504 typedef struct _NPImageExpose
506 char* data
; /* image pointer */
507 int32_t stride
; /* Stride of data image pointer */
508 int32_t depth
; /* Depth of image pointer */
509 int32_t x
; /* Expose x */
510 int32_t y
; /* Expose y */
511 uint32_t width
; /* Expose width */
512 uint32_t height
; /* Expose height */
513 NPSize dataSize
; /* Data buffer size */
514 float translateX
; /* translate X matrix value */
515 float translateY
; /* translate Y matrix value */
516 float scaleX
; /* scale X matrix value */
517 float scaleY
; /* scale Y matrix value */
520 typedef struct _NPFullPrint
522 NPBool pluginPrinted
;/* Set TRUE if plugin handled fullscreen printing */
523 NPBool printOne
; /* TRUE if plugin should print one copy to default
525 void* platformPrint
; /* Platform-specific printing info */
528 typedef struct _NPEmbedPrint
531 void* platformPrint
; /* Platform-specific printing info */
534 typedef struct _NPPrint
536 uint16_t mode
; /* NP_FULL or NP_EMBED */
539 NPFullPrint fullPrint
; /* if mode is NP_FULL */
540 NPEmbedPrint embedPrint
; /* if mode is NP_EMBED */
544 #if defined(XP_MACOSX)
546 typedef EventRecord NPEvent
;
548 #elif defined(XP_SYMBIAN)
549 typedef QEvent NPEvent
;
550 #elif defined(XP_WIN)
551 typedef struct _NPEvent
557 #elif defined(XP_OS2)
558 typedef struct _NPEvent
564 #elif defined(XP_UNIX) && defined(MOZ_X11)
565 /* BEGIN GOOGLE MODIFICATIONS */
566 typedef union _XEvent XEvent
;
567 /* END GOOGLE MODIFICATIONS */
568 typedef XEvent NPEvent
;
570 typedef void* NPEvent
;
573 #if defined(XP_MACOSX)
574 typedef void* NPRegion
;
575 #ifndef NP_NO_QUICKDRAW
576 typedef RgnHandle NPQDRegion
;
578 typedef CGPathRef NPCGRegion
;
579 #elif defined(XP_WIN)
580 typedef HRGN NPRegion
;
581 #elif defined(XP_UNIX) && defined(MOZ_X11)
582 /* BEGIN GOOGLE MODIFICATIONS */
583 typedef struct _XRegion
*Region
;
584 /* END GOOGLE MODIFICATIONS */
585 typedef Region NPRegion
;
586 #elif defined(XP_SYMBIAN)
587 typedef QRegion
* NPRegion
;
589 typedef void *NPRegion
;
592 typedef struct _NPNSString NPNSString
;
593 typedef struct _NPNSWindow NPNSWindow
;
594 typedef struct _NPNSMenu NPNSMenu
;
596 #if defined(XP_MACOSX)
597 typedef NPNSMenu NPMenu
;
599 typedef void *NPMenu
;
603 NPCoordinateSpacePlugin
= 1,
604 NPCoordinateSpaceWindow
,
605 NPCoordinateSpaceFlippedWindow
,
606 NPCoordinateSpaceScreen
,
607 NPCoordinateSpaceFlippedScreen
610 #if defined(XP_MACOSX)
612 #ifndef NP_NO_QUICKDRAW
613 typedef struct NP_Port
616 int32_t portx
; /* position inside the topmost window */
619 #endif /* NP_NO_QUICKDRAW */
622 * NP_CGContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelCoreGraphics
623 * as its drawing model.
626 typedef struct NP_CGContext
628 CGContextRef context
;
629 void *window
; /* A WindowRef under the Carbon event model. */
633 * NP_GLContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelOpenGL as its
637 typedef struct NP_GLContext
639 CGLContextObj context
;
643 void *window
; /* Can be either an NSWindow or a WindowRef depending on the event model */
648 NPCocoaEventDrawRect
= 1,
649 NPCocoaEventMouseDown
,
651 NPCocoaEventMouseMoved
,
652 NPCocoaEventMouseEntered
,
653 NPCocoaEventMouseExited
,
654 NPCocoaEventMouseDragged
,
657 NPCocoaEventFlagsChanged
,
658 NPCocoaEventFocusChanged
,
659 NPCocoaEventWindowFocusChanged
,
660 NPCocoaEventScrollWheel
,
661 NPCocoaEventTextInput
664 typedef struct _NPCocoaEvent
{
665 NPCocoaEventType type
;
669 uint32_t modifierFlags
;
672 int32_t buttonNumber
;
679 uint32_t modifierFlags
;
680 NPNSString
*characters
;
681 NPNSString
*charactersIgnoringModifiers
;
686 CGContextRef context
;
702 /* Non-standard event types that can be passed to HandleEvent */
704 NPEventType_GetFocusEvent
= (osEvt
+ 16),
705 NPEventType_LoseFocusEvent
,
706 NPEventType_AdjustCursorEvent
,
707 NPEventType_MenuCommandEvent
,
708 NPEventType_ClippingChangedEvent
,
709 NPEventType_ScrollingBeginsEvent
= 1000,
710 NPEventType_ScrollingEndsEvent
712 #endif /* NP_NO_CARBON */
714 #endif /* XP_MACOSX */
717 * Values for mode passed to NPP_New:
723 * Values for stream type passed to NPP_NewStream:
728 #define NP_ASFILEONLY 4
730 #define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
733 * Flags for NPP_ClearSiteData.
735 #define NP_CLEAR_ALL 0
736 #define NP_CLEAR_CACHE (1 << 0)
738 #if !defined(__LP64__)
739 #if defined(XP_MACOSX)
740 #pragma options align=reset
742 #endif /* __LP64__ */
744 /*----------------------------------------------------------------------*/
745 /* Error and Reason Code definitions */
746 /*----------------------------------------------------------------------*/
749 * Values of type NPError:
752 #define NPERR_NO_ERROR (NPERR_BASE + 0)
753 #define NPERR_GENERIC_ERROR (NPERR_BASE + 1)
754 #define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2)
755 #define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3)
756 #define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4)
757 #define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5)
758 #define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6)
759 #define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7)
760 #define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8)
761 #define NPERR_INVALID_PARAM (NPERR_BASE + 9)
762 #define NPERR_INVALID_URL (NPERR_BASE + 10)
763 #define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11)
764 #define NPERR_NO_DATA (NPERR_BASE + 12)
765 #define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13)
766 #define NPERR_TIME_RANGE_NOT_SUPPORTED (NPERR_BASE + 14)
767 #define NPERR_MALFORMED_SITE (NPERR_BASE + 15)
770 * Values of type NPReason:
773 #define NPRES_DONE (NPRES_BASE + 0)
774 #define NPRES_NETWORK_ERR (NPRES_BASE + 1)
775 #define NPRES_USER_BREAK (NPRES_BASE + 2)
778 * Don't use these obsolete error codes any more.
780 #define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR
781 #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR
782 #define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK
785 * Version feature information
787 #define NPVERS_HAS_STREAMOUTPUT 8
788 #define NPVERS_HAS_NOTIFICATION 9
789 #define NPVERS_HAS_LIVECONNECT 9
790 #define NPVERS_68K_HAS_LIVECONNECT 11
791 #define NPVERS_HAS_WINDOWLESS 11
792 #define NPVERS_HAS_XPCONNECT_SCRIPTING 13
793 #define NPVERS_HAS_NPRUNTIME_SCRIPTING 14
794 #define NPVERS_HAS_FORM_VALUES 15
795 #define NPVERS_HAS_POPUPS_ENABLED_STATE 16
796 #define NPVERS_HAS_RESPONSE_HEADERS 17
797 #define NPVERS_HAS_NPOBJECT_ENUM 18
798 #define NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL 19
799 #define NPVERS_HAS_ALL_NETWORK_STREAMS 20
800 #define NPVERS_HAS_URL_AND_AUTH_INFO 21
801 #define NPVERS_HAS_PRIVATE_MODE 22
802 #define NPVERS_MACOSX_HAS_COCOA_EVENTS 23
803 #define NPVERS_HAS_ADVANCED_KEY_HANDLING 25
804 #define NPVERS_HAS_URL_REDIRECT_HANDLING 26
805 #define NPVERS_HAS_CLEAR_SITE_DATA 27
807 /*----------------------------------------------------------------------*/
808 /* Function Prototypes */
809 /*----------------------------------------------------------------------*/
812 #define NP_LOADDS _System
821 /* NPP_* functions are provided by the plugin and called by the navigator. */
824 const char* NPP_GetMIMEDescription(void);
827 NPError NP_LOADDS
NPP_New(NPMIMEType pluginType
, NPP instance
,
828 uint16_t mode
, int16_t argc
, char* argn
[],
829 char* argv
[], NPSavedData
* saved
);
830 NPError NP_LOADDS
NPP_Destroy(NPP instance
, NPSavedData
** save
);
831 NPError NP_LOADDS
NPP_SetWindow(NPP instance
, NPWindow
* window
);
832 NPError NP_LOADDS
NPP_NewStream(NPP instance
, NPMIMEType type
,
833 NPStream
* stream
, NPBool seekable
,
835 NPError NP_LOADDS
NPP_DestroyStream(NPP instance
, NPStream
* stream
,
837 int32_t NP_LOADDS
NPP_WriteReady(NPP instance
, NPStream
* stream
);
838 int32_t NP_LOADDS
NPP_Write(NPP instance
, NPStream
* stream
, int32_t offset
,
839 int32_t len
, void* buffer
);
840 void NP_LOADDS
NPP_StreamAsFile(NPP instance
, NPStream
* stream
,
842 void NP_LOADDS
NPP_Print(NPP instance
, NPPrint
* platformPrint
);
843 int16_t NP_LOADDS
NPP_HandleEvent(NPP instance
, void* event
);
844 void NP_LOADDS
NPP_URLNotify(NPP instance
, const char* url
,
845 NPReason reason
, void* notifyData
);
846 NPError NP_LOADDS
NPP_GetValue(NPP instance
, NPPVariable variable
, void *value
);
847 NPError NP_LOADDS
NPP_SetValue(NPP instance
, NPNVariable variable
, void *value
);
848 NPBool NP_LOADDS
NPP_GotFocus(NPP instance
, NPFocusDirection direction
);
849 void NP_LOADDS
NPP_LostFocus(NPP instance
);
850 void NP_LOADDS
NPP_URLRedirectNotify(NPP instance
, const char* url
, int32_t status
, void* notifyData
);
851 NPError NP_LOADDS
NPP_ClearSiteData(const char* site
, uint64_t flags
, uint64_t maxAge
);
852 char** NP_LOADDS
NPP_GetSitesWithData(void);
854 /* NPN_* functions are provided by the navigator and called by the plugin. */
855 void NP_LOADDS
NPN_Version(int* plugin_major
, int* plugin_minor
,
856 int* netscape_major
, int* netscape_minor
);
857 NPError NP_LOADDS
NPN_GetURLNotify(NPP instance
, const char* url
,
858 const char* target
, void* notifyData
);
859 NPError NP_LOADDS
NPN_GetURL(NPP instance
, const char* url
,
861 NPError NP_LOADDS
NPN_PostURLNotify(NPP instance
, const char* url
,
862 const char* target
, uint32_t len
,
863 const char* buf
, NPBool file
,
865 NPError NP_LOADDS
NPN_PostURL(NPP instance
, const char* url
,
866 const char* target
, uint32_t len
,
867 const char* buf
, NPBool file
);
868 NPError NP_LOADDS
NPN_RequestRead(NPStream
* stream
, NPByteRange
* rangeList
);
869 NPError NP_LOADDS
NPN_NewStream(NPP instance
, NPMIMEType type
,
870 const char* target
, NPStream
** stream
);
871 int32_t NP_LOADDS
NPN_Write(NPP instance
, NPStream
* stream
, int32_t len
,
873 NPError NP_LOADDS
NPN_DestroyStream(NPP instance
, NPStream
* stream
,
875 void NP_LOADDS
NPN_Status(NPP instance
, const char* message
);
876 const char* NP_LOADDS
NPN_UserAgent(NPP instance
);
877 void* NP_LOADDS
NPN_MemAlloc(uint32_t size
);
878 void NP_LOADDS
NPN_MemFree(void* ptr
);
879 uint32_t NP_LOADDS
NPN_MemFlush(uint32_t size
);
880 void NP_LOADDS
NPN_ReloadPlugins(NPBool reloadPages
);
881 NPError NP_LOADDS
NPN_GetValue(NPP instance
, NPNVariable variable
,
883 NPError NP_LOADDS
NPN_SetValue(NPP instance
, NPPVariable variable
,
885 void NP_LOADDS
NPN_InvalidateRect(NPP instance
, NPRect
*invalidRect
);
886 void NP_LOADDS
NPN_InvalidateRegion(NPP instance
,
887 NPRegion invalidRegion
);
888 void NP_LOADDS
NPN_ForceRedraw(NPP instance
);
889 void NP_LOADDS
NPN_PushPopupsEnabledState(NPP instance
, NPBool enabled
);
890 void NP_LOADDS
NPN_PopPopupsEnabledState(NPP instance
);
891 void NP_LOADDS
NPN_PluginThreadAsyncCall(NPP instance
,
892 void (*func
) (void *),
894 NPError NP_LOADDS
NPN_GetValueForURL(NPP instance
, NPNURLVariable variable
,
895 const char *url
, char **value
,
897 NPError NP_LOADDS
NPN_SetValueForURL(NPP instance
, NPNURLVariable variable
,
898 const char *url
, const char *value
,
900 NPError NP_LOADDS
NPN_GetAuthenticationInfo(NPP instance
,
901 const char *protocol
,
902 const char *host
, int32_t port
,
905 char **username
, uint32_t *ulen
,
908 uint32_t NP_LOADDS
NPN_ScheduleTimer(NPP instance
, uint32_t interval
, NPBool repeat
, void (*timerFunc
)(NPP npp
, uint32_t timerID
));
909 void NP_LOADDS
NPN_UnscheduleTimer(NPP instance
, uint32_t timerID
);
910 NPError NP_LOADDS
NPN_PopUpContextMenu(NPP instance
, NPMenu
* menu
);
911 NPBool NP_LOADDS
NPN_ConvertPoint(NPP instance
, double sourceX
, double sourceY
, NPCoordinateSpace sourceSpace
, double *destX
, double *destY
, NPCoordinateSpace destSpace
);
912 NPBool NP_LOADDS
NPN_HandleEvent(NPP instance
, void *event
, NPBool handled
);
913 NPBool NP_LOADDS
NPN_UnfocusInstance(NPP instance
, NPFocusDirection direction
);
914 void NP_LOADDS
NPN_URLRedirectResponse(NPP instance
, void* notifyData
, NPBool allow
);
917 } /* end extern "C" */
920 #endif /* RC_INVOKED */
925 #endif /* npapi_h_ */