diff --git a/mozilla/modules/plugin/base/public/npapi.h b/mozilla/modules/plugin/base/public/npapi.h index b39e93cfa01..6e6172e293f 100644 --- a/mozilla/modules/plugin/base/public/npapi.h +++ b/mozilla/modules/plugin/base/public/npapi.h @@ -37,7 +37,7 @@ /* - * npapi.h $Revision: 3.42 $ + * npapi.h $Revision: 3.43 $ * Netscape client plug-in API spec */ @@ -51,7 +51,6 @@ #include "prtypes.h" /* Copied from xp_core.h */ /* removed #ifdef for hpux defined in /usr/include/model.h */ -#ifndef XP_MAC #ifndef _INT16 #define _INT16 #endif @@ -64,7 +63,6 @@ #ifndef _UINT32 #define _UINT32 #endif -#endif /* * NO_NSPR_10_SUPPORT disables the inclusion @@ -94,11 +92,6 @@ #ifdef __MWERKS__ # define _declspec __declspec -# ifdef macintosh -# ifndef XP_MAC -# define XP_MAC 1 -# endif /* XP_MAC */ -# endif /* macintosh */ # ifdef __INTEL__ # undef NULL # ifndef XP_WIN @@ -107,7 +100,7 @@ # endif /* __INTEL__ */ #endif /* __MWERKS__ */ -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX #include #include #endif @@ -231,10 +224,6 @@ typedef char* NPMIMEType; /* Structures and definitions */ /*----------------------------------------------------------------------*/ -#ifdef XP_MAC -#pragma options align=mac68k -#endif - /* * NPP is a plug-in's opaque instance handle */ @@ -487,7 +476,7 @@ typedef struct _NPPrint } print; } NPPrint; -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX typedef EventRecord NPEvent; #elif defined(XP_WIN) typedef struct _NPEvent @@ -507,9 +496,9 @@ typedef struct _NPEvent typedef XEvent NPEvent; #else typedef void* NPEvent; -#endif /* XP_MAC */ +#endif /* XP_MACOSX */ -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX typedef RgnHandle NPRegion; #elif defined(XP_WIN) typedef HRGN NPRegion; @@ -517,9 +506,9 @@ typedef HRGN NPRegion; typedef Region NPRegion; #else typedef void *NPRegion; -#endif /* XP_MAC */ +#endif /* XP_MACOSX */ -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX /* * Mac-specific structures and definitions. */ @@ -550,7 +539,7 @@ enum NPEventType { #define loseFocusEvent (osEvt + 17) #define adjustCursorEvent (osEvt + 18) #endif -#endif /* XP_MAC */ +#endif /* XP_MACOSX */ /* * Values for mode passed to NPP_New: @@ -568,10 +557,6 @@ enum NPEventType { #define NP_MAXREADY (((unsigned)(~0)<<1)>>1) -#ifdef XP_MAC -#pragma options align=reset -#endif - /*----------------------------------------------------------------------*/ /* Error and Reason Code definitions */ diff --git a/mozilla/modules/plugin/base/public/npupp.h b/mozilla/modules/plugin/base/public/npupp.h index 1d0d4c1592f..e8e5345d51d 100644 --- a/mozilla/modules/plugin/base/public/npupp.h +++ b/mozilla/modules/plugin/base/public/npupp.h @@ -37,7 +37,7 @@ /* - * npupp.h $Revision: 3.21 $ + * npupp.h $Revision: 3.22 $ * function call mecahnics needed by platform specific glue code. */ @@ -1673,12 +1673,6 @@ typedef bool (* NP_LOADDS NPN_EnumerateUPP)(NPP npp, NPObject *obj, NPIdentifier * The actual plugin function table definitions *******************************************************************************************/ -#ifdef XP_MAC -#if PRAGMA_STRUCT_ALIGN -#pragma options align=mac68k -#endif -#endif - typedef struct _NPPluginFuncs { uint16 size; uint16 version; @@ -1746,14 +1740,8 @@ typedef struct _NPNetscapeFuncs { NPN_EnumerateUPP enumerate; } NPNetscapeFuncs; -#ifdef XP_MAC -#if PRAGMA_STRUCT_ALIGN -#pragma options align=reset -#endif -#endif - -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX /****************************************************************************************** * Mac platform-specific plugin glue stuff *******************************************************************************************/ diff --git a/mozilla/modules/plugin/base/public/nsplugin.h b/mozilla/modules/plugin/base/public/nsplugin.h index a75b706c02c..74cb6a01b23 100644 --- a/mozilla/modules/plugin/base/public/nsplugin.h +++ b/mozilla/modules/plugin/base/public/nsplugin.h @@ -35,20 +35,17 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). +/* INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API) * - *

This superscedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. + * This interface was an attempt to supersede npapi.h, npupp.h but it failed. It + * would have eliminated the need for glue files: npunix.c, npwin.cpp and + * npmac.cpp that get linked with the plugin. You would however have needed to + * link with the "backward adapter" (badapter.cpp) in order to allow your + * plugin to run in pre-5.0 browsers. * - *

This is the master header file that includes most of the other headers - * you'll need to write a plugin. + * This is the master header file that includes most of the other headers + * you'd have needed to write a plugin. */ -//////////////////////////////////////////////////////////////////////////////// /** * The following diagram depicts the relationships between various objects diff --git a/mozilla/modules/plugin/base/public/nsplugindefs.h b/mozilla/modules/plugin/base/public/nsplugindefs.h index 86781cab969..4eaad1bad76 100644 --- a/mozilla/modules/plugin/base/public/nsplugindefs.h +++ b/mozilla/modules/plugin/base/public/nsplugindefs.h @@ -49,7 +49,7 @@ #include "prtypes.h" #endif -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX # include # include # include @@ -116,10 +116,6 @@ RCDATA NS_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } //////////////////////////////////////////////////////////////////////////////// // Structures and definitions -#ifdef XP_MAC -#pragma options align=mac68k -#endif - typedef const char* nsMIMEType; struct nsByteRange { @@ -232,7 +228,7 @@ enum nsPluginWindowType { nsPluginWindowType_Drawable }; -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX struct nsPluginPort { CGrafPtr port; /* Grafport */ @@ -302,7 +298,7 @@ struct nsPluginPrint { struct nsPluginEvent { -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX EventRecord* event; nsPluginPlatformWindowRef window; @@ -328,7 +324,7 @@ struct nsPluginEvent { * (These need to be kept in sync with the events defined in npapi.h.) */ enum nsPluginEventType { -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX nsPluginEventType_GetFocusEvent = (osEvt + 16), nsPluginEventType_LoseFocusEvent, nsPluginEventType_AdjustCursorEvent, @@ -336,7 +332,7 @@ enum nsPluginEventType { nsPluginEventType_ClippingChangedEvent, nsPluginEventType_ScrollingBeginsEvent, nsPluginEventType_ScrollingEndsEvent, -#endif /* XP_MAC || XP_MACOSX */ +#endif /* XP_MACOSX */ nsPluginEventType_Idle = 0 }; @@ -384,10 +380,6 @@ class nsIWindowlessPluginInstancePeer; // subclass of nsIPluginInstancePeer for class nsIPluginTagInfo; // describes html tag (accessible from nsIPluginInstancePeer) //////////////////////////////////////////////////////////////////////////////// -#ifdef XP_MAC -#pragma options align=reset -#endif - #endif /* RC_INVOKED */ #ifdef __OS2__ #pragma pack() diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.h b/mozilla/modules/plugin/base/src/ns4xPlugin.h index 39aaf6ca6c7..aff5d4d0c9d 100644 --- a/mozilla/modules/plugin/base/src/ns4xPlugin.h +++ b/mozilla/modules/plugin/base/src/ns4xPlugin.h @@ -79,7 +79,7 @@ typedef NS_4XPLUGIN_CALLBACK(NPError, NP_PLUGINUNIXINIT) (const NPNetscapeFuncs* typedef NS_4XPLUGIN_CALLBACK(NPError, NP_PLUGINSHUTDOWN) (void); #endif -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX typedef NS_4XPLUGIN_CALLBACK(NPError, NP_PLUGINSHUTDOWN) (void); typedef NS_4XPLUGIN_CALLBACK(NPError, NP_MAIN) (NPNetscapeFuncs* nCallbacks, NPPluginFuncs* pCallbacks, NPP_ShutdownUPP* unloadUpp); #endif @@ -146,9 +146,8 @@ public: PRLibrary* aLibrary, nsIPlugin** aResult); -#if defined(XP_MAC) || defined(XP_MACOSX) - void - SetPluginRefNum(short aRefNum); +#ifdef XP_MACOSX + void SetPluginRefNum(short aRefNum); #endif protected: @@ -158,7 +157,7 @@ protected: static void CheckClassInitialized(void); -#if defined(XP_MAC) || defined(XP_MACOSX) +#ifdef XP_MACOSX short fPluginRefNum; #endif