47#if defined (__OS2__) || defined (OS2)
62#define NP_NO_QUICKDRAW
64#include <Carbon/Carbon.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
130typedef unsigned char NPBool;
131typedef int16_t NPError;
132typedef int16_t NPReason;
133typedef char* NPMIMEType;
139#if !defined(__LP64__)
140#if defined(XP_MAC) || defined(XP_MACOSX)
141#pragma options align=mac68k
162 uint32_t lastmodified;
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;
458typedef EventRecord NPEvent;
460typedef struct _NPEvent
467typedef struct _NPEvent
473#elif defined (XP_UNIX) && defined(MOZ_X11)
474typedef XEvent NPEvent;
476typedef void* NPEvent;
481typedef void* NPRegion;
482#ifndef NP_NO_QUICKDRAW
483typedef RgnHandle NPQDRegion;
485typedef CGPathRef NPCGRegion;
487typedef HRGN NPRegion;
488#elif defined(XP_UNIX) && defined(MOZ_X11)
489typedef Region NPRegion;
491typedef void *NPRegion;
495typedef struct NP_Port
502typedef 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
622char* NPP_GetMIMEDescription();
625NPError NP_LOADDS NPP_Initialize();
626void NP_LOADDS NPP_Shutdown();
627NPError NP_LOADDS NPP_New(NPMIMEType pluginType,
NPP instance,
628 uint16_t mode, int16_t argc,
char* argn[],
631NPError NP_LOADDS NPP_SetWindow(
NPP instance,
NPWindow* window);
632NPError NP_LOADDS NPP_NewStream(
NPP instance, NPMIMEType type,
635NPError NP_LOADDS NPP_DestroyStream(
NPP instance,
NPStream* stream,
637int32_t NP_LOADDS NPP_WriteReady(
NPP instance,
NPStream* stream);
638int32_t NP_LOADDS NPP_Write(
NPP instance,
NPStream* stream, int32_t offset,
639 int32_t len,
void* buffer);
640void NP_LOADDS NPP_StreamAsFile(
NPP instance,
NPStream* stream,
642void NP_LOADDS NPP_Print(
NPP instance,
NPPrint* platformPrint);
643int16_t NP_LOADDS NPP_HandleEvent(
NPP instance,
void* event);
644void NP_LOADDS NPP_URLNotify(
NPP instance,
const char* url,
645 NPReason reason,
void* notifyData);
646NPError NP_LOADDS NPP_GetValue(
NPP instance, NPPVariable variable,
void *value);
647NPError NP_LOADDS NPP_SetValue(
NPP instance, NPNVariable variable,
void *value);
650void NP_LOADDS NPN_Version(
int* plugin_major,
int* plugin_minor,
651 int* netscape_major,
int* netscape_minor);
652NPError NP_LOADDS NPN_GetURLNotify(
NPP instance,
const char* url,
653 const char* target,
void* notifyData);
654NPError NP_LOADDS NPN_GetURL(
NPP instance,
const char* url,
656NPError NP_LOADDS NPN_PostURLNotify(
NPP instance,
const char* url,
657 const char* target, uint32_t len,
658 const char* buf, NPBool file,
660NPError NP_LOADDS NPN_PostURL(
NPP instance,
const char* url,
661 const char* target, uint32_t len,
662 const char* buf, NPBool file);
664NPError NP_LOADDS NPN_NewStream(
NPP instance, NPMIMEType type,
665 const char* target,
NPStream** stream);
666int32_t NP_LOADDS NPN_Write(
NPP instance,
NPStream* stream, int32_t len,
668NPError NP_LOADDS NPN_DestroyStream(
NPP instance,
NPStream* stream,
670void NP_LOADDS NPN_Status(
NPP instance,
const char* message);
671const char* NP_LOADDS NPN_UserAgent(
NPP instance);
672void* NP_LOADDS NPN_MemAlloc(uint32_t size);
673void NP_LOADDS NPN_MemFree(
void* ptr);
674uint32_t NP_LOADDS NPN_MemFlush(uint32_t size);
675void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages);
676NPError NP_LOADDS NPN_GetValue(
NPP instance, NPNVariable variable,
678NPError NP_LOADDS NPN_SetValue(
NPP instance, NPPVariable variable,
680void NP_LOADDS NPN_InvalidateRect(
NPP instance,
NPRect *invalidRect);
681void NP_LOADDS NPN_InvalidateRegion(
NPP instance,
682 NPRegion invalidRegion);
683void NP_LOADDS NPN_ForceRedraw(
NPP instance);
684void NP_LOADDS NPN_PushPopupsEnabledState(
NPP instance, NPBool enabled);
685void NP_LOADDS NPN_PopPopupsEnabledState(
NPP instance);
686void NP_LOADDS NPN_PluginThreadAsyncCall(
NPP instance,
687 void (*func) (
void *),
689NPError NP_LOADDS NPN_GetValueForURL(
NPP instance, NPNURLVariable variable,
690 const char *url,
char **value,
692NPError NP_LOADDS NPN_SetValueForURL(
NPP instance, NPNURLVariable variable,
693 const char *url,
const char *value,
695NPError NP_LOADDS NPN_GetAuthenticationInfo(
NPP instance,
696 const char *protocol,
697 const char *host, int32_t port,
700 char **username, uint32_t *ulen,