43#define NP_LOADDS _System
51typedef void (* NP_LOADDS NPP_InitializeProcPtr)();
52typedef void (* NP_LOADDS NPP_ShutdownProcPtr)();
53typedef NPError (* NP_LOADDS NPP_NewProcPtr)(NPMIMEType pluginType,
NPP instance, uint16_t mode, int16_t argc,
char* argn[],
char* argv[],
NPSavedData* saved);
54typedef NPError (* NP_LOADDS NPP_DestroyProcPtr)(
NPP instance,
NPSavedData** save);
55typedef NPError (* NP_LOADDS NPP_SetWindowProcPtr)(
NPP instance,
NPWindow* window);
56typedef NPError (* NP_LOADDS NPP_NewStreamProcPtr)(
NPP instance, NPMIMEType type,
NPStream* stream, NPBool seekable, uint16_t* stype);
57typedef NPError (* NP_LOADDS NPP_DestroyStreamProcPtr)(
NPP instance,
NPStream* stream, NPReason reason);
58typedef int32_t (* NP_LOADDS NPP_WriteReadyProcPtr)(
NPP instance,
NPStream* stream);
59typedef int32_t (* NP_LOADDS NPP_WriteProcPtr)(
NPP instance,
NPStream* stream, int32_t offset, int32_t len,
void* buffer);
60typedef void (* NP_LOADDS NPP_StreamAsFileProcPtr)(
NPP instance,
NPStream* stream,
const char* fname);
61typedef void (* NP_LOADDS NPP_PrintProcPtr)(
NPP instance,
NPPrint* platformPrint);
62typedef int16_t (* NP_LOADDS NPP_HandleEventProcPtr)(
NPP instance,
void* event);
63typedef void (* NP_LOADDS NPP_URLNotifyProcPtr)(
NPP instance,
const char* url, NPReason reason,
void* notifyData);
66typedef NPError (* NP_LOADDS NPP_GetValueProcPtr)(
NPP instance, NPPVariable variable,
void *ret_value);
67typedef NPError (* NP_LOADDS NPP_SetValueProcPtr)(
NPP instance, NPNVariable variable,
void *value);
69typedef NPError (*NPN_GetValueProcPtr)(
NPP instance, NPNVariable variable,
void *ret_value);
70typedef NPError (*NPN_SetValueProcPtr)(
NPP instance, NPPVariable variable,
void *value);
71typedef NPError (*NPN_GetURLNotifyProcPtr)(
NPP instance,
const char* url,
const char* window,
void* notifyData);
72typedef NPError (*NPN_PostURLNotifyProcPtr)(
NPP instance,
const char* url,
const char* window, uint32_t len,
const char* buf, NPBool file,
void* notifyData);
73typedef NPError (*NPN_GetURLProcPtr)(
NPP instance,
const char* url,
const char* window);
74typedef NPError (*NPN_PostURLProcPtr)(
NPP instance,
const char* url,
const char* window, uint32_t len,
const char* buf, NPBool file);
76typedef NPError (*NPN_NewStreamProcPtr)(
NPP instance, NPMIMEType type,
const char* window,
NPStream** stream);
77typedef int32_t (*NPN_WriteProcPtr)(
NPP instance,
NPStream* stream, int32_t len,
void* buffer);
78typedef NPError (*NPN_DestroyStreamProcPtr)(
NPP instance,
NPStream* stream, NPReason reason);
79typedef void (*NPN_StatusProcPtr)(
NPP instance,
const char* message);
82typedef const char* (*NPN_UserAgentProcPtr)(
NPP instance);
83typedef void* (*NPN_MemAllocProcPtr)(uint32_t size);
84typedef void (*NPN_MemFreeProcPtr)(
void* ptr);
85typedef uint32_t (*NPN_MemFlushProcPtr)(uint32_t size);
86typedef void (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages);
87typedef void* (*NPN_GetJavaEnvProcPtr)();
88typedef void* (*NPN_GetJavaPeerProcPtr)(
NPP instance);
89typedef void (*NPN_InvalidateRectProcPtr)(
NPP instance,
NPRect *rect);
90typedef void (*NPN_InvalidateRegionProcPtr)(
NPP instance, NPRegion region);
91typedef void (*NPN_ForceRedrawProcPtr)(
NPP instance);
92typedef NPIdentifier (*NPN_GetStringIdentifierProcPtr)(
const NPUTF8* name);
93typedef void (*NPN_GetStringIdentifiersProcPtr)(
const NPUTF8** names, int32_t nameCount, NPIdentifier* identifiers);
94typedef NPIdentifier (*NPN_GetIntIdentifierProcPtr)(int32_t intid);
95typedef bool (*NPN_IdentifierIsStringProcPtr)(NPIdentifier identifier);
96typedef NPUTF8* (*NPN_UTF8FromIdentifierProcPtr)(NPIdentifier identifier);
97typedef int32_t (*NPN_IntFromIdentifierProcPtr)(NPIdentifier identifier);
100typedef void (*NPN_ReleaseObjectProcPtr)(
NPObject *obj);
101typedef bool (*NPN_InvokeProcPtr)(
NPP npp,
NPObject* obj, NPIdentifier methodName,
const NPVariant *args, uint32_t argCount,
NPVariant *result);
104typedef bool (*NPN_GetPropertyProcPtr)(
NPP npp,
NPObject *obj, NPIdentifier propertyName,
NPVariant *result);
105typedef bool (*NPN_SetPropertyProcPtr)(
NPP npp,
NPObject *obj, NPIdentifier propertyName,
const NPVariant *value);
106typedef bool (*NPN_RemovePropertyProcPtr)(
NPP npp,
NPObject *obj, NPIdentifier propertyName);
107typedef bool (*NPN_HasPropertyProcPtr)(
NPP npp,
NPObject *obj, NPIdentifier propertyName);
108typedef bool (*NPN_HasMethodProcPtr)(
NPP npp,
NPObject *obj, NPIdentifier propertyName);
109typedef void (*NPN_ReleaseVariantValueProcPtr)(
NPVariant *variant);
110typedef void (*NPN_SetExceptionProcPtr)(
NPObject *obj,
const NPUTF8 *message);
111typedef bool (*NPN_PushPopupsEnabledStateProcPtr)(
NPP npp, NPBool enabled);
112typedef bool (*NPN_PopPopupsEnabledStateProcPtr)(
NPP npp);
113typedef bool (*NPN_EnumerateProcPtr)(
NPP npp,
NPObject *obj, NPIdentifier **identifier, uint32_t *count);
114typedef void (*NPN_PluginThreadAsyncCallProcPtr)(
NPP instance, void (*func)(
void *),
void *userData);
116typedef NPError (*NPN_GetValueForURLPtr)(
NPP npp, NPNURLVariable variable,
const char *url,
char **value, uint32_t *len);
117typedef NPError (*NPN_SetValueForURLPtr)(
NPP npp, NPNURLVariable variable,
const char *url,
const char *value, uint32_t len);
118typedef NPError (*NPN_GetAuthenticationInfoPtr)(
NPP npp,
const char *protocol,
const char *host, int32_t port,
const char *scheme,
const char *realm,
char **username, uint32_t *ulen,
char **password, uint32_t *plen);
124 NPP_DestroyProcPtr destroy;
125 NPP_SetWindowProcPtr setwindow;
126 NPP_NewStreamProcPtr newstream;
127 NPP_DestroyStreamProcPtr destroystream;
128 NPP_StreamAsFileProcPtr asfile;
129 NPP_WriteReadyProcPtr writeready;
130 NPP_WriteProcPtr write;
131 NPP_PrintProcPtr print;
132 NPP_HandleEventProcPtr event;
133 NPP_URLNotifyProcPtr urlnotify;
135 NPP_GetValueProcPtr getvalue;
136 NPP_SetValueProcPtr setvalue;
142 NPN_GetURLProcPtr geturl;
143 NPN_PostURLProcPtr posturl;
144 NPN_RequestReadProcPtr requestread;
145 NPN_NewStreamProcPtr newstream;
146 NPN_WriteProcPtr write;
147 NPN_DestroyStreamProcPtr destroystream;
148 NPN_StatusProcPtr status;
149 NPN_UserAgentProcPtr uagent;
150 NPN_MemAllocProcPtr memalloc;
151 NPN_MemFreeProcPtr memfree;
152 NPN_MemFlushProcPtr memflush;
153 NPN_ReloadPluginsProcPtr reloadplugins;
154 NPN_GetJavaEnvProcPtr getJavaEnv;
155 NPN_GetJavaPeerProcPtr getJavaPeer;
156 NPN_GetURLNotifyProcPtr geturlnotify;
157 NPN_PostURLNotifyProcPtr posturlnotify;
158 NPN_GetValueProcPtr getvalue;
159 NPN_SetValueProcPtr setvalue;
160 NPN_InvalidateRectProcPtr invalidaterect;
161 NPN_InvalidateRegionProcPtr invalidateregion;
162 NPN_ForceRedrawProcPtr forceredraw;
163 NPN_GetStringIdentifierProcPtr getstringidentifier;
164 NPN_GetStringIdentifiersProcPtr getstringidentifiers;
165 NPN_GetIntIdentifierProcPtr getintidentifier;
166 NPN_IdentifierIsStringProcPtr identifierisstring;
167 NPN_UTF8FromIdentifierProcPtr utf8fromidentifier;
168 NPN_IntFromIdentifierProcPtr intfromidentifier;
169 NPN_CreateObjectProcPtr createobject;
170 NPN_RetainObjectProcPtr retainobject;
171 NPN_ReleaseObjectProcPtr releaseobject;
172 NPN_InvokeProcPtr invoke;
173 NPN_InvokeDefaultProcPtr invokeDefault;
174 NPN_EvaluateProcPtr evaluate;
175 NPN_GetPropertyProcPtr getproperty;
176 NPN_SetPropertyProcPtr setproperty;
177 NPN_RemovePropertyProcPtr removeproperty;
178 NPN_HasPropertyProcPtr hasproperty;
179 NPN_HasMethodProcPtr hasmethod;
180 NPN_ReleaseVariantValueProcPtr releasevariantvalue;
181 NPN_SetExceptionProcPtr setexception;
182 NPN_PushPopupsEnabledStateProcPtr pushpopupsenabledstate;
183 NPN_PopPopupsEnabledStateProcPtr poppopupsenabledstate;
184 NPN_EnumerateProcPtr enumerate;
185 NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall;
186 NPN_ConstructProcPtr construct;
187 NPN_GetValueForURLPtr getvalueforurl;
188 NPN_SetValueForURLPtr setvalueforurl;
189 NPN_GetAuthenticationInfoPtr getauthenticationinfo;
203 kBPSupportedMIMETypesStructVers_1 = 1
205typedef struct _BPSupportedMIMETypes
207 SInt32 structVersion;
210} BPSupportedMIMETypes;
211OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags);
212#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription"
213typedef const char* (*NP_GetMIMEDescriptionProcPtr)();
214typedef OSErr (*BP_GetSupportedMIMETypesProcPtr)(BPSupportedMIMETypes*, UInt32);
221#define OSCALL _System
229#if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
230#define NP_VISIBILITY_DEFAULT __attribute__((visibility("default")))
231#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
232#define NP_VISIBILITY_DEFAULT __global
234#define NP_VISIBILITY_DEFAULT
236#define NP_EXPORT(__type) NP_VISIBILITY_DEFAULT __type
239#if defined(_WINDOWS) || defined (__OS2__)
245typedef struct _NPPluginData {
248 char *pFileOpenTemplate;
250 char *pProductDescription;
251 unsigned long dwProductVersionMS;
252 unsigned long dwProductVersionLS;
254NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData);
258NPError OSCALL NP_Shutdown();
259char* NP_GetMIMEDescription();
273NP_EXPORT(
char*) NP_GetPluginVersion();
274NP_EXPORT(
char*) NP_GetMIMEDescription();
281NP_EXPORT(NPError) NP_Shutdown();
282NP_EXPORT(NPError) NP_GetValue(
void *future, NPPVariable aVariable,
void *aValue);