47 #if defined(__OS2__) || defined(OS2) 53 #if defined(_WIN32) && !defined(__SYMBIAN32__) 60 #if defined(__SYMBIAN32__) 67 #if defined(__APPLE_CC__) && !defined(XP_UNIX) 73 #if defined(XP_MACOSX) 74 #if !defined(NP_NO_OPENGL) 75 #define NP_NO_OPENGL 1 78 #define NP_NO_QUICKDRAW 83 #if defined(XP_MACOSX) 84 #include <ApplicationServices/ApplicationServices.h> 86 #include <OpenGL/OpenGL.h> 89 #include <Carbon/Carbon.h> 97 #include <X11/Xutil.h> 101 #if defined(XP_SYMBIAN) 110 #define NP_VERSION_MAJOR 0 111 #define NP_VERSION_MINOR 27 140 #define NP_INFO_ProductVersion 1 141 #define NP_INFO_MIMEType 2 142 #define NP_INFO_FileOpenName 3 143 #define NP_INFO_FileExtents 4 145 #define NP_INFO_FileDescription 5 146 #define NP_INFO_ProductName 6 148 #define NP_INFO_CompanyName 7 149 #define NP_INFO_FileVersion 8 150 #define NP_INFO_InternalName 9 151 #define NP_INFO_LegalCopyright 10 152 #define NP_INFO_OriginalFilename 11 160 typedef unsigned char NPBool;
161 typedef int16_t NPError;
162 typedef int16_t NPReason;
163 typedef char* NPMIMEType;
169 #if !defined(__LP64__) 170 #if defined(XP_MACOSX) 171 #pragma options align=mac68k 192 uint32_t lastmodified;
244 NPImageFormatBGRA32 = 0x1,
246 NPImageFormatBGRX32 = 0x2
253 NPImageFormat format;
266 #define kNPEventNotHandled 0 267 #define kNPEventHandled 1 269 #define kNPEventStartIME 2 289 } NPAnyCallbackStruct;
300 } NPSetWindowCallbackStruct;
306 } NPPrintCallbackStruct;
311 #if defined(XP_MACOSX) 312 #ifndef NP_NO_QUICKDRAW 313 NPDrawingModelQuickDraw = 0,
315 NPDrawingModelCoreGraphics = 1,
316 NPDrawingModelOpenGL = 2,
317 NPDrawingModelCoreAnimation = 3,
318 NPDrawingModelInvalidatingCoreAnimation = 4,
321 NPDrawingModelSyncWin = 5,
324 NPDrawingModelSyncX = 6,
326 NPDrawingModelAsyncBitmapSurface = 7
328 , NPDrawingModelAsyncWindowsDXGISurface = 8
335 NPEventModelCarbon = 0,
337 NPEventModelCocoa = 1
354 #define NP_ABI_GCC3_MASK 0x10000000 359 #if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) 360 #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK 362 #define _NP_ABI_MIXIN_FOR_GCC3 0 365 #if defined(XP_MACOSX) 366 #define NP_ABI_MACHO_MASK 0x01000000 367 #define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK 369 #define _NP_ABI_MIXIN_FOR_MACHO 0 372 #define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) 378 NPPVpluginNameString = 1,
379 NPPVpluginDescriptionString,
380 NPPVpluginWindowBool,
381 NPPVpluginTransparentBool,
383 NPPVpluginWindowSize,
384 NPPVpluginTimerInterval,
385 NPPVpluginScriptableInstance = (10 | NP_ABI_MASK),
386 NPPVpluginScriptableIID = 11,
387 NPPVjavascriptPushCallerBool = 12,
388 NPPVpluginKeepLibraryInMemory = 13,
389 NPPVpluginNeedsXEmbed = 14,
393 NPPVpluginScriptableNPObject = 15,
402 NPPVpluginUrlRequestsDisplayedBool = 17,
407 NPPVpluginWantsAllNetworkStreams = 18,
410 NPPVpluginNativeAccessibleAtkPlugId = 19,
413 NPPVpluginCancelSrcStream = 20,
415 NPPVsupportsAdvancedKeyHandling = 21,
417 NPPVpluginUsesDOMForCursorBool = 22,
420 NPPVpluginDrawingModel = 1000
421 #
if defined(XP_MACOSX)
423 , NPPVpluginEventModel = 1001
425 , NPPVpluginCoreAnimationLayer = 1003
428 #if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)) 429 , NPPVpluginWindowlessLocalBool = 2002
440 NPNVjavascriptEnabledBool,
444 NPNVserviceManager = (10 | NP_ABI_MASK),
445 NPNVDOMElement = (11 | NP_ABI_MASK),
446 NPNVDOMWindow = (12 | NP_ABI_MASK),
447 NPNVToolkit = (13 | NP_ABI_MASK),
448 NPNVSupportsXEmbedBool = 14,
451 NPNVWindowNPObject = 15,
454 NPNVPluginElementNPObject = 16,
456 NPNVSupportsWindowless = 17,
458 NPNVprivateModeBool = 18,
460 NPNVsupportsAdvancedKeyHandling = 21,
462 NPNVdocumentOrigin = 22,
464 NPNVpluginDrawingModel = 1000
465 #if defined(XP_MACOSX) 466 , NPNVcontentsScaleFactor = 1001
467 #ifndef NP_NO_QUICKDRAW 468 , NPNVsupportsQuickDrawBool = 2000
470 , NPNVsupportsCoreGraphicsBool = 2001
471 , NPNVsupportsOpenGLBool = 2002
472 , NPNVsupportsCoreAnimationBool = 2003
473 , NPNVsupportsInvalidatingCoreAnimationBool = 2004
475 , NPNVsupportsAsyncBitmapSurfaceBool = 2007
477 , NPNVsupportsAsyncWindowsDXGISurfaceBool = 2008
479 #if defined(XP_MACOSX) 481 , NPNVsupportsCarbonBool = 3000
483 , NPNVsupportsCocoaBool = 3001
484 , NPNVsupportsUpdatedCocoaTextInputBool = 3002
486 , NPNVsupportsCompositingCoreAnimationPluginsBool = 74656
489 #if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)) 490 , NPNVSupportsWindowlessLocal = 2002
512 NPWindowTypeWindow = 1,
526 #if (defined(XP_UNIX) || defined(XP_SYMBIAN)) && !defined(XP_MACOSX) 550 NPBool pluginPrinted;
572 #if defined(XP_MACOSX) 574 typedef EventRecord NPEvent;
576 #elif defined(XP_SYMBIAN) 577 typedef QEvent NPEvent;
578 #elif defined(XP_WIN) 579 typedef struct _NPEvent
585 #elif defined(XP_OS2) 586 typedef struct _NPEvent
592 #elif defined(XP_UNIX) && defined(MOZ_X11) 593 typedef XEvent NPEvent;
595 typedef void* NPEvent;
598 #if defined(XP_MACOSX) 599 typedef void* NPRegion;
600 #ifndef NP_NO_QUICKDRAW 601 typedef RgnHandle NPQDRegion;
603 typedef CGPathRef NPCGRegion;
604 #elif defined(XP_WIN) 605 typedef HRGN NPRegion;
606 #elif defined(XP_UNIX) && defined(MOZ_X11) 607 typedef Region NPRegion;
608 #elif defined(XP_SYMBIAN) 609 typedef QRegion* NPRegion;
611 typedef void *NPRegion;
614 typedef struct _NPNSString NPNSString;
615 typedef struct _NPNSWindow NPNSWindow;
616 typedef struct _NPNSMenu NPNSMenu;
618 #if defined(XP_MACOSX) 619 typedef NPNSMenu NPMenu;
621 typedef void *NPMenu;
625 NPCoordinateSpacePlugin = 1,
626 NPCoordinateSpaceWindow,
627 NPCoordinateSpaceFlippedWindow,
628 NPCoordinateSpaceScreen,
629 NPCoordinateSpaceFlippedScreen
632 #if defined(XP_MACOSX) 634 #ifndef NP_NO_QUICKDRAW 635 typedef struct NP_Port
648 typedef struct NP_CGContext
650 CGContextRef context;
660 typedef struct NP_GLContext
662 CGLContextObj context;
672 NPCocoaEventDrawRect = 1,
673 NPCocoaEventMouseDown,
675 NPCocoaEventMouseMoved,
676 NPCocoaEventMouseEntered,
677 NPCocoaEventMouseExited,
678 NPCocoaEventMouseDragged,
681 NPCocoaEventFlagsChanged,
682 NPCocoaEventFocusChanged,
683 NPCocoaEventWindowFocusChanged,
684 NPCocoaEventScrollWheel,
685 NPCocoaEventTextInput
688 typedef struct _NPCocoaEvent {
689 NPCocoaEventType type;
693 uint32_t modifierFlags;
696 int32_t buttonNumber;
703 uint32_t modifierFlags;
704 NPNSString *characters;
705 NPNSString *charactersIgnoringModifiers;
710 CGContextRef context;
728 NPEventType_GetFocusEvent = (osEvt + 16),
729 NPEventType_LoseFocusEvent,
730 NPEventType_AdjustCursorEvent,
731 NPEventType_MenuCommandEvent,
732 NPEventType_ClippingChangedEvent,
733 NPEventType_ScrollingBeginsEvent = 1000,
734 NPEventType_ScrollingEndsEvent
752 #define NP_ASFILEONLY 4 754 #define NP_MAXREADY (((unsigned)(~0)<<1)>>1) 759 #define NP_CLEAR_ALL 0 760 #define NP_CLEAR_CACHE (1 << 0) 762 #if !defined(__LP64__) 763 #if defined(XP_MACOSX) 764 #pragma options align=reset 776 #define NPERR_NO_ERROR (NPERR_BASE + 0) 777 #define NPERR_GENERIC_ERROR (NPERR_BASE + 1) 778 #define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) 779 #define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) 780 #define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) 781 #define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) 782 #define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) 783 #define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) 784 #define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) 785 #define NPERR_INVALID_PARAM (NPERR_BASE + 9) 786 #define NPERR_INVALID_URL (NPERR_BASE + 10) 787 #define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) 788 #define NPERR_NO_DATA (NPERR_BASE + 12) 789 #define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) 790 #define NPERR_TIME_RANGE_NOT_SUPPORTED (NPERR_BASE + 14) 791 #define NPERR_MALFORMED_SITE (NPERR_BASE + 15) 797 #define NPRES_DONE (NPRES_BASE + 0) 798 #define NPRES_NETWORK_ERR (NPRES_BASE + 1) 799 #define NPRES_USER_BREAK (NPRES_BASE + 2) 804 #define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR 805 #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR 806 #define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK 811 #define NPVERS_HAS_STREAMOUTPUT 8 812 #define NPVERS_HAS_NOTIFICATION 9 813 #define NPVERS_HAS_LIVECONNECT 9 814 #define NPVERS_68K_HAS_LIVECONNECT 11 815 #define NPVERS_HAS_WINDOWLESS 11 816 #define NPVERS_HAS_XPCONNECT_SCRIPTING 13 817 #define NPVERS_HAS_NPRUNTIME_SCRIPTING 14 818 #define NPVERS_HAS_FORM_VALUES 15 819 #define NPVERS_HAS_POPUPS_ENABLED_STATE 16 820 #define NPVERS_HAS_RESPONSE_HEADERS 17 821 #define NPVERS_HAS_NPOBJECT_ENUM 18 822 #define NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL 19 823 #define NPVERS_HAS_ALL_NETWORK_STREAMS 20 824 #define NPVERS_HAS_URL_AND_AUTH_INFO 21 825 #define NPVERS_HAS_PRIVATE_MODE 22 826 #define NPVERS_MACOSX_HAS_COCOA_EVENTS 23 827 #define NPVERS_HAS_ADVANCED_KEY_HANDLING 25 828 #define NPVERS_HAS_URL_REDIRECT_HANDLING 26 829 #define NPVERS_HAS_CLEAR_SITE_DATA 27 836 #define NP_LOADDS _System 848 const char* NPP_GetMIMEDescription(
void);
851 NPError NP_LOADDS
NPP_New(NPMIMEType pluginType,
NPP instance,
852 uint16_t mode, int16_t argc,
char* argn[],
863 int32_t len,
void* buffer);
869 NPReason reason,
void* notifyData);
870 NPError NP_LOADDS
NPP_GetValue(
NPP instance, NPPVariable variable,
void *value);
871 NPError NP_LOADDS
NPP_SetValue(
NPP instance, NPNVariable variable,
void *value);
872 NPBool NP_LOADDS NPP_GotFocus(
NPP instance, NPFocusDirection direction);
873 void NP_LOADDS NPP_LostFocus(
NPP instance);
874 void NP_LOADDS NPP_URLRedirectNotify(
NPP instance,
const char* url, int32_t status,
void* notifyData);
875 NPError NP_LOADDS NPP_ClearSiteData(
const char* site, uint64_t flags, uint64_t maxAge);
876 char** NP_LOADDS NPP_GetSitesWithData(
void);
877 void NP_LOADDS NPP_DidComposite(
NPP instance);
880 void NP_LOADDS NPN_Version(
int* plugin_major,
int* plugin_minor,
881 int* netscape_major,
int* netscape_minor);
882 NPError NP_LOADDS NPN_GetURLNotify(
NPP instance,
const char* url,
883 const char* target,
void* notifyData);
884 NPError NP_LOADDS NPN_GetURL(
NPP instance,
const char* url,
886 NPError NP_LOADDS NPN_PostURLNotify(
NPP instance,
const char* url,
887 const char* target, uint32_t len,
888 const char* buf, NPBool file,
890 NPError NP_LOADDS NPN_PostURL(
NPP instance,
const char* url,
891 const char* target, uint32_t len,
892 const char* buf, NPBool file);
894 NPError NP_LOADDS NPN_NewStream(
NPP instance, NPMIMEType type,
895 const char* target,
NPStream** stream);
896 int32_t NP_LOADDS NPN_Write(
NPP instance,
NPStream* stream, int32_t len,
898 NPError NP_LOADDS NPN_DestroyStream(
NPP instance,
NPStream* stream,
900 void NP_LOADDS NPN_Status(
NPP instance,
const char* message);
901 const char* NP_LOADDS NPN_UserAgent(
NPP instance);
902 void* NP_LOADDS NPN_MemAlloc(uint32_t size);
903 void NP_LOADDS NPN_MemFree(
void* ptr);
904 uint32_t NP_LOADDS NPN_MemFlush(uint32_t size);
905 void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages);
906 NPError NP_LOADDS NPN_GetValue(
NPP instance, NPNVariable variable,
908 NPError NP_LOADDS NPN_SetValue(
NPP instance, NPPVariable variable,
910 void NP_LOADDS NPN_InvalidateRect(
NPP instance,
NPRect *invalidRect);
911 void NP_LOADDS NPN_InvalidateRegion(
NPP instance,
912 NPRegion invalidRegion);
913 void NP_LOADDS NPN_ForceRedraw(
NPP instance);
914 void NP_LOADDS NPN_PushPopupsEnabledState(
NPP instance, NPBool enabled);
915 void NP_LOADDS NPN_PopPopupsEnabledState(
NPP instance);
916 void NP_LOADDS NPN_PluginThreadAsyncCall(
NPP instance,
917 void (*func) (
void *),
919 NPError NP_LOADDS NPN_GetValueForURL(
NPP instance, NPNURLVariable variable,
920 const char *url,
char **value,
922 NPError NP_LOADDS NPN_SetValueForURL(
NPP instance, NPNURLVariable variable,
923 const char *url,
const char *value,
925 NPError NP_LOADDS NPN_GetAuthenticationInfo(
NPP instance,
926 const char *protocol,
927 const char *host, int32_t port,
930 char **username, uint32_t *ulen,
933 uint32_t NP_LOADDS NPN_ScheduleTimer(
NPP instance, uint32_t interval, NPBool repeat,
void (*timerFunc)(
NPP npp, uint32_t timerID));
934 void NP_LOADDS NPN_UnscheduleTimer(
NPP instance, uint32_t timerID);
935 NPError NP_LOADDS NPN_PopUpContextMenu(
NPP instance, NPMenu* menu);
936 NPBool NP_LOADDS NPN_ConvertPoint(
NPP instance,
double sourceX,
double sourceY, NPCoordinateSpace sourceSpace,
double *destX,
double *destY, NPCoordinateSpace destSpace);
937 NPBool NP_LOADDS NPN_HandleEvent(
NPP instance,
void *event, NPBool handled);
938 NPBool NP_LOADDS NPN_UnfocusInstance(
NPP instance, NPFocusDirection direction);
939 void NP_LOADDS NPN_URLRedirectResponse(
NPP instance,
void* notifyData, NPBool allow);
940 NPError NP_LOADDS NPN_InitAsyncSurface(
NPP instance,
NPSize *size,
941 NPImageFormat format,
void *initData,
943 NPError NP_LOADDS NPN_FinalizeAsyncSurface(
NPP instance,
NPAsyncSurface *surface);
int32_t NPP_WriteReady(NPP instance, NPStream *stream)
URL file data ready.
Definition: plugin.c:607
int16_t NPP_HandleEvent(NPP instance, void *event)
Handle Event.
Definition: plugin.c:715
NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
Get Value.
Definition: plugin.c:810
void NPP_Print(NPP instance, NPPrint *platformPrint)
print.
Definition: plugin.c:704
NPError NPP_Destroy(NPP instance, NPSavedData **save)
Destroy plugin.
Definition: plugin.c:428
NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool seekable, uint16_t *stype)
new stream.
Definition: plugin.c:538
NPError NPP_DestroyStream(NPP instance, NPStream *stream, NPReason reason)
Destroy Stream.
Definition: plugin.c:579
NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved)
Creates a new instance of a plug-in.
Definition: plugin.c:292
NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
Set Value.
Definition: plugin.c:870
int32_t NPP_Write(NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buffer)
URL file data received.
Definition: plugin.c:624
void NPP_URLNotify(NPP instance, const char *URL, NPReason reason, void *notifyData)
URL Notify.
Definition: plugin.c:779
NPError NPP_SetWindow(NPP instance, NPWindow *window)
Set window.
Definition: plugin.c:495
void NPP_StreamAsFile(NPP instance, NPStream *stream, const char *fname)
Stream as file.
Definition: plugin.c:670