[Xfce4-commits] <parole:master> Fix compilation with xulrunner 1.9.2

Ali noreply at xfce.org
Sat Nov 28 15:46:01 CET 2009


Updating branch refs/heads/master
         to 3a276b624edbbe9b6e72101ec8d1893fc854b0af (commit)
       from c621509e57d326d3134ea61cf783f2d9d311e5db (commit)

commit 3a276b624edbbe9b6e72101ec8d1893fc854b0af
Author: Ali <aliov at xfce.org>
Date:   Sat Nov 28 15:42:28 2009 +0100

    Fix compilation with xulrunner 1.9.2

 browser-plugin/Makefile.am      |    4 +--
 browser-plugin/np_entry.cpp     |    5 ++-
 browser-plugin/npn_gate.cpp     |   23 +++++++++-------
 browser-plugin/npp_gate.cpp     |   55 ++++++++++++++++++++++++-------------
 browser-plugin/npupp.h          |   58 ++++++++++++++-------------------------
 browser-plugin/parole-plugin.c  |   12 ++++----
 browser-plugin/parole-plugin.h  |   12 +++++---
 browser-plugin/plugin.cpp       |    6 ++--
 browser-plugin/plugin.h         |    9 +++---
 browser-plugin/plugin_setup.cpp |    2 +-
 browser-plugin/plugin_setup.h   |    2 +-
 browser-plugin/plugin_types.cpp |    2 +-
 12 files changed, 98 insertions(+), 92 deletions(-)

diff --git a/browser-plugin/Makefile.am b/browser-plugin/Makefile.am
index e1230ee..4a78bcc 100644
--- a/browser-plugin/Makefile.am
+++ b/browser-plugin/Makefile.am
@@ -7,7 +7,7 @@ DEFINES = -DMOZILLA_STRICT_API -DXP_UNIX
 # This is probably not the best thing, but the browser plugin 
 # fails to compile with --enable-debug=full so overried CXXFLAGS
 # to get rid of -Wundef -Wredundant-decls -Wmissing-declarations
-CXXFLAGS = -Wall
+CXXFLAGS = -Wall -g -O2 -DXFCE_DISABLE_DEPRECATED
 if DEBUG_BROWSER_PLUGIN
 CXXFLAGS += -Wextra -Wno-missing-field-initializers	\
 	-Wno-unused-parameter 				\
@@ -18,8 +18,6 @@ CXXFLAGS += -Wextra -Wno-missing-field-initializers	\
 	-fstack-protector -O0 -g3 -Werror
 endif
 
-CFLAGS=$(CXXFLAGS)
-
 INCLUDES =                                              \
         -fPIC                                           \
         -I$(top_builddir)                               \
diff --git a/browser-plugin/np_entry.cpp b/browser-plugin/np_entry.cpp
index 3e303c8..8acbe82 100644
--- a/browser-plugin/np_entry.cpp
+++ b/browser-plugin/np_entry.cpp
@@ -39,11 +39,12 @@
 //
 // Main plugin entry point implementation
 //
-#include "npapi.h"
+#include <npapi.h>
+#include <npfunctions.h>
 #include "npupp.h"
 
 #ifndef HIBYTE
-#define HIBYTE(x) ((((uint32)(x)) & 0xff00) >> 8)
+#define HIBYTE(x) ((((uint32_t)(x)) & 0xff00) >> 8)
 #endif
 
 NPNetscapeFuncs NPNFuncs;
diff --git a/browser-plugin/npn_gate.cpp b/browser-plugin/npn_gate.cpp
index df3f14a..e3ed16b 100644
--- a/browser-plugin/npn_gate.cpp
+++ b/browser-plugin/npn_gate.cpp
@@ -39,11 +39,12 @@
 //
 // Implementation of Netscape entry points (NPN_*)
 //
-#include "npapi.h"
-#include "npupp.h"
+#include <npapi.h>
+//#include "npupp.h"
+#include <npfunctions.h>
 
 #ifndef HIBYTE
-#define HIBYTE(x) ((((uint32)(x)) & 0xff00) >> 8)
+#define HIBYTE(x) ((((uint32_t)(x)) & 0xff00) >> 8)
 #endif
 
 #ifndef LOBYTE
@@ -78,7 +79,7 @@ NPError NPN_GetURL(NPP instance, const char *url, const char *target)
     return rv;
 }
 
-NPError NPN_PostURLNotify(NPP instance, const char *url, const char *window, uint32 len,
+NPError NPN_PostURLNotify(NPP instance, const char *url, const char *window, uint32_t len,
                           const char *buf, NPBool file, void *notifyData)
 {
     int navMinorVers = NPNFuncs.version & 0xFF;
@@ -92,7 +93,7 @@ NPError NPN_PostURLNotify(NPP instance, const char *url, const char *window, uin
     return rv;
 }
 
-NPError NPN_PostURL(NPP instance, const char *url, const char *window, uint32 len, const char *buf,
+NPError NPN_PostURL(NPP instance, const char *url, const char *window, uint32_t len, const char *buf,
                     NPBool file)
 {
     NPError rv = NPNFuncs.posturl(instance, url, window, len, buf, file);
@@ -119,10 +120,10 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, const char *target, NPStrea
     return rv;
 }
 
-int32 NPN_Write(NPP instance, NPStream * stream, int32 len, void *buffer)
+int32_t NPN_Write(NPP instance, NPStream * stream, int32_t len, void *buffer)
 {
     int navMinorVersion = NPNFuncs.version & 0xFF;
-    int32 rv = 0;
+    int32_t rv = 0;
 
     if (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
         rv = NPNFuncs.write(instance, stream, len, buffer);
@@ -157,7 +158,7 @@ const char *NPN_UserAgent(NPP instance)
     return rv;
 }
 
-void *NPN_MemAlloc(uint32 size)
+void *NPN_MemAlloc(uint32_t size)
 {
     void *rv = NULL;
     rv = NPNFuncs.memalloc(size);
@@ -169,9 +170,9 @@ void NPN_MemFree(void *ptr)
     NPNFuncs.memfree(ptr);
 }
 
-uint32 NPN_MemFlush(uint32 size)
+uint32_t NPN_MemFlush(uint32_t size)
 {
-    uint32 rv = NPNFuncs.memflush(size);
+    uint32_t rv = NPNFuncs.memflush(size);
     return rv;
 }
 
@@ -180,6 +181,7 @@ void NPN_ReloadPlugins(NPBool reloadPages)
     NPNFuncs.reloadplugins(reloadPages);
 }
 
+/*
 JRIEnv *NPN_GetJavaEnv(void)
 {
     JRIEnv *rv = NULL;
@@ -193,6 +195,7 @@ jref NPN_GetJavaPeer(NPP instance)
     rv = NPNFuncs.getJavaPeer(instance);
     return rv;
 }
+*/
 
 NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
 {
diff --git a/browser-plugin/npp_gate.cpp b/browser-plugin/npp_gate.cpp
index 239765c..3fbb03b 100644
--- a/browser-plugin/npp_gate.cpp
+++ b/browser-plugin/npp_gate.cpp
@@ -64,14 +64,14 @@ void NPP_Shutdown(void)
 // will do all the neccessary job
 NPError NPP_New(NPMIMEType pluginType,
                 NPP instance,
-                uint16 mode, int16 argc, char *argn[], char *argv[], NPSavedData * saved)
+                uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData * saved)
 {
     if (instance == NULL)
         return NPERR_INVALID_INSTANCE_ERROR;
 
     NPError rv = NPERR_NO_ERROR;
 
-    g_debug ("NPP_New instance");
+    printf("NPP_New called\n");
     CPlugin *pPlugin = new CPlugin(instance);
     if (pPlugin == NULL)
         return NPERR_OUT_OF_MEMORY_ERROR;
@@ -132,6 +132,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow * pNPWindow)
 
     // window resized
     if (pPlugin->isInitialized() && (pNPWindow->window != NULL)) {
+        printf("Window resized\n");
         pPlugin->SetWindow(pNPWindow);
         return NPERR_NO_ERROR;
     }
@@ -161,6 +162,7 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
         CPlugin *plugin = (CPlugin *) instance->pdata;
         if (plugin == NULL)
             return NPERR_GENERIC_ERROR;
+        //*(NPObject **) value = plugin->GetScriptableObject();
     } else {
         rv = PluginGetValue(variable, value);
     }
@@ -169,7 +171,7 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
 }
 
 NPError NPP_NewStream(NPP instance,
-                      NPMIMEType type, NPStream * stream, NPBool seekable, uint16 * stype)
+                      NPMIMEType type, NPStream * stream, NPBool seekable, uint16_t * stype)
 {
     if (instance == NULL)
         return NPERR_INVALID_INSTANCE_ERROR;
@@ -186,34 +188,36 @@ NPError NPP_NewStream(NPP instance,
     return rv;
 }
 
-int32 NPP_WriteReady(NPP instance, NPStream * stream)
+int32_t NPP_WriteReady(NPP instance, NPStream * stream)
 {
     if (instance == NULL)
         return NPERR_INVALID_INSTANCE_ERROR;
 
-    int32 rv = 0x0fffffff;
+    int32_t rv = 0x0fffffff;
     CPlugin *pPlugin = (CPlugin *) instance->pdata;
 
     if (pPlugin == NULL)
         return NPERR_GENERIC_ERROR;
 
     rv = pPlugin->WriteReady(stream);
+    // printf("rv = %i\n",rv);
 
     return rv;
 }
 
-int32 NPP_Write(NPP instance, NPStream * stream, int32 offset, int32 len, void *buffer)
+int32_t NPP_Write(NPP instance, NPStream * stream, int32_t offset, int32_t len, void *buffer)
 {
     if (instance == NULL)
         return NPERR_INVALID_INSTANCE_ERROR;
 
-    int32 rv = len;
+    int32_t rv = len;
     CPlugin *pPlugin = (CPlugin *) instance->pdata;
 
     if (pPlugin == NULL)
         return NPERR_GENERIC_ERROR;
 
     rv = pPlugin->Write(stream, offset, len, buffer);
+    // printf("rv = %i\n", rv);
     return rv;
 }
 
@@ -236,10 +240,6 @@ void NPP_StreamAsFile(NPP instance, NPStream * stream, const char *fname)
 {
     if (instance == NULL)
         return;
-	
-    CPlugin *pPlugin = (CPlugin *) instance->pdata;
-    
-    pPlugin->StreamAsFile (stream, fname);
 }
 
 void NPP_Print(NPP instance, NPPrint * printInfo)
@@ -271,18 +271,35 @@ NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
     return rv;
 }
 
-int16 NPP_HandleEvent(NPP instance, void *event)
+int16_t NPP_HandleEvent(NPP instance, void *event)
 {
     if (instance == NULL)
         return 0;
-
-    int16 rv = 0;
-    /*
+/*
+    int16_t rv = 0;
     CPlugin *pPlugin = (CPlugin *) instance->pdata;
-    
     if (pPlugin)
-	rv = pPlugin->handleEvent(event);
-    */
+        rv = pPlugin->handleEvent(event);
+*/
+    return 0;
+}
 
-    return rv;
+/*
+jref NPP_GetJavaClass (void)
+{
+  return NULL;
+}
+*/
+
+NPObject *NPP_GetScriptableInstance(NPP instance)
+{
+    if (!instance)
+        return 0;
+/*
+    NPObject *npobj = 0;
+    CPlugin *pPlugin = (CPlugin *) instance->pdata;
+    if (!pPlugin)
+        npobj = pPlugin->GetScriptableObject();
+*/
+    return 0;
 }
diff --git a/browser-plugin/npupp.h b/browser-plugin/npupp.h
index a8ccaaf..9d1f25b 100644
--- a/browser-plugin/npupp.h
+++ b/browser-plugin/npupp.h
@@ -59,8 +59,6 @@
 
 #include "npruntime.h"
 
-#include "jri.h"
-
 
 /******************************************************************************************
    plug-in function table macros
@@ -86,8 +84,8 @@ typedef void (*NP_LOADDS NPP_ShutdownUPP) (void);
 		(*(FUNC))()
 
 /* NPP_New */
-typedef NPError(*NP_LOADDS NPP_NewUPP) (NPMIMEType pluginType, NPP instance, uint16 mode,
-                                        int16 argc, char *argn[], char *argv[],
+typedef NPError(*NP_LOADDS NPP_NewUPP) (NPMIMEType pluginType, NPP instance, uint16_t mode,
+                                        int16_t argc, char *argn[], char *argv[],
                                         NPSavedData * saved);
 #define NewNPP_NewProc(FUNC)		\
 		((NPP_NewUPP) (FUNC))
@@ -110,7 +108,7 @@ typedef NPError(*NP_LOADDS NPP_SetWindowUPP) (NPP instance, NPWindow * window);
 
 /* NPP_NewStream */
 typedef NPError(*NP_LOADDS NPP_NewStreamUPP) (NPP instance, NPMIMEType type, NPStream * stream,
-                                              NPBool seekable, uint16 * stype);
+                                              NPBool seekable, uint16_t * stype);
 #define NewNPP_NewStreamProc(FUNC)		\
 		((NPP_NewStreamUPP) (FUNC))
 #define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \
@@ -124,14 +122,14 @@ typedef NPError(*NP_LOADDS NPP_DestroyStreamUPP) (NPP instance, NPStream * strea
 		(*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg))
 
 /* NPP_WriteReady */
-typedef int32(*NP_LOADDS NPP_WriteReadyUPP) (NPP instance, NPStream * stream);
+typedef int32_t(*NP_LOADDS NPP_WriteReadyUPP) (NPP instance, NPStream * stream);
 #define NewNPP_WriteReadyProc(FUNC)		\
 		((NPP_WriteReadyUPP) (FUNC))
 #define CallNPP_WriteReadyProc(FUNC,  NPParg, NPStreamPtr)		\
 		(*(FUNC))((NPParg), (NPStreamPtr))
 
 /* NPP_Write */
-typedef int32(*NP_LOADDS NPP_WriteUPP) (NPP instance, NPStream * stream, int32 offset, int32 len,
+typedef int32_t(*NP_LOADDS NPP_WriteUPP) (NPP instance, NPStream * stream, int32_t offset, int32_t len,
                                         void *buffer);
 #define NewNPP_WriteProc(FUNC)		\
 		((NPP_WriteUPP) (FUNC))
@@ -153,7 +151,7 @@ typedef void (*NP_LOADDS NPP_PrintUPP) (NPP instance, NPPrint * platformPrint);
 		(*(FUNC))((NPParg), (NPPrintArg))
 
 /* NPP_HandleEvent */
-typedef int16(*NP_LOADDS NPP_HandleEventUPP) (NPP instance, void *event);
+typedef int16_t(*NP_LOADDS NPP_HandleEventUPP) (NPP instance, void *event);
 #define NewNPP_HandleEventProc(FUNC)		\
 		((NPP_HandleEventUPP) (FUNC))
 #define CallNPP_HandleEventProc(FUNC,  NPParg, voidPtr)		\
@@ -210,7 +208,7 @@ typedef NPError(*NP_LOADDS NPN_GetURLNotifyUPP) (NPP instance, const char *url,
 
 /* NPN_PostUrlNotify */
 typedef NPError(*NP_LOADDS NPN_PostURLNotifyUPP) (NPP instance, const char *url, const char *window,
-                                                  uint32 len, const char *buf, NPBool file,
+                                                  uint32_t len, const char *buf, NPBool file,
                                                   void *notifyData);
 #define NewNPN_PostURLNotifyProc(FUNC)		\
 		((NPN_PostURLNotifyUPP) (FUNC))
@@ -226,7 +224,7 @@ typedef NPError(*NP_LOADDS NPN_GetURLUPP) (NPP instance, const char *url, const
 
 /* NPN_PostUrl */
 typedef NPError(*NP_LOADDS NPN_PostURLUPP) (NPP instance, const char *url, const char *window,
-                                            uint32 len, const char *buf, NPBool file);
+                                            uint32_t len, const char *buf, NPBool file);
 #define NewNPN_PostURLProc(FUNC)		\
 		((NPN_PostURLUPP) (FUNC))
 #define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
@@ -248,7 +246,7 @@ typedef NPError(*NP_LOADDS NPN_NewStreamUPP) (NPP instance, NPMIMEType type, con
 		(*(FUNC))((npp), (type), (window), (stream))
 
 /* NPN_Write */
-typedef int32(*NP_LOADDS NPN_WriteUPP) (NPP instance, NPStream * stream, int32 len, void *buffer);
+typedef int32_t(*NP_LOADDS NPN_WriteUPP) (NPP instance, NPStream * stream, int32_t len, void *buffer);
 #define NewNPN_WriteProc(FUNC)		\
 		((NPN_WriteUPP) (FUNC))
 #define CallNPN_WriteProc(FUNC, npp, stream, len, buffer)		\
@@ -276,7 +274,7 @@ typedef const char *(*NP_LOADDS NPN_UserAgentUPP) (NPP instance);
                 (*(FUNC))((ARG1))
 
 /* NPN_MemAlloc */
-typedef void *(*NP_LOADDS NPN_MemAllocUPP) (uint32 size);
+typedef void *(*NP_LOADDS NPN_MemAllocUPP) (uint32_t size);
 #define NewNPN_MemAllocProc(FUNC)		\
 		((NPN_MemAllocUPP) (FUNC))
 #define CallNPN_MemAllocProc(FUNC, ARG1)		\
@@ -290,7 +288,7 @@ typedef void (*NP_LOADDS NPN_MemFreeUPP) (void *ptr);
 		(*(FUNC))((ARG1))
 
 /* NPN_MemFlush */
-typedef uint32(*NP_LOADDS NPN_MemFlushUPP) (uint32 size);
+typedef uint32_t(*NP_LOADDS NPN_MemFlushUPP) (uint32_t size);
 #define NewNPN_MemFlushProc(FUNC)		\
 		((NPN_MemFlushUPP) (FUNC))
 #define CallNPN_MemFlushProc(FUNC, ARG1)		\
@@ -303,20 +301,6 @@ typedef void (*NP_LOADDS NPN_ReloadPluginsUPP) (NPBool reloadPages);
 #define CallNPN_ReloadPluginsProc(FUNC, ARG1)		\
 		(*(FUNC))((ARG1))
 
-/* NPN_GetJavaEnv */
-typedef JRIEnv *(*NP_LOADDS NPN_GetJavaEnvUPP) (void);
-#define NewNPN_GetJavaEnvProc(FUNC)		\
-		((NPN_GetJavaEnvUPP) (FUNC))
-#define CallNPN_GetJavaEnvProc(FUNC)		\
-		(*(FUNC))()
-
-/* NPN_GetJavaPeer */
-typedef jref(*NP_LOADDS NPN_GetJavaPeerUPP) (NPP instance);
-#define NewNPN_GetJavaPeerProc(FUNC)		\
-		((NPN_GetJavaPeerUPP) (FUNC))
-#define CallNPN_GetJavaPeerProc(FUNC, ARG1)		\
-		(*(FUNC))((ARG1))
-
 /* NPN_InvalidateRect */
 typedef void (*NP_LOADDS NPN_InvalidateRectUPP) (NPP instance, NPRect * rect);
 #define NewNPN_InvalidateRectProc(FUNC)		\
@@ -376,7 +360,7 @@ typedef NPUTF8 *(*NP_LOADDS NPN_UTF8FromIdentifierUPP) (NPIdentifier identifier)
 		(*(FUNC))((ARG1))
 
 /* NPN_IntFromIdentifier */
-typedef int32_t(*NP_LOADDS NPN_IntFromIdentifierUPP) (NPIdentifier identifier);
+typedef int32_t (*NP_LOADDS NPN_IntFromIdentifierUPP) (NPIdentifier identifier);
 #define NewNPN_IntFromIdentifierProc(FUNC)		\
 		((NPN_IntFromIdentifierUPP) (FUNC))
 #define CallNPN_IntFromIdentifierProc(FUNC, ARG1)		\
@@ -522,10 +506,10 @@ typedef bool(*NP_LOADDS NPN_ConstructUPP) (NPP npp, NPObject * obj, const NPVari
 /******************************************************************************************
  * The actual plugin function table definitions
  *******************************************************************************************/
-
+#ifdef DISABLE_THIS
 typedef struct _NPPluginFuncs {
-    uint16 size;
-    uint16 version;
+    uint16_t size;
+    uint16_t version;
     NPP_NewUPP newp;
     NPP_DestroyUPP destroy;
     NPP_SetWindowUPP setwindow;
@@ -543,8 +527,8 @@ typedef struct _NPPluginFuncs {
 } NPPluginFuncs;
 
 typedef struct _NPNetscapeFuncs {
-    uint16 size;
-    uint16 version;
+    uint16_t size;
+    uint16_t version;
     NPN_GetURLUPP geturl;
     NPN_PostURLUPP posturl;
     NPN_RequestReadUPP requestread;
@@ -591,7 +575,7 @@ typedef struct _NPNetscapeFuncs {
     // NPN_PluginThreadAsyncCallUPP pluginthreadasynccall;
     // NPN_ConstructUPP construct;
 } NPNetscapeFuncs;
-
+#endif
 
 #ifdef XP_MACOSX
 /******************************************************************************************
@@ -625,11 +609,11 @@ enum {
 };
 
 typedef struct _BPSupportedMIMETypes {
-    SInt32 structVersion;       /* struct version */
+    Sint32_t structVersion;       /* struct version */
     Handle typeStrings;         /* STR# formated handle, allocated by plug-in */
     Handle infoStrings;         /* STR# formated handle, allocated by plug-in */
 } BPSupportedMIMETypes;
-OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes * mimeInfo, UInt32 flags);
+OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes * mimeInfo, Uint32_t flags);
 
  /* NP_GetMIMEDescription */
 #define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription"
@@ -640,7 +624,7 @@ typedef const char *(*NP_LOADDS NP_GetMIMEDescriptionUPP) ();
 		(*(FUNC))()
 
 /* BP_GetSupportedMIMETypes */
-typedef OSErr(*NP_LOADDS BP_GetSupportedMIMETypesUPP) (BPSupportedMIMETypes *, UInt32);
+typedef OSErr(*NP_LOADDS BP_GetSupportedMIMETypesUPP) (BPSupportedMIMETypes *, Uint32_t);
 #define NewBP_GetSupportedMIMETypesEntryProc(FUNC)		\
 		((BP_GetSupportedMIMETypesUPP) (FUNC))
 #define CallBP_GetMIMEDescEntryProc(FUNC,  mimeInfo, flags)		\
diff --git a/browser-plugin/parole-plugin.c b/browser-plugin/parole-plugin.c
index 2ec8d8d..30e8609 100644
--- a/browser-plugin/parole-plugin.c
+++ b/browser-plugin/parole-plugin.c
@@ -36,7 +36,7 @@
 
 #include "parole-plugin.h"
 
-int32 STREAMBUFSIZE = 0x0FFFFFFF;
+static int32_t STREAMBUFSIZE = 0x0FFFFFFF;
 
 static void parole_plugin_finalize   (GObject *object);
 
@@ -425,7 +425,7 @@ void parole_plugin_stream_as_file (ParolePlugin *plugin,
     g_debug ("StreamAsFile url=%s fname=%s", stream->url, fname);
 }
 
-int32 parole_plugin_write_ready	(ParolePlugin *plugin, NPStream *stream)
+int32_t parole_plugin_write_ready	(ParolePlugin *plugin, NPStream *stream)
 {
     g_debug ("WriteReady url=%s", stream->url);
     
@@ -438,13 +438,13 @@ int32 parole_plugin_write_ready	(ParolePlugin *plugin, NPStream *stream)
     return  plugin->player_ready ? STREAMBUFSIZE  : 0;
 }
 								 
-int32 parole_plugin_write (ParolePlugin *plugin, 
+int32_t parole_plugin_write (ParolePlugin *plugin, 
 			   NPStream * stream, 
-			   int32 offset, 
-			   int32 len, 
+			   int32_t offset, 
+			   int32_t len, 
 			   void *buffer)
 {
-    static int32 wrotebytes = -1;
+    static int32_t wrotebytes = -1;
     
     if ( plugin->checked == FALSE )
     {
diff --git a/browser-plugin/parole-plugin.h b/browser-plugin/parole-plugin.h
index 75aee42..daee5a3 100644
--- a/browser-plugin/parole-plugin.h
+++ b/browser-plugin/parole-plugin.h
@@ -25,7 +25,9 @@
 
 #include <npapi.h>
 #include <npruntime.h>
-#include "npupp.h"
+#include <npfunctions.h>
+
+#include <stdint.h>
 
 G_BEGIN_DECLS
 
@@ -62,13 +64,13 @@ void				parole_plugin_stream_as_file	(ParolePlugin *plugin,
 								 NPStream *stream,
 								 const gchar *fname);
 
-int32				parole_plugin_write_ready	(ParolePlugin *plugin,
+int32_t				parole_plugin_write_ready	(ParolePlugin *plugin,
 								 NPStream *stream);
 								 
-int32   			parole_plugin_write             (ParolePlugin *plugin,
+int32_t   			parole_plugin_write             (ParolePlugin *plugin,
 								 NPStream * stream, 
-								 int32 offset, 
-								 int32 len, 
+								 int32_t offset, 
+								 int32_t len, 
 								 void *buffer);
 
 G_END_DECLS
diff --git a/browser-plugin/plugin.cpp b/browser-plugin/plugin.cpp
index ccde40d..d44104d 100644
--- a/browser-plugin/plugin.cpp
+++ b/browser-plugin/plugin.cpp
@@ -107,7 +107,7 @@ NPBool CPlugin::isInitialized()
     return mInitialized;
 }
 
-NPError CPlugin::NewStream (NPMIMEType type, NPStream * stream, NPBool seekable, uint16 * stype)
+NPError CPlugin::NewStream (NPMIMEType type, NPStream * stream, NPBool seekable, uint16_t * stype)
 {
     return parole_plugin_new_stream (plugin, stream, type);
 }
@@ -127,12 +127,12 @@ void CPlugin::StreamAsFile  (NPStream * stream, const char *fname)
     parole_plugin_stream_as_file (plugin, stream, fname);
 }
 
-int32 CPlugin::WriteReady (NPStream * stream)
+int32_t CPlugin::WriteReady (NPStream * stream)
 {
     return parole_plugin_write_ready (plugin, stream);
 }
     
-int32 CPlugin::Write (NPStream * stream, int32 offset, int32 len, void *buffer)
+int32_t CPlugin::Write (NPStream * stream, int32_t offset, int32_t len, void *buffer)
 {
     return parole_plugin_write (plugin, stream, offset, len, buffer);
 }
diff --git a/browser-plugin/plugin.h b/browser-plugin/plugin.h
index 9a1bce1..29e0318 100644
--- a/browser-plugin/plugin.h
+++ b/browser-plugin/plugin.h
@@ -45,6 +45,7 @@
 #include <X11/Xlib.h>
 
 #include <glib.h>
+#include <stdint.h>
 
 #include "parole-plugin.h"
 
@@ -65,17 +66,17 @@ class CPlugin {
     NPError GetValue 	  (NPPVariable variable, void *value);
     
     NPError SetWindow 	  (NPWindow * aWindow);
-    NPError NewStream     (NPMIMEType type, NPStream * stream, NPBool seekable, uint16 * stype);
+    NPError NewStream     (NPMIMEType type, NPStream * stream, NPBool seekable, uint16_t * stype);
     NPError DestroyStream (NPStream * stream, NPError reason);
     void    URLNotify     (const char *url, NPReason reason, void *notifyData);
     void    StreamAsFile  (NPStream * stream, const char *fname);
-    int32   WriteReady    (NPStream * stream);
-    int32   Write         (NPStream * stream, int32 offset, int32 len, void *buffer);
+    int32_t WriteReady    (NPStream * stream);
+    int32_t Write         (NPStream * stream, int32_t offset, int32_t len, void *buffer);
     
   public:
     ParolePlugin    *plugin;
     NPP mInstance;
-    uint16 mode;
+    uint16_t mode;
     gchar *mimetype;
 };
 
diff --git a/browser-plugin/plugin_setup.cpp b/browser-plugin/plugin_setup.cpp
index f6f0f19..735de4b 100644
--- a/browser-plugin/plugin_setup.cpp
+++ b/browser-plugin/plugin_setup.cpp
@@ -39,7 +39,7 @@
 #include "plugin_setup.h"
 
 // void new_instance(CPlugin * instance, nsPluginCreateData * parameters)
-void new_instance(CPlugin * instance, int16 argc, char *argn[], char *argv[])
+void new_instance(CPlugin * instance, int16_t argc, char *argn[], char *argv[])
 {
 }
 
diff --git a/browser-plugin/plugin_setup.h b/browser-plugin/plugin_setup.h
index 6626cdd..7f739ec 100644
--- a/browser-plugin/plugin_setup.h
+++ b/browser-plugin/plugin_setup.h
@@ -38,7 +38,7 @@
 #ifndef _PLUGIN_SETUP_H
 #define _PLUGIN_SETUP_H
 
-void new_instance(CPlugin * instance, int16 argc, char *argn[], char *argv[]);
+void new_instance(CPlugin * instance, int16_t argc, char *argn[], char *argv[]);
 gint streaming(gchar * url);
 
 #endif                          // _PLUGIN_SETUP_H
diff --git a/browser-plugin/plugin_types.cpp b/browser-plugin/plugin_types.cpp
index 4bd7c14..9b6f06a 100644
--- a/browser-plugin/plugin_types.cpp
+++ b/browser-plugin/plugin_types.cpp
@@ -122,7 +122,7 @@ NPError PluginGetValue(NPPVariable variable, void *value)
     }
 
     if (variable == NPPVpluginNeedsXEmbed) {
-        *((PRBool *) value) = PR_TRUE;
+        *((bool *) value) = TRUE;
     }
 
     if ((variable != NPPVpluginNameString)



More information about the Xfce4-commits mailing list