clean up old Mac classic code and fix nsplugin.h interface comment to point out that it was a failed experiment. b=281889 r=mento sr=pinkerton
git-svn-id: svn://10.0.0.236/trunk@202067 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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 <Quickdraw.h>
|
||||
#include <Events.h>
|
||||
#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 */
|
||||
|
||||
@@ -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
|
||||
*******************************************************************************************/
|
||||
|
||||
@@ -35,20 +35,17 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
/* INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API)
|
||||
*
|
||||
* <P>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.
|
||||
*
|
||||
* <P>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
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#include "prtypes.h"
|
||||
#endif
|
||||
|
||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||
#ifdef XP_MACOSX
|
||||
# include <Quickdraw.h>
|
||||
# include <Events.h>
|
||||
# include <MacWindows.h>
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user