зеркало из https://github.com/mozilla/pjs.git
Bug 674240: Update NPAPI headers to npapi-sdk r12. r=bgirard
This commit is contained in:
Родитель
dfad1adb50
Коммит
d98e8a2ebc
|
@ -366,7 +366,7 @@ typedef enum {
|
||||||
/* Checks to see if the plug-in would like the browser to load the "src" attribute. */
|
/* Checks to see if the plug-in would like the browser to load the "src" attribute. */
|
||||||
NPPVpluginCancelSrcStream = 20,
|
NPPVpluginCancelSrcStream = 20,
|
||||||
|
|
||||||
NPPVSupportsAdvancedKeyHandling = 21,
|
NPPVsupportsAdvancedKeyHandling = 21,
|
||||||
|
|
||||||
NPPVpluginUsesDOMForCursorBool = 22
|
NPPVpluginUsesDOMForCursorBool = 22
|
||||||
|
|
||||||
|
@ -429,6 +429,8 @@ typedef enum {
|
||||||
, NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */
|
, NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */
|
||||||
, NPNVsupportsUpdatedCocoaTextInputBool = 3002 /* TRUE if the browser supports the updated
|
, NPNVsupportsUpdatedCocoaTextInputBool = 3002 /* TRUE if the browser supports the updated
|
||||||
Cocoa text input specification. */
|
Cocoa text input specification. */
|
||||||
|
, NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports
|
||||||
|
CA model compositing */
|
||||||
#endif
|
#endif
|
||||||
#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
|
#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
|
||||||
, NPNVSupportsWindowlessLocal = 2002
|
, NPNVSupportsWindowlessLocal = 2002
|
||||||
|
@ -787,7 +789,7 @@ extern "C" {
|
||||||
/* NPP_* functions are provided by the plugin and called by the navigator. */
|
/* NPP_* functions are provided by the plugin and called by the navigator. */
|
||||||
|
|
||||||
#if defined(XP_UNIX)
|
#if defined(XP_UNIX)
|
||||||
char* NPP_GetMIMEDescription(void);
|
const char* NPP_GetMIMEDescription(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
|
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
|
||||||
|
|
|
@ -217,7 +217,7 @@ typedef struct _NPNetscapeFuncs {
|
||||||
* These can be called to retreive MIME information from the plugin dynamically
|
* These can be called to retreive MIME information from the plugin dynamically
|
||||||
*
|
*
|
||||||
* Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way
|
* Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way
|
||||||
* to get mime info from the plugin only on OSX and may not be supported
|
* to get mime info from the plugin only on OSX and may not be supported
|
||||||
* in furture version -- use NP_GetMIMEDescription instead
|
* in furture version -- use NP_GetMIMEDescription instead
|
||||||
*/
|
*/
|
||||||
enum
|
enum
|
||||||
|
@ -273,17 +273,17 @@ typedef struct _NPPluginData { /* Alternate OS2 Plugin interface */
|
||||||
unsigned long dwProductVersionMS;
|
unsigned long dwProductVersionMS;
|
||||||
unsigned long dwProductVersionLS;
|
unsigned long dwProductVersionLS;
|
||||||
} NPPluginData;
|
} NPPluginData;
|
||||||
typedef NPError (*NP_GetPluginDataFunc)(NPPluginData*);
|
typedef NPError (*NP_GetPluginDataFunc)(NPPluginData*);
|
||||||
NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData);
|
NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData);
|
||||||
#endif
|
#endif
|
||||||
typedef NPError (*NP_GetEntryPointsFunc)(NPPluginFuncs*);
|
typedef NPError (*NP_GetEntryPointsFunc)(NPPluginFuncs*);
|
||||||
NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs);
|
NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs);
|
||||||
typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*);
|
typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*);
|
||||||
NPError OSCALL NP_Initialize(NPNetscapeFuncs* bFuncs);
|
NPError OSCALL NP_Initialize(NPNetscapeFuncs* bFuncs);
|
||||||
typedef NPError (*NP_ShutdownFunc)(void);
|
typedef NPError (*NP_ShutdownFunc)(void);
|
||||||
NPError OSCALL NP_Shutdown(void);
|
NPError OSCALL NP_Shutdown(void);
|
||||||
typedef char* (*NP_GetMIMEDescriptionFunc)(void);
|
typedef const char* (*NP_GetMIMEDescriptionFunc)(void);
|
||||||
char* NP_GetMIMEDescription(void);
|
const char* NP_GetMIMEDescription(void);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -297,23 +297,23 @@ char* NP_GetMIMEDescription(void);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
typedef char* (*NP_GetPluginVersionFunc)(void);
|
typedef char* (*NP_GetPluginVersionFunc)(void);
|
||||||
NP_EXPORT(char*) NP_GetPluginVersion(void);
|
NP_EXPORT(char*) NP_GetPluginVersion(void);
|
||||||
typedef char* (*NP_GetMIMEDescriptionFunc)(void);
|
typedef const char* (*NP_GetMIMEDescriptionFunc)(void);
|
||||||
NP_EXPORT(char*) NP_GetMIMEDescription(void);
|
NP_EXPORT(const char*) NP_GetMIMEDescription(void);
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*);
|
typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*);
|
||||||
NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs);
|
NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs);
|
||||||
typedef NPError (*NP_GetEntryPointsFunc)(NPPluginFuncs*);
|
typedef NPError (*NP_GetEntryPointsFunc)(NPPluginFuncs*);
|
||||||
NP_EXPORT(NPError) NP_GetEntryPoints(NPPluginFuncs* pFuncs);
|
NP_EXPORT(NPError) NP_GetEntryPoints(NPPluginFuncs* pFuncs);
|
||||||
#else
|
#else
|
||||||
typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*, NPPluginFuncs*);
|
typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*, NPPluginFuncs*);
|
||||||
NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs);
|
NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs);
|
||||||
#endif
|
#endif
|
||||||
typedef NPError (*NP_ShutdownFunc)(void);
|
typedef NPError (*NP_ShutdownFunc)(void);
|
||||||
NP_EXPORT(NPError) NP_Shutdown(void);
|
NP_EXPORT(NPError) NP_Shutdown(void);
|
||||||
typedef NPError (*NP_GetValueFunc)(void *, NPPVariable, void *);
|
typedef NPError (*NP_GetValueFunc)(void *, NPPVariable, void *);
|
||||||
NP_EXPORT(NPError) NP_GetValue(void *future, NPPVariable aVariable, void *aValue);
|
NP_EXPORT(NPError) NP_GetValue(void *future, NPPVariable aVariable, void *aValue);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation.
|
* Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
* met:
|
* met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
* Foundation ("Mozilla") nor the names of their contributors may be used
|
* Foundation ("Mozilla") nor the names of their contributors may be used
|
||||||
* to endorse or promote products derived from this software without
|
* to endorse or promote products derived from this software without
|
||||||
* specific prior written permission.
|
* specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS
|
* THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS
|
||||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
@ -44,7 +44,7 @@ extern "C" {
|
||||||
objects. The API in this header does not assume the presence of a
|
objects. The API in this header does not assume the presence of a
|
||||||
user agent. That is, it can be used to bind C code to scripting
|
user agent. That is, it can be used to bind C code to scripting
|
||||||
environments outside of the context of a user agent.
|
environments outside of the context of a user agent.
|
||||||
|
|
||||||
However, the normal use of the this API is in the context of a
|
However, the normal use of the this API is in the context of a
|
||||||
scripting environment running in a browser or other user agent.
|
scripting environment running in a browser or other user agent.
|
||||||
In particular it is used to support the extended Netscape
|
In particular it is used to support the extended Netscape
|
||||||
|
@ -167,14 +167,14 @@ NP_END_MACRO
|
||||||
#define STRINGZ_TO_NPVARIANT(_val, _v) \
|
#define STRINGZ_TO_NPVARIANT(_val, _v) \
|
||||||
NP_BEGIN_MACRO \
|
NP_BEGIN_MACRO \
|
||||||
(_v).type = NPVariantType_String; \
|
(_v).type = NPVariantType_String; \
|
||||||
NPString str = { _val, uint32_t(strlen(_val)) }; \
|
NPString str = { _val, (uint32_t)(strlen(_val)) }; \
|
||||||
(_v).value.stringValue = str; \
|
(_v).value.stringValue = str; \
|
||||||
NP_END_MACRO
|
NP_END_MACRO
|
||||||
|
|
||||||
#define STRINGN_TO_NPVARIANT(_val, _len, _v) \
|
#define STRINGN_TO_NPVARIANT(_val, _len, _v) \
|
||||||
NP_BEGIN_MACRO \
|
NP_BEGIN_MACRO \
|
||||||
(_v).type = NPVariantType_String; \
|
(_v).type = NPVariantType_String; \
|
||||||
NPString str = { _val, uint32_t(_len) }; \
|
NPString str = { _val, (uint32_t)(_len) }; \
|
||||||
(_v).value.stringValue = str; \
|
(_v).value.stringValue = str; \
|
||||||
NP_END_MACRO
|
NP_END_MACRO
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ void NPN_ReleaseObject(NPObject *npobj);
|
||||||
value, it will be supplied via the result NPVariant
|
value, it will be supplied via the result NPVariant
|
||||||
argument. Successful calls will return true, false will be
|
argument. Successful calls will return true, false will be
|
||||||
returned in case of an error.
|
returned in case of an error.
|
||||||
|
|
||||||
Calls made from plugin code to script must be made from the thread
|
Calls made from plugin code to script must be made from the thread
|
||||||
on which the plugin was initialized.
|
on which the plugin was initialized.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
#endif
|
#endif
|
||||||
#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
|
#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
|
||||||
/*
|
/*
|
||||||
* BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
|
* BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
|
||||||
* u_int32_t.
|
* u_int32_t.
|
||||||
*/
|
*/
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
|
@ -569,9 +569,9 @@ NP_GetPluginVersion()
|
||||||
static char sMimeDescription[] = "application/x-test:tst:Test mimetype";
|
static char sMimeDescription[] = "application/x-test:tst:Test mimetype";
|
||||||
|
|
||||||
#if defined(XP_UNIX)
|
#if defined(XP_UNIX)
|
||||||
NP_EXPORT(char*) NP_GetMIMEDescription()
|
NP_EXPORT(const char*) NP_GetMIMEDescription()
|
||||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||||
char* NP_GetMIMEDescription()
|
const char* NP_GetMIMEDescription()
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
return sMimeDescription;
|
return sMimeDescription;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче