47 #if defined (__OS2__) || defined (OS2)
62 #define NP_NO_QUICKDRAW
64 #include <Carbon/Carbon.h>
71 # include <X11/Xlib.h>
72 # include <X11/Xutil.h>
80 #define NP_VERSION_MAJOR 0
81 #define NP_VERSION_MINOR 22
110 #define NP_INFO_ProductVersion 1
111 #define NP_INFO_MIMEType 2
112 #define NP_INFO_FileOpenName 3
113 #define NP_INFO_FileExtents 4
115 #define NP_INFO_FileDescription 5
116 #define NP_INFO_ProductName 6
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
130 typedef unsigned char NPBool;
131 typedef int16_t NPError;
132 typedef int16_t NPReason;
133 typedef char* NPMIMEType;
139 #if !defined(__LP64__)
140 #if defined(XP_MAC) || defined(XP_MACOSX)
141 #pragma options align=mac68k
162 uint32_t lastmodified;
221 } NPAnyCallbackStruct;
232 } NPSetWindowCallbackStruct;
238 } NPPrintCallbackStruct;
244 #ifndef NP_NO_QUICKDRAW
245 NPDrawingModelQuickDraw = 0,
247 NPDrawingModelCoreGraphics = 1
264 #define NP_ABI_GCC3_MASK 0x10000000
269 #if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
270 #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
272 #define _NP_ABI_MIXIN_FOR_GCC3 0
276 #define NP_ABI_MACHO_MASK 0x01000000
277 #define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK
279 #define _NP_ABI_MIXIN_FOR_MACHO 0
282 #define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO)
288 NPPVpluginNameString = 1,
289 NPPVpluginDescriptionString,
290 NPPVpluginWindowBool,
291 NPPVpluginTransparentBool,
293 NPPVpluginWindowSize,
294 NPPVpluginTimerInterval,
296 NPPVpluginScriptableInstance = (10 | NP_ABI_MASK),
297 NPPVpluginScriptableIID = 11,
300 NPPVjavascriptPushCallerBool = 12,
303 NPPVpluginKeepLibraryInMemory = 13,
304 NPPVpluginNeedsXEmbed = 14,
309 NPPVpluginScriptableNPObject = 15,
318 NPPVpluginUrlRequestsDisplayedBool = 17,
323 NPPVpluginWantsAllNetworkStreams = 18
327 , NPPVpluginDrawingModel = 1000
330 #
if (MOZ_PLATFORM_MAEMO == 5)
331 , NPPVpluginWindowlessLocalBool = 2002
342 NPNVjavascriptEnabledBool,
347 NPNVserviceManager = (10 | NP_ABI_MASK),
348 NPNVDOMElement = (11 | NP_ABI_MASK),
349 NPNVDOMWindow = (12 | NP_ABI_MASK),
350 NPNVToolkit = (13 | NP_ABI_MASK),
351 NPNVSupportsXEmbedBool = 14,
354 NPNVWindowNPObject = 15,
357 NPNVPluginElementNPObject = 16,
359 NPNVSupportsWindowless = 17,
361 NPNVprivateModeBool = 18
365 , NPNVpluginDrawingModel = 1000
366 #ifndef NP_NO_QUICKDRAW
367 , NPNVsupportsQuickDrawBool = 2000
369 , NPNVsupportsCoreGraphicsBool = 2001
372 #if (MOZ_PLATFORM_MAEMO == 5)
373 , NPNVSupportsWindowlessLocal = 2002
396 NPWindowTypeWindow = 1,
411 #if defined(XP_UNIX) && !defined(XP_MACOSX)
435 NPBool pluginPrinted;
458 typedef EventRecord NPEvent;
459 #elif defined(XP_WIN)
460 typedef struct _NPEvent
466 #elif defined(XP_OS2)
467 typedef struct _NPEvent
473 #elif defined (XP_UNIX) && defined(MOZ_X11)
474 typedef XEvent NPEvent;
476 typedef void* NPEvent;
481 typedef void* NPRegion;
482 #ifndef NP_NO_QUICKDRAW
483 typedef RgnHandle NPQDRegion;
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;
491 typedef void *NPRegion;
495 typedef struct NP_Port
502 typedef struct NP_CGContext
504 CGContextRef context;
510 NPEventType_GetFocusEvent = (osEvt + 16),
511 NPEventType_LoseFocusEvent,
512 NPEventType_AdjustCursorEvent,
513 NPEventType_MenuCommandEvent,
514 NPEventType_ClippingChangedEvent,
515 NPEventType_ScrollingBeginsEvent = 1000,
516 NPEventType_ScrollingEndsEvent
520 #define getFocusEvent (osEvt + 16)
521 #define loseFocusEvent (osEvt + 17)
522 #define adjustCursorEvent (osEvt + 18)
539 #define NP_ASFILEONLY 4
541 #define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
543 #if !defined(__LP64__)
544 #if defined(XP_MAC) || defined(XP_MACOSX)
545 #pragma options align=reset
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)
576 #define NPRES_DONE (NPRES_BASE + 0)
577 #define NPRES_NETWORK_ERR (NPRES_BASE + 1)
578 #define NPRES_USER_BREAK (NPRES_BASE + 2)
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
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
610 #define NP_LOADDS _System
622 char* NPP_GetMIMEDescription();
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[],
631 NPError NP_LOADDS NPP_SetWindow(
NPP instance,
NPWindow* window);
632 NPError NP_LOADDS NPP_NewStream(
NPP instance, NPMIMEType type,
635 NPError NP_LOADDS NPP_DestroyStream(
NPP instance,
NPStream* stream,
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,
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);
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,
656 NPError NP_LOADDS NPN_PostURLNotify(
NPP instance,
const char* url,
657 const char* target, uint32_t len,
658 const char* buf, NPBool file,
660 NPError NP_LOADDS NPN_PostURL(
NPP instance,
const char* url,
661 const char* target, uint32_t len,
662 const char* buf, NPBool file);
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,
668 NPError NP_LOADDS NPN_DestroyStream(
NPP instance,
NPStream* stream,
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,
678 NPError NP_LOADDS NPN_SetValue(
NPP instance, NPPVariable variable,
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 *),
689 NPError NP_LOADDS NPN_GetValueForURL(
NPP instance, NPNURLVariable variable,
690 const char *url,
char **value,
692 NPError NP_LOADDS NPN_SetValueForURL(
NPP instance, NPNURLVariable variable,
693 const char *url,
const char *value,
695 NPError NP_LOADDS NPN_GetAuthenticationInfo(
NPP instance,
696 const char *protocol,
697 const char *host, int32_t port,
700 char **username, uint32_t *ulen,