summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--third_party/npapi/bindings/npapi.h129
1 files changed, 62 insertions, 67 deletions
diff --git a/third_party/npapi/bindings/npapi.h b/third_party/npapi/bindings/npapi.h
index 2072d43f..f477653 100644
--- a/third_party/npapi/bindings/npapi.h
+++ b/third_party/npapi/bindings/npapi.h
@@ -38,7 +38,7 @@
#ifndef npapi_h_
#define npapi_h_
-#ifdef __OS2__
+#if defined(__OS2__)
#pragma pack(1)
#endif
@@ -54,13 +54,13 @@
/* END GOOGLE MODIFICATIONS */
-#if defined (__OS2__) || defined (OS2)
+#if defined(__OS2__) || defined(OS2)
#ifndef XP_OS2
#define XP_OS2 1
#endif
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__SYMBIAN32__)
#include <windows.h>
#ifndef XP_WIN
#define XP_WIN 1
@@ -75,15 +75,15 @@
#endif
/* END GOOGLE MODIFICATIONS */
-#ifdef __SYMBIAN32__
+#if defined(__SYMBIAN32__)
#ifndef XP_SYMBIAN
#define XP_SYMBIAN 1
#undef XP_WIN
#endif
#endif
-#if defined(__APPLE_CC__) && !defined(__MACOS_CLASSIC__) && !defined(XP_UNIX)
-# define XP_MACOSX
+#if defined(__APPLE_CC__) && !defined(XP_UNIX)
+#define XP_MACOSX
#endif
#if defined(XP_MACOSX) && defined(__LP64__)
@@ -91,7 +91,7 @@
#define NP_NO_CARBON
#endif
-#ifdef XP_MACOSX
+#if defined(XP_MACOSX)
#include <ApplicationServices/ApplicationServices.h>
#include <OpenGL/OpenGL.h>
#ifndef NP_NO_CARBON
@@ -261,7 +261,7 @@ typedef struct _NPSize
/* Exact meaning must be spec'd in event model. */
#define kNPEventStartIME 2
-#ifdef XP_UNIX
+#if defined(XP_UNIX)
/*
* Unix specific structures and definitions
*/
@@ -293,7 +293,7 @@ typedef struct
#endif /* XP_UNIX */
-#ifdef XP_MACOSX
+#if defined(XP_MACOSX)
typedef enum {
#ifndef NP_NO_QUICKDRAW
NPDrawingModelQuickDraw = 0,
@@ -335,7 +335,7 @@ typedef enum {
#define _NP_ABI_MIXIN_FOR_GCC3 0
#endif
-#ifdef XP_MACOSX
+#if defined(XP_MACOSX)
#define NP_ABI_MACHO_MASK 0x01000000
#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK
#else
@@ -385,7 +385,7 @@ typedef enum {
/* Checks to see if the plug-in would like the browser to load the "src" attribute. */
NPPVpluginCancelSrcStream = 20
-#ifdef XP_MACOSX
+#if defined(XP_MACOSX)
/* Used for negotiating drawing models */
, NPPVpluginDrawingModel = 1000
/* Used for negotiating event models */
@@ -394,7 +394,7 @@ typedef enum {
, NPPVpluginCoreAnimationLayer = 1003
#endif
-#if (MOZ_PLATFORM_MAEMO == 5)
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
, NPPVpluginWindowlessLocalBool = 2002
#endif
} NPPVariable;
@@ -426,7 +426,7 @@ typedef enum {
NPNVprivateModeBool = 18
-#ifdef XP_MACOSX
+#if defined(XP_MACOSX)
/* Used for negotiating drawing models */
, NPNVpluginDrawingModel = 1000
#ifndef NP_NO_QUICKDRAW
@@ -440,7 +440,7 @@ typedef enum {
#endif
, NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */
#endif
-#if (MOZ_PLATFORM_MAEMO == 5)
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
, NPNVSupportsWindowlessLocal = 2002
#endif
} NPNVariable;
@@ -560,7 +560,7 @@ typedef RgnHandle NPQDRegion;
typedef CGPathRef NPCGRegion;
#elif defined(XP_WIN)
typedef HRGN NPRegion;
-#elif defined(XP_UNIX)
+#elif defined(XP_UNIX) && defined(MOZ_X11)
/* BEGIN GOOGLE MODIFICATIONS */
typedef struct _XRegion *Region;
/* END GOOGLE MODIFICATIONS */
@@ -575,7 +575,7 @@ typedef struct _NPNSString NPNSString;
typedef struct _NPNSWindow NPNSWindow;
typedef struct _NPNSMenu NPNSMenu;
-#ifdef XP_MACOSX
+#if defined(XP_MACOSX)
typedef NPNSMenu NPMenu;
#else
typedef void *NPMenu;
@@ -589,7 +589,7 @@ typedef enum {
NPCoordinateSpaceFlippedScreen
} NPCoordinateSpace;
-#ifdef XP_MACOSX
+#if defined(XP_MACOSX)
#ifndef NP_NO_QUICKDRAW
typedef struct NP_Port
@@ -608,11 +608,7 @@ typedef struct NP_Port
typedef struct NP_CGContext
{
CGContextRef context;
-#ifdef NP_NO_CARBON
- NPNSWindow *window;
-#else
- void *window; /* A WindowRef or NULL for the Cocoa event model. */
-#endif
+ void *window; /* A WindowRef under the Carbon event model. */
} NP_CGContext;
/*
@@ -777,14 +773,14 @@ enum NPEventType {
#define NPVERS_HAS_ALL_NETWORK_STREAMS 20
#define NPVERS_HAS_URL_AND_AUTH_INFO 21
#define NPVERS_HAS_PRIVATE_MODE 22
-#define NPVERS_MACOSX_HAS_EVENT_MODELS 23
+#define NPVERS_MACOSX_HAS_COCOA_EVENTS 23
/*----------------------------------------------------------------------*/
/* Function Prototypes */
/*----------------------------------------------------------------------*/
-#if defined(_WINDOWS) && !defined(WIN32)
-#define NP_LOADDS _loadds
+#if defined(__OS2__)
+#define NP_LOADDS _System
#else
#define NP_LOADDS
#endif
@@ -795,12 +791,12 @@ extern "C" {
/* NPP_* functions are provided by the plugin and called by the navigator. */
-#ifdef XP_UNIX
+#if defined(XP_UNIX)
char* NPP_GetMIMEDescription(void);
#endif
-NPError NPP_Initialize(void);
-void NPP_Shutdown(void);
+NPError NP_LOADDS NPP_Initialize(void);
+void NP_LOADDS NPP_Shutdown(void);
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
uint16_t mode, int16_t argc, char* argn[],
char* argv[], NPSavedData* saved);
@@ -817,78 +813,77 @@ int32_t NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32_t offset,
void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
const char* fname);
void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
-int16_t NPP_HandleEvent(NPP instance, void* event);
+int16_t NP_LOADDS NPP_HandleEvent(NPP instance, void* event);
void NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
NPReason reason, void* notifyData);
-NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value);
-NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value);
+NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value);
+NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value);
/* NPN_* functions are provided by the navigator and called by the plugin. */
-
-void NPN_Version(int* plugin_major, int* plugin_minor,
+void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor,
int* netscape_major, int* netscape_minor);
-NPError NPN_GetURLNotify(NPP instance, const char* url,
+NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url,
const char* target, void* notifyData);
-NPError NPN_GetURL(NPP instance, const char* url,
+NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url,
const char* target);
-NPError NPN_PostURLNotify(NPP instance, const char* url,
+NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url,
const char* target, uint32_t len,
const char* buf, NPBool file,
void* notifyData);
-NPError NPN_PostURL(NPP instance, const char* url,
+NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url,
const char* target, uint32_t len,
const char* buf, NPBool file);
-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
-NPError NPN_NewStream(NPP instance, NPMIMEType type,
+NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
+NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type,
const char* target, NPStream** stream);
-int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len,
+int32_t NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32_t len,
void* buffer);
-NPError NPN_DestroyStream(NPP instance, NPStream* stream,
+NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream,
NPReason reason);
-void NPN_Status(NPP instance, const char* message);
-const char* NPN_UserAgent(NPP instance);
-void* NPN_MemAlloc(uint32_t size);
-void NPN_MemFree(void* ptr);
-uint32_t NPN_MemFlush(uint32_t size);
-void NPN_ReloadPlugins(NPBool reloadPages);
-NPError NPN_GetValue(NPP instance, NPNVariable variable,
+void NP_LOADDS NPN_Status(NPP instance, const char* message);
+const char* NP_LOADDS NPN_UserAgent(NPP instance);
+void* NP_LOADDS NPN_MemAlloc(uint32_t size);
+void NP_LOADDS NPN_MemFree(void* ptr);
+uint32_t NP_LOADDS NPN_MemFlush(uint32_t size);
+void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages);
+NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable,
void *value);
-NPError NPN_SetValue(NPP instance, NPPVariable variable,
+NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable,
void *value);
-void NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
-void NPN_InvalidateRegion(NPP instance,
+void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
+void NP_LOADDS NPN_InvalidateRegion(NPP instance,
NPRegion invalidRegion);
-void NPN_ForceRedraw(NPP instance);
-void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
-void NPN_PopPopupsEnabledState(NPP instance);
-void NPN_PluginThreadAsyncCall(NPP instance,
+void NP_LOADDS NPN_ForceRedraw(NPP instance);
+void NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
+void NP_LOADDS NPN_PopPopupsEnabledState(NPP instance);
+void NP_LOADDS NPN_PluginThreadAsyncCall(NPP instance,
void (*func) (void *),
void *userData);
-NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable,
- const char* url, char** value,
- uint32_t* len);
-NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable,
- const char* url, const char* value,
+NPError NP_LOADDS NPN_GetValueForURL(NPP instance, NPNURLVariable variable,
+ const char *url, char **value,
+ uint32_t *len);
+NPError NP_LOADDS NPN_SetValueForURL(NPP instance, NPNURLVariable variable,
+ const char *url, const char *value,
uint32_t len);
-NPError NPN_GetAuthenticationInfo(NPP instance,
+NPError NP_LOADDS NPN_GetAuthenticationInfo(NPP instance,
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);
-uint32_t NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
-void NPN_UnscheduleTimer(NPP instance, uint32_t timerID);
-NPError NPN_PopUpContextMenu(NPP instance, NPMenu* menu);
-NPBool NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace);
+ uint32_t *plen);
+uint32_t NP_LOADDS NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
+void NP_LOADDS NPN_UnscheduleTimer(NPP instance, uint32_t timerID);
+NPError NP_LOADDS NPN_PopUpContextMenu(NPP instance, NPMenu* menu);
+NPBool NP_LOADDS NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace);
#ifdef __cplusplus
} /* end extern "C" */
#endif
#endif /* RC_INVOKED */
-#ifdef __OS2__
+#if defined(__OS2__)
#pragma pack()
#endif