2004-07-12 19:53:22 +04:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1998-07-28 06:07:25 +04:00
|
|
|
|
2008-10-08 05:53:02 +04:00
|
|
|
#ifndef npfunctions_h_
|
|
|
|
#define npfunctions_h_
|
1998-07-28 06:07:25 +04:00
|
|
|
|
|
|
|
#include "npapi.h"
|
2004-07-12 19:53:22 +04:00
|
|
|
#include "npruntime.h"
|
|
|
|
|
2011-11-11 04:17:46 +04:00
|
|
|
#ifdef MOZ_WIDGET_ANDROID
|
2011-09-17 01:34:31 +04:00
|
|
|
#include <jni.h>
|
|
|
|
#endif
|
|
|
|
|
2014-02-11 02:57:01 +04:00
|
|
|
typedef NPError (* NPP_NewProcPtr)(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved);
|
|
|
|
typedef NPError (* NPP_DestroyProcPtr)(NPP instance, NPSavedData** save);
|
|
|
|
typedef NPError (* NPP_SetWindowProcPtr)(NPP instance, NPWindow* window);
|
|
|
|
typedef NPError (* NPP_NewStreamProcPtr)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype);
|
|
|
|
typedef NPError (* NPP_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason);
|
|
|
|
typedef int32_t (* NPP_WriteReadyProcPtr)(NPP instance, NPStream* stream);
|
|
|
|
typedef int32_t (* NPP_WriteProcPtr)(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer);
|
|
|
|
typedef void (* NPP_StreamAsFileProcPtr)(NPP instance, NPStream* stream, const char* fname);
|
|
|
|
typedef void (* NPP_PrintProcPtr)(NPP instance, NPPrint* platformPrint);
|
|
|
|
typedef int16_t (* NPP_HandleEventProcPtr)(NPP instance, void* event);
|
|
|
|
typedef void (* NPP_URLNotifyProcPtr)(NPP instance, const char* url, NPReason reason, void* notifyData);
|
2008-12-17 10:01:47 +03:00
|
|
|
/* Any NPObjects returned to the browser via NPP_GetValue should be retained
|
|
|
|
by the plugin on the way out. The browser is responsible for releasing. */
|
2014-02-11 02:57:01 +04:00
|
|
|
typedef NPError (* NPP_GetValueProcPtr)(NPP instance, NPPVariable variable, void *ret_value);
|
|
|
|
typedef NPError (* NPP_SetValueProcPtr)(NPP instance, NPNVariable variable, void *value);
|
|
|
|
typedef NPBool (* NPP_GotFocusPtr)(NPP instance, NPFocusDirection direction);
|
|
|
|
typedef void (* NPP_LostFocusPtr)(NPP instance);
|
|
|
|
typedef void (* NPP_URLRedirectNotifyPtr)(NPP instance, const char* url, int32_t status, void* notifyData);
|
|
|
|
typedef NPError (* NPP_ClearSiteDataPtr)(const char* site, uint64_t flags, uint64_t maxAge);
|
|
|
|
typedef char** (* NPP_GetSitesWithDataPtr)(void);
|
|
|
|
typedef void (* NPP_DidCompositePtr)(NPP instance);
|
2008-10-08 05:53:02 +04:00
|
|
|
|
2008-10-26 22:57:36 +03:00
|
|
|
typedef NPError (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable, void *ret_value);
|
2009-01-31 00:40:14 +03:00
|
|
|
typedef NPError (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable, void *value);
|
2008-10-08 05:53:02 +04:00
|
|
|
typedef NPError (*NPN_GetURLNotifyProcPtr)(NPP instance, const char* url, const char* window, void* notifyData);
|
|
|
|
typedef NPError (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData);
|
|
|
|
typedef NPError (*NPN_GetURLProcPtr)(NPP instance, const char* url, const char* window);
|
|
|
|
typedef NPError (*NPN_PostURLProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file);
|
|
|
|
typedef NPError (*NPN_RequestReadProcPtr)(NPStream* stream, NPByteRange* rangeList);
|
|
|
|
typedef NPError (*NPN_NewStreamProcPtr)(NPP instance, NPMIMEType type, const char* window, NPStream** stream);
|
|
|
|
typedef int32_t (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32_t len, void* buffer);
|
|
|
|
typedef NPError (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason);
|
|
|
|
typedef void (*NPN_StatusProcPtr)(NPP instance, const char* message);
|
2008-12-17 10:01:47 +03:00
|
|
|
/* Browser manages the lifetime of the buffer returned by NPN_UserAgent, don't
|
|
|
|
depend on it sticking around and don't free it. */
|
2008-10-08 05:53:02 +04:00
|
|
|
typedef const char* (*NPN_UserAgentProcPtr)(NPP instance);
|
|
|
|
typedef void* (*NPN_MemAllocProcPtr)(uint32_t size);
|
|
|
|
typedef void (*NPN_MemFreeProcPtr)(void* ptr);
|
|
|
|
typedef uint32_t (*NPN_MemFlushProcPtr)(uint32_t size);
|
|
|
|
typedef void (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages);
|
2010-10-20 21:30:36 +04:00
|
|
|
typedef void* (*NPN_GetJavaEnvProcPtr)(void);
|
2008-10-08 05:53:02 +04:00
|
|
|
typedef void* (*NPN_GetJavaPeerProcPtr)(NPP instance);
|
|
|
|
typedef void (*NPN_InvalidateRectProcPtr)(NPP instance, NPRect *rect);
|
|
|
|
typedef void (*NPN_InvalidateRegionProcPtr)(NPP instance, NPRegion region);
|
|
|
|
typedef void (*NPN_ForceRedrawProcPtr)(NPP instance);
|
|
|
|
typedef NPIdentifier (*NPN_GetStringIdentifierProcPtr)(const NPUTF8* name);
|
|
|
|
typedef void (*NPN_GetStringIdentifiersProcPtr)(const NPUTF8** names, int32_t nameCount, NPIdentifier* identifiers);
|
|
|
|
typedef NPIdentifier (*NPN_GetIntIdentifierProcPtr)(int32_t intid);
|
|
|
|
typedef bool (*NPN_IdentifierIsStringProcPtr)(NPIdentifier identifier);
|
|
|
|
typedef NPUTF8* (*NPN_UTF8FromIdentifierProcPtr)(NPIdentifier identifier);
|
|
|
|
typedef int32_t (*NPN_IntFromIdentifierProcPtr)(NPIdentifier identifier);
|
|
|
|
typedef NPObject* (*NPN_CreateObjectProcPtr)(NPP npp, NPClass *aClass);
|
|
|
|
typedef NPObject* (*NPN_RetainObjectProcPtr)(NPObject *obj);
|
|
|
|
typedef void (*NPN_ReleaseObjectProcPtr)(NPObject *obj);
|
|
|
|
typedef bool (*NPN_InvokeProcPtr)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result);
|
|
|
|
typedef bool (*NPN_InvokeDefaultProcPtr)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result);
|
|
|
|
typedef bool (*NPN_EvaluateProcPtr)(NPP npp, NPObject *obj, NPString *script, NPVariant *result);
|
|
|
|
typedef bool (*NPN_GetPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result);
|
|
|
|
typedef bool (*NPN_SetPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value);
|
|
|
|
typedef bool (*NPN_RemovePropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName);
|
|
|
|
typedef bool (*NPN_HasPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName);
|
|
|
|
typedef bool (*NPN_HasMethodProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName);
|
|
|
|
typedef void (*NPN_ReleaseVariantValueProcPtr)(NPVariant *variant);
|
|
|
|
typedef void (*NPN_SetExceptionProcPtr)(NPObject *obj, const NPUTF8 *message);
|
2010-03-26 02:45:33 +03:00
|
|
|
typedef void (*NPN_PushPopupsEnabledStateProcPtr)(NPP npp, NPBool enabled);
|
|
|
|
typedef void (*NPN_PopPopupsEnabledStateProcPtr)(NPP npp);
|
2008-10-08 05:53:02 +04:00
|
|
|
typedef bool (*NPN_EnumerateProcPtr)(NPP npp, NPObject *obj, NPIdentifier **identifier, uint32_t *count);
|
|
|
|
typedef void (*NPN_PluginThreadAsyncCallProcPtr)(NPP instance, void (*func)(void *), void *userData);
|
|
|
|
typedef bool (*NPN_ConstructProcPtr)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result);
|
2009-01-13 03:55:52 +03:00
|
|
|
typedef NPError (*NPN_GetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, char **value, uint32_t *len);
|
|
|
|
typedef NPError (*NPN_SetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, const char *value, uint32_t len);
|
|
|
|
typedef 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);
|
2009-07-01 19:09:49 +04:00
|
|
|
typedef uint32_t (*NPN_ScheduleTimerPtr)(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
|
|
|
|
typedef void (*NPN_UnscheduleTimerPtr)(NPP instance, uint32_t timerID);
|
2009-08-27 04:29:47 +04:00
|
|
|
typedef NPError (*NPN_PopUpContextMenuPtr)(NPP instance, NPMenu* menu);
|
|
|
|
typedef NPBool (*NPN_ConvertPointPtr)(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace);
|
2010-06-15 23:34:32 +04:00
|
|
|
typedef NPBool (*NPN_HandleEventPtr)(NPP instance, void *event, NPBool handled);
|
|
|
|
typedef NPBool (*NPN_UnfocusInstancePtr)(NPP instance, NPFocusDirection direction);
|
2010-11-09 18:26:44 +03:00
|
|
|
typedef void (*NPN_URLRedirectResponsePtr)(NPP instance, void* notifyData, NPBool allow);
|
2012-02-16 07:08:15 +04:00
|
|
|
typedef NPError (*NPN_InitAsyncSurfacePtr)(NPP instance, NPSize *size, NPImageFormat format, void *initData, NPAsyncSurface *surface);
|
|
|
|
typedef NPError (*NPN_FinalizeAsyncSurfacePtr)(NPP instance, NPAsyncSurface *surface);
|
|
|
|
typedef void (*NPN_SetCurrentAsyncSurfacePtr)(NPP instance, NPAsyncSurface *surface, NPRect *changed);
|
1998-07-28 06:07:25 +04:00
|
|
|
|
|
|
|
typedef struct _NPPluginFuncs {
|
2008-10-08 05:53:02 +04:00
|
|
|
uint16_t size;
|
|
|
|
uint16_t version;
|
|
|
|
NPP_NewProcPtr newp;
|
|
|
|
NPP_DestroyProcPtr destroy;
|
|
|
|
NPP_SetWindowProcPtr setwindow;
|
|
|
|
NPP_NewStreamProcPtr newstream;
|
|
|
|
NPP_DestroyStreamProcPtr destroystream;
|
|
|
|
NPP_StreamAsFileProcPtr asfile;
|
|
|
|
NPP_WriteReadyProcPtr writeready;
|
|
|
|
NPP_WriteProcPtr write;
|
|
|
|
NPP_PrintProcPtr print;
|
|
|
|
NPP_HandleEventProcPtr event;
|
|
|
|
NPP_URLNotifyProcPtr urlnotify;
|
|
|
|
void* javaClass;
|
|
|
|
NPP_GetValueProcPtr getvalue;
|
|
|
|
NPP_SetValueProcPtr setvalue;
|
2010-06-15 23:34:32 +04:00
|
|
|
NPP_GotFocusPtr gotfocus;
|
|
|
|
NPP_LostFocusPtr lostfocus;
|
2010-11-09 18:26:44 +03:00
|
|
|
NPP_URLRedirectNotifyPtr urlredirectnotify;
|
2011-01-19 05:32:35 +03:00
|
|
|
NPP_ClearSiteDataPtr clearsitedata;
|
|
|
|
NPP_GetSitesWithDataPtr getsiteswithdata;
|
2012-02-16 07:08:15 +04:00
|
|
|
NPP_DidCompositePtr didComposite;
|
1998-07-28 06:07:25 +04:00
|
|
|
} NPPluginFuncs;
|
|
|
|
|
|
|
|
typedef struct _NPNetscapeFuncs {
|
2008-10-08 05:53:02 +04:00
|
|
|
uint16_t size;
|
|
|
|
uint16_t version;
|
|
|
|
NPN_GetURLProcPtr geturl;
|
|
|
|
NPN_PostURLProcPtr posturl;
|
|
|
|
NPN_RequestReadProcPtr requestread;
|
|
|
|
NPN_NewStreamProcPtr newstream;
|
|
|
|
NPN_WriteProcPtr write;
|
|
|
|
NPN_DestroyStreamProcPtr destroystream;
|
|
|
|
NPN_StatusProcPtr status;
|
|
|
|
NPN_UserAgentProcPtr uagent;
|
|
|
|
NPN_MemAllocProcPtr memalloc;
|
|
|
|
NPN_MemFreeProcPtr memfree;
|
|
|
|
NPN_MemFlushProcPtr memflush;
|
|
|
|
NPN_ReloadPluginsProcPtr reloadplugins;
|
|
|
|
NPN_GetJavaEnvProcPtr getJavaEnv;
|
|
|
|
NPN_GetJavaPeerProcPtr getJavaPeer;
|
|
|
|
NPN_GetURLNotifyProcPtr geturlnotify;
|
|
|
|
NPN_PostURLNotifyProcPtr posturlnotify;
|
|
|
|
NPN_GetValueProcPtr getvalue;
|
|
|
|
NPN_SetValueProcPtr setvalue;
|
|
|
|
NPN_InvalidateRectProcPtr invalidaterect;
|
|
|
|
NPN_InvalidateRegionProcPtr invalidateregion;
|
|
|
|
NPN_ForceRedrawProcPtr forceredraw;
|
|
|
|
NPN_GetStringIdentifierProcPtr getstringidentifier;
|
|
|
|
NPN_GetStringIdentifiersProcPtr getstringidentifiers;
|
|
|
|
NPN_GetIntIdentifierProcPtr getintidentifier;
|
|
|
|
NPN_IdentifierIsStringProcPtr identifierisstring;
|
|
|
|
NPN_UTF8FromIdentifierProcPtr utf8fromidentifier;
|
|
|
|
NPN_IntFromIdentifierProcPtr intfromidentifier;
|
|
|
|
NPN_CreateObjectProcPtr createobject;
|
|
|
|
NPN_RetainObjectProcPtr retainobject;
|
|
|
|
NPN_ReleaseObjectProcPtr releaseobject;
|
|
|
|
NPN_InvokeProcPtr invoke;
|
|
|
|
NPN_InvokeDefaultProcPtr invokeDefault;
|
|
|
|
NPN_EvaluateProcPtr evaluate;
|
|
|
|
NPN_GetPropertyProcPtr getproperty;
|
|
|
|
NPN_SetPropertyProcPtr setproperty;
|
|
|
|
NPN_RemovePropertyProcPtr removeproperty;
|
|
|
|
NPN_HasPropertyProcPtr hasproperty;
|
|
|
|
NPN_HasMethodProcPtr hasmethod;
|
|
|
|
NPN_ReleaseVariantValueProcPtr releasevariantvalue;
|
|
|
|
NPN_SetExceptionProcPtr setexception;
|
|
|
|
NPN_PushPopupsEnabledStateProcPtr pushpopupsenabledstate;
|
|
|
|
NPN_PopPopupsEnabledStateProcPtr poppopupsenabledstate;
|
|
|
|
NPN_EnumerateProcPtr enumerate;
|
|
|
|
NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall;
|
|
|
|
NPN_ConstructProcPtr construct;
|
2009-01-13 03:55:52 +03:00
|
|
|
NPN_GetValueForURLPtr getvalueforurl;
|
|
|
|
NPN_SetValueForURLPtr setvalueforurl;
|
|
|
|
NPN_GetAuthenticationInfoPtr getauthenticationinfo;
|
2009-07-01 19:09:49 +04:00
|
|
|
NPN_ScheduleTimerPtr scheduletimer;
|
|
|
|
NPN_UnscheduleTimerPtr unscheduletimer;
|
2009-08-27 04:29:47 +04:00
|
|
|
NPN_PopUpContextMenuPtr popupcontextmenu;
|
|
|
|
NPN_ConvertPointPtr convertpoint;
|
2010-06-15 23:34:32 +04:00
|
|
|
NPN_HandleEventPtr handleevent;
|
|
|
|
NPN_UnfocusInstancePtr unfocusinstance;
|
2010-11-09 18:26:44 +03:00
|
|
|
NPN_URLRedirectResponsePtr urlredirectresponse;
|
2012-02-16 07:08:15 +04:00
|
|
|
NPN_InitAsyncSurfacePtr initasyncsurface;
|
|
|
|
NPN_FinalizeAsyncSurfacePtr finalizeasyncsurface;
|
|
|
|
NPN_SetCurrentAsyncSurfacePtr setcurrentasyncsurface;
|
1998-07-28 06:07:25 +04:00
|
|
|
} NPNetscapeFuncs;
|
|
|
|
|
2006-07-13 23:47:32 +04:00
|
|
|
#ifdef XP_MACOSX
|
2002-04-13 09:10:30 +04:00
|
|
|
/*
|
2006-07-19 19:39:29 +04:00
|
|
|
* Mac OS X version(s) of NP_GetMIMEDescription(const char *)
|
2002-04-13 09:10:30 +04:00
|
|
|
* These can be called to retreive MIME information from the plugin dynamically
|
|
|
|
*
|
|
|
|
* Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way
|
2011-07-28 22:32:29 +04:00
|
|
|
* to get mime info from the plugin only on OSX and may not be supported
|
2006-07-19 19:39:29 +04:00
|
|
|
* in furture version -- use NP_GetMIMEDescription instead
|
2002-04-13 09:10:30 +04:00
|
|
|
*/
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
kBPSupportedMIMETypesStructVers_1 = 1
|
|
|
|
};
|
|
|
|
typedef struct _BPSupportedMIMETypes
|
|
|
|
{
|
2003-01-14 02:15:42 +03:00
|
|
|
SInt32 structVersion; /* struct version */
|
|
|
|
Handle typeStrings; /* STR# formated handle, allocated by plug-in */
|
|
|
|
Handle infoStrings; /* STR# formated handle, allocated by plug-in */
|
2002-04-13 09:10:30 +04:00
|
|
|
} BPSupportedMIMETypes;
|
|
|
|
OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags);
|
2002-04-19 08:13:18 +04:00
|
|
|
#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription"
|
2010-10-20 21:30:36 +04:00
|
|
|
typedef const char* (*NP_GetMIMEDescriptionProcPtr)(void);
|
2008-10-08 05:53:02 +04:00
|
|
|
typedef OSErr (*BP_GetSupportedMIMETypesProcPtr)(BPSupportedMIMETypes*, UInt32);
|
|
|
|
#endif
|
1998-07-28 06:07:25 +04:00
|
|
|
|
2010-06-15 23:34:32 +04:00
|
|
|
#if defined(_WIN32)
|
1998-07-28 06:07:25 +04:00
|
|
|
#define OSCALL WINAPI
|
|
|
|
#else
|
|
|
|
#define OSCALL
|
|
|
|
#endif
|
|
|
|
|
2007-06-27 04:41:08 +04:00
|
|
|
#if defined(XP_UNIX)
|
|
|
|
/* GCC 3.3 and later support the visibility attribute. */
|
2008-10-08 05:53:02 +04:00
|
|
|
#if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
|
2007-06-27 04:41:08 +04:00
|
|
|
#define NP_VISIBILITY_DEFAULT __attribute__((visibility("default")))
|
2008-09-08 10:21:07 +04:00
|
|
|
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
|
|
|
#define NP_VISIBILITY_DEFAULT __global
|
2007-06-27 04:41:08 +04:00
|
|
|
#else
|
|
|
|
#define NP_VISIBILITY_DEFAULT
|
|
|
|
#endif
|
|
|
|
#define NP_EXPORT(__type) NP_VISIBILITY_DEFAULT __type
|
|
|
|
#endif
|
|
|
|
|
2014-02-11 02:57:01 +04:00
|
|
|
#if defined(_WIN32)
|
1998-07-28 06:07:25 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
/* plugin meta member functions */
|
2012-05-05 06:34:05 +04:00
|
|
|
typedef NPError (OSCALL *NP_GetEntryPointsFunc)(NPPluginFuncs*);
|
2011-07-28 22:32:29 +04:00
|
|
|
NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs);
|
2012-05-05 06:34:05 +04:00
|
|
|
typedef NPError (OSCALL *NP_InitializeFunc)(NPNetscapeFuncs*);
|
2011-07-28 22:32:29 +04:00
|
|
|
NPError OSCALL NP_Initialize(NPNetscapeFuncs* bFuncs);
|
2012-05-05 06:34:05 +04:00
|
|
|
typedef NPError (OSCALL *NP_ShutdownFunc)(void);
|
2011-07-28 22:32:29 +04:00
|
|
|
NPError OSCALL NP_Shutdown(void);
|
|
|
|
typedef const char* (*NP_GetMIMEDescriptionFunc)(void);
|
|
|
|
const char* NP_GetMIMEDescription(void);
|
1998-07-28 06:07:25 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2008-10-08 05:53:02 +04:00
|
|
|
#endif
|
1998-07-28 06:07:25 +04:00
|
|
|
|
|
|
|
#ifdef XP_UNIX
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2011-07-28 22:32:29 +04:00
|
|
|
typedef char* (*NP_GetPluginVersionFunc)(void);
|
|
|
|
NP_EXPORT(char*) NP_GetPluginVersion(void);
|
|
|
|
typedef const char* (*NP_GetMIMEDescriptionFunc)(void);
|
|
|
|
NP_EXPORT(const char*) NP_GetMIMEDescription(void);
|
2008-11-29 02:17:36 +03:00
|
|
|
#ifdef XP_MACOSX
|
2011-07-28 22:32:29 +04:00
|
|
|
typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*);
|
|
|
|
NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs);
|
|
|
|
typedef NPError (*NP_GetEntryPointsFunc)(NPPluginFuncs*);
|
|
|
|
NP_EXPORT(NPError) NP_GetEntryPoints(NPPluginFuncs* pFuncs);
|
2008-11-29 02:17:36 +03:00
|
|
|
#else
|
2011-11-11 04:17:46 +04:00
|
|
|
#ifdef MOZ_WIDGET_ANDROID
|
2011-09-17 01:34:31 +04:00
|
|
|
typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*, NPPluginFuncs*, JNIEnv* pEnv);
|
|
|
|
NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs, JNIEnv* pEnv);
|
|
|
|
#else
|
|
|
|
typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*, NPPluginFuncs*);
|
|
|
|
NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs);
|
|
|
|
#endif
|
2008-11-29 02:17:36 +03:00
|
|
|
#endif
|
2011-07-28 22:32:29 +04:00
|
|
|
typedef NPError (*NP_ShutdownFunc)(void);
|
|
|
|
NP_EXPORT(NPError) NP_Shutdown(void);
|
|
|
|
typedef NPError (*NP_GetValueFunc)(void *, NPPVariable, void *);
|
|
|
|
NP_EXPORT(NPError) NP_GetValue(void *future, NPPVariable aVariable, void *aValue);
|
1998-07-28 06:07:25 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2008-10-08 05:53:02 +04:00
|
|
|
#endif
|
1998-07-28 06:07:25 +04:00
|
|
|
|
2008-10-08 05:53:02 +04:00
|
|
|
#endif /* npfunctions_h_ */
|