summaryrefslogtreecommitdiffstats
path: root/third_party/npapi/bindings/npapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/npapi/bindings/npapi.h')
-rw-r--r--third_party/npapi/bindings/npapi.h127
1 files changed, 46 insertions, 81 deletions
diff --git a/third_party/npapi/bindings/npapi.h b/third_party/npapi/bindings/npapi.h
index 1e6e7e2..bf4306d 100644
--- a/third_party/npapi/bindings/npapi.h
+++ b/third_party/npapi/bindings/npapi.h
@@ -43,6 +43,7 @@
#ifndef _NPAPI_H_
#define _NPAPI_H_
+#include "nptypes.h"
/* BEGIN GOOGLE MODIFICATIONS */
@@ -151,42 +152,6 @@
/* Definition of Basic Types */
/*----------------------------------------------------------------------*/
-/* QNX sets the _INT16 and friends defines, but does not typedef the types */
-#ifdef __QNXNTO__
-#undef _UINT16
-#undef _INT16
-#undef _UINT32
-#undef _INT32
-#endif
-
-#ifndef _UINT16
-#define _UINT16
-typedef unsigned short uint16;
-#endif
-
-#ifndef _UINT32
-#define _UINT32
-#ifdef __LP64__
-typedef unsigned int uint32;
-#else /* __LP64__ */
-typedef unsigned long uint32;
-#endif /* __LP64__ */
-#endif
-
-#ifndef _INT16
-#define _INT16
-typedef short int16;
-#endif
-
-#ifndef _INT32
-#define _INT32
-#ifdef __LP64__
-typedef int int32;
-#else /* __LP64__ */
-typedef long int32;
-#endif /* __LP64__ */
-#endif
-
#ifndef FALSE
#define FALSE (0)
#endif
@@ -198,8 +163,8 @@ typedef long int32;
#endif
typedef unsigned char NPBool;
-typedef int16 NPError;
-typedef int16 NPReason;
+typedef int16_t NPError;
+typedef int16_t NPReason;
typedef char* NPMIMEType;
@@ -231,8 +196,8 @@ typedef struct _NPStream
void* pdata; /* plug-in private data */
void* ndata; /* netscape private data */
const char* url;
- uint32 end;
- uint32 lastmodified;
+ uint32_t end;
+ uint32_t lastmodified;
void* notifyData;
const char* headers; /* Response headers from host.
* Exists only for >= NPVERS_HAS_RESPONSE_HEADERS.
@@ -249,25 +214,25 @@ typedef struct _NPStream
typedef struct _NPByteRange
{
- int32 offset; /* negative offset means from the end */
- uint32 length;
+ int32_t offset; /* negative offset means from the end */
+ uint32_t length;
struct _NPByteRange* next;
} NPByteRange;
typedef struct _NPSavedData
{
- int32 len;
+ int32_t len;
void* buf;
} NPSavedData;
typedef struct _NPRect
{
- uint16 top;
- uint16 left;
- uint16 bottom;
- uint16 right;
+ uint16_t top;
+ uint16_t left;
+ uint16_t bottom;
+ uint16_t right;
} NPRect;
@@ -288,7 +253,7 @@ enum {
typedef struct
{
- int32 type;
+ int32_t type;
} NPAnyCallbackStruct;
/* BEGIN GOOGLE MODIFICATIONS */
@@ -297,7 +262,7 @@ typedef struct _NPSetWindowCallbackStruct NPSetWindowCallbackStruct;
typedef struct
{
- int32 type;
+ int32_t type;
FILE* fp;
} NPPrintCallbackStruct;
@@ -516,25 +481,25 @@ typedef struct _NPNSMenu NPNSMenu;
typedef struct _NPCocoaEvent {
NPCocoaEventType type;
- uint32 version;
+ uint32_t version;
union {
struct {
- uint32 modifierFlags;
+ uint32_t modifierFlags;
double pluginX;
double pluginY;
- int32 buttonNumber;
- int32 clickCount;
+ int32_t buttonNumber;
+ int32_t clickCount;
double deltaX;
double deltaY;
double deltaZ;
} mouse;
struct {
- uint32 modifierFlags;
+ uint32_t modifierFlags;
NPNSString *characters;
NPNSString *charactersIgnoringModifiers;
NPBool isARepeat;
- uint16 keyCode;
+ uint16_t keyCode;
} key;
struct {
CGContextRef context;
@@ -558,10 +523,10 @@ typedef struct _NPCocoaEvent {
typedef struct _NPWindow
{
void* window; /* Platform specific window handle */
- int32 x; /* Position of top left corner relative */
- int32 y; /* to a netscape page. */
- uint32 width; /* Maximum window size */
- uint32 height;
+ int32_t x; /* Position of top left corner relative */
+ int32_t y; /* to a netscape page. */
+ uint32_t width; /* Maximum window size */
+ uint32_t height;
NPRect clipRect; /* Clipping rectangle in port coordinates */
/* Used by MAC only. */
#if defined(XP_UNIX) && !defined(XP_MACOSX)
@@ -586,7 +551,7 @@ typedef struct _NPEmbedPrint
typedef struct _NPPrint
{
- uint16 mode; /* NP_FULL or NP_EMBED */
+ uint16_t mode; /* NP_FULL or NP_EMBED */
union
{
NPFullPrint fullPrint; /* if mode is NP_FULL */
@@ -620,9 +585,9 @@ typedef EventRecord NPEvent;
#elif defined(XP_WIN)
typedef struct _NPEvent
{
- uint16 event;
- uint32 wParam;
- uint32 lParam;
+ uint16_t event;
+ uintptr_t wParam;
+ uintptr_t lParam;
} NPEvent;
#elif defined (XP_UNIX) && defined(MOZ_X11)
/* BEGIN GOOGLE MODIFICATIONS */
@@ -712,8 +677,8 @@ typedef struct NP_GLContext
typedef struct NP_Port
{
CGrafPtr port; /* Grafport */
- int32 portx; /* position inside the topmost window */
- int32 porty;
+ int32_t portx; /* position inside the topmost window */
+ int32_t porty;
} NP_Port;
#endif /* NP_NO_QUICKDRAW */
@@ -851,22 +816,22 @@ char* NPP_GetMIMEDescription(void);
NPError NPP_Initialize(void);
void NPP_Shutdown(void);
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
- uint16 mode, int16 argc, char* argn[],
+ uint16_t mode, int16_t argc, char* argn[],
char* argv[], NPSavedData* saved);
NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
NPStream* stream, NPBool seekable,
- uint16* stype);
+ uint16_t* stype);
NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream,
NPReason reason);
-int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
-int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset,
- int32 len, void* buffer);
+int32_t NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
+int32_t NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32_t offset,
+ int32_t len, void* buffer);
void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
const char* fname);
void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
-int16 NPP_HandleEvent(NPP instance, void* event);
+int16_t NPP_HandleEvent(NPP instance, void* event);
void NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
NPReason reason, void* notifyData);
jref NP_LOADDS NPP_GetJavaClass(void);
@@ -886,24 +851,24 @@ NPError NPN_GetURLNotify(NPP instance, const char* url,
NPError NPN_GetURL(NPP instance, const char* url,
const char* target);
NPError NPN_PostURLNotify(NPP instance, const char* url,
- const char* target, uint32 len,
+ const char* target, uint32_t len,
const char* buf, NPBool file,
void* notifyData);
NPError NPN_PostURL(NPP instance, const char* url,
- const char* target, uint32 len,
+ 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,
const char* target, NPStream** stream);
-int32 NPN_Write(NPP instance, NPStream* stream, int32 len,
+int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len,
void* buffer);
NPError 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 size);
+void* NPN_MemAlloc(uint32_t size);
void NPN_MemFree(void* ptr);
-uint32 NPN_MemFlush(uint32 size);
+uint32_t NPN_MemFlush(uint32_t size);
void NPN_ReloadPlugins(NPBool reloadPages);
JRIEnv* NPN_GetJavaEnv(void);
jref NPN_GetJavaPeer(NPP instance);
@@ -917,11 +882,11 @@ void NPN_ForceRedraw(NPP instance);
void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
void NPN_PopPopupsEnabledState(NPP instance);
void NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userData);
-NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32* len);
-NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char* url, const char* value, uint32 len);
-NPError NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char* host, int32 port, const char* scheme, const char *realm, char** username, uint32* ulen, char** password, uint32* plen);
-uint32 NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID));
-void NPN_UnscheduleTimer(NPP instance, uint32 timerID);
+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, uint32_t len);
+NPError 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);