diff --git a/dom/plugins/base/npapi.h b/dom/plugins/base/npapi.h index a4498a2cb53c..ccf41be7c4ba 100644 --- a/dom/plugins/base/npapi.h +++ b/dom/plugins/base/npapi.h @@ -366,7 +366,7 @@ typedef enum { /* Checks to see if the plug-in would like the browser to load the "src" attribute. */ NPPVpluginCancelSrcStream = 20, - NPPVSupportsAdvancedKeyHandling = 21, + NPPVsupportsAdvancedKeyHandling = 21, NPPVpluginUsesDOMForCursorBool = 22 @@ -429,6 +429,8 @@ typedef enum { , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */ , NPNVsupportsUpdatedCocoaTextInputBool = 3002 /* TRUE if the browser supports the updated Cocoa text input specification. */ + , NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports + CA model compositing */ #endif #if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) , NPNVSupportsWindowlessLocal = 2002 @@ -787,7 +789,7 @@ extern "C" { /* NPP_* functions are provided by the plugin and called by the navigator. */ #if defined(XP_UNIX) -char* NPP_GetMIMEDescription(void); +const char* NPP_GetMIMEDescription(void); #endif NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, diff --git a/dom/plugins/base/npfunctions.h b/dom/plugins/base/npfunctions.h index abc14733a2c2..3b70a39419df 100644 --- a/dom/plugins/base/npfunctions.h +++ b/dom/plugins/base/npfunctions.h @@ -217,7 +217,7 @@ typedef struct _NPNetscapeFuncs { * These can be called to retreive MIME information from the plugin dynamically * * 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 */ enum @@ -273,17 +273,17 @@ typedef struct _NPPluginData { /* Alternate OS2 Plugin interface */ unsigned long dwProductVersionMS; unsigned long dwProductVersionLS; } NPPluginData; -typedef NPError (*NP_GetPluginDataFunc)(NPPluginData*); -NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData); +typedef NPError (*NP_GetPluginDataFunc)(NPPluginData*); +NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData); #endif -typedef NPError (*NP_GetEntryPointsFunc)(NPPluginFuncs*); -NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs); -typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*); -NPError OSCALL NP_Initialize(NPNetscapeFuncs* bFuncs); -typedef NPError (*NP_ShutdownFunc)(void); -NPError OSCALL NP_Shutdown(void); -typedef char* (*NP_GetMIMEDescriptionFunc)(void); -char* NP_GetMIMEDescription(void); +typedef NPError (*NP_GetEntryPointsFunc)(NPPluginFuncs*); +NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs); +typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*); +NPError OSCALL NP_Initialize(NPNetscapeFuncs* bFuncs); +typedef NPError (*NP_ShutdownFunc)(void); +NPError OSCALL NP_Shutdown(void); +typedef const char* (*NP_GetMIMEDescriptionFunc)(void); +const char* NP_GetMIMEDescription(void); #ifdef __cplusplus } #endif @@ -297,23 +297,23 @@ char* NP_GetMIMEDescription(void); #ifdef __cplusplus extern "C" { #endif -typedef char* (*NP_GetPluginVersionFunc)(void); -NP_EXPORT(char*) NP_GetPluginVersion(void); -typedef char* (*NP_GetMIMEDescriptionFunc)(void); -NP_EXPORT(char*) NP_GetMIMEDescription(void); +typedef char* (*NP_GetPluginVersionFunc)(void); +NP_EXPORT(char*) NP_GetPluginVersion(void); +typedef const char* (*NP_GetMIMEDescriptionFunc)(void); +NP_EXPORT(const char*) NP_GetMIMEDescription(void); #ifdef XP_MACOSX -typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*); -NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs); -typedef NPError (*NP_GetEntryPointsFunc)(NPPluginFuncs*); -NP_EXPORT(NPError) NP_GetEntryPoints(NPPluginFuncs* pFuncs); +typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*); +NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs); +typedef NPError (*NP_GetEntryPointsFunc)(NPPluginFuncs*); +NP_EXPORT(NPError) NP_GetEntryPoints(NPPluginFuncs* pFuncs); #else -typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*, NPPluginFuncs*); -NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs); +typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*, NPPluginFuncs*); +NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs); #endif -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); +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); #ifdef __cplusplus } #endif diff --git a/dom/plugins/base/npruntime.h b/dom/plugins/base/npruntime.h index e6cef1535501..6e891650456d 100644 --- a/dom/plugins/base/npruntime.h +++ b/dom/plugins/base/npruntime.h @@ -1,12 +1,12 @@ /* -*- 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. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 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 * to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * 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 user agent. That is, it can be used to bind C code to scripting environments outside of the context of a user agent. - + However, the normal use of the this API is in the context of a scripting environment running in a browser or other user agent. In particular it is used to support the extended Netscape @@ -167,14 +167,14 @@ NP_END_MACRO #define STRINGZ_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_String; \ - NPString str = { _val, uint32_t(strlen(_val)) }; \ + NPString str = { _val, (uint32_t)(strlen(_val)) }; \ (_v).value.stringValue = str; \ NP_END_MACRO #define STRINGN_TO_NPVARIANT(_val, _len, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_String; \ - NPString str = { _val, uint32_t(_len) }; \ + NPString str = { _val, (uint32_t)(_len) }; \ (_v).value.stringValue = str; \ NP_END_MACRO @@ -355,7 +355,7 @@ void NPN_ReleaseObject(NPObject *npobj); value, it will be supplied via the result NPVariant argument. Successful calls will return true, false will be returned in case of an error. - + Calls made from plugin code to script must be made from the thread on which the plugin was initialized. */ diff --git a/dom/plugins/base/nptypes.h b/dom/plugins/base/nptypes.h index 300128885cc3..abcc96be0d55 100644 --- a/dom/plugins/base/nptypes.h +++ b/dom/plugins/base/nptypes.h @@ -69,7 +69,7 @@ #endif #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. */ #include diff --git a/dom/plugins/test/testplugin/nptest.cpp b/dom/plugins/test/testplugin/nptest.cpp index ba2c99506702..4c073a380a0d 100644 --- a/dom/plugins/test/testplugin/nptest.cpp +++ b/dom/plugins/test/testplugin/nptest.cpp @@ -569,9 +569,9 @@ NP_GetPluginVersion() static char sMimeDescription[] = "application/x-test:tst:Test mimetype"; #if defined(XP_UNIX) -NP_EXPORT(char*) NP_GetMIMEDescription() +NP_EXPORT(const char*) NP_GetMIMEDescription() #elif defined(XP_WIN) || defined(XP_OS2) -char* NP_GetMIMEDescription() +const char* NP_GetMIMEDescription() #endif { return sMimeDescription;