SOURCES: kdebase-xembed.patch - up to version from 2007-12-14 09:...

arekm arekm at pld-linux.org
Wed Dec 19 09:07:20 CET 2007


Author: arekm                        Date: Wed Dec 19 08:07:20 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- up to version from  2007-12-14 09:31:20 MST

---- Files affected:
SOURCES:
   kdebase-xembed.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/kdebase-xembed.patch
diff -u SOURCES/kdebase-xembed.patch:1.1 SOURCES/kdebase-xembed.patch:1.2
--- SOURCES/kdebase-xembed.patch:1.1	Thu Dec 13 20:48:43 2007
+++ SOURCES/kdebase-xembed.patch	Wed Dec 19 09:07:15 2007
@@ -1,124 +1,1188 @@
---- nsplugins/viewer/nsplugin.h.sav	2007-12-05 16:02:28.000000000 +0100
-+++ nsplugins/viewer/nsplugin.h	2007-12-12 13:37:52.000000000 +0100
-@@ -165,13 +165,13 @@ public:
-   // constructor, destructor
-   NSPluginInstance( NPP privateData, NPPluginFuncs *pluginFuncs, KLibrary *handle,
- 		    int width, int height, QString src, QString mime,
--                    QString appId, QString callbackId, bool embed,
-+                    QString appId, QString callbackId, bool embed, WId xembed,
- 		    QObject *parent, const char* name=0 );
-   ~NSPluginInstance();
+--- nsplugins/sdk/npapi.h.sav	2007-12-07 16:50:16.000000000 +0100
++++ nsplugins/sdk/npapi.h	2007-12-14 13:54:58.000000000 +0100
+@@ -38,7 +38,7 @@
  
-   // DCOP functions
-   void shutdown();
--  int winId() { return XtWindow(_form); }
-+  int winId() { return _form != 0 ? XtWindow(_form) : 0; }
-   int setWindow(int remove=0);
-   void resizePlugin(int w, int h);
-   void javascriptResult(int id, QString result);
-@@ -232,6 +232,7 @@ private:
-   NPPluginFuncs _pluginFuncs;
  
-   Widget _area, _form, _toplevel;
-+  WId _xembed_window;
-   QString _baseURL;
-   int _width, _height;
+ /*
+- *  npapi.h $Revision$
++ *  npapi.h $Revision$
+  *  Netscape client plug-in API spec
+  */
  
-@@ -281,7 +282,7 @@ public:
-   DCOPRef newInstance(QString url, QString mimeType, bool embed,
-                       QStringList argn, QStringList argv,
-                       QString appId, QString callbackId, bool reload, bool post,
--                      QByteArray postData );
-+                      QByteArray postData, long xembed );
-   void destroyInstance( NSPluginInstance* inst );
-   bool error() { return _error; }
+@@ -126,11 +126,11 @@
+ /*----------------------------------------------------------------------*/
  
---- nsplugins/viewer/Makefile.am.sav	2007-04-11 16:25:04.000000000 +0200
-+++ nsplugins/viewer/Makefile.am	2007-12-11 19:30:13.000000000 +0100
-@@ -1,12 +1,11 @@
--INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes)
-+INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) `pkg-config --cflags glib-2.0`
- METASOURCES = AUTO
+ #define NP_VERSION_MAJOR 0
+-#define NP_VERSION_MINOR 11
++#define NP_VERSION_MINOR 13
+ 
+ 
+ /* The OS/2 version of Netscape uses RC_DATA to define the
+-   mime types, file extentions, etc that are required.
++   mime types, file extensions, etc that are required.
+    Use a vertical bar to separate types, end types with \0.
+    FileVersion and ProductVersion are 32bit ints, all other
+    entries are strings the MUST be terminated wwith a \0.
+@@ -387,7 +387,8 @@ typedef enum {
+ 
+   /* 12 and over are available on Mozilla builds starting with 0.9.9 */
+   NPPVjavascriptPushCallerBool = 12,
+-  NPPVpluginKeepLibraryInMemory = 13   /* available in Mozilla 1.0 */
++  NPPVpluginKeepLibraryInMemory = 13,   /* available in Mozilla 1.0 */
++  NPPVpluginNeedsXEmbed         = 14
+ } NPPVariable;
+ 
+ /*
+@@ -404,10 +405,20 @@ typedef enum {
+   /* 10 and over are available on Mozilla builds starting with 0.9.4 */
+   NPNVserviceManager = (10 | NP_ABI_MASK),
+   NPNVDOMElement     = (11 | NP_ABI_MASK),   /* available in Mozilla 1.2 */
+-  NPNVDOMWindow      = (12 | NP_ABI_MASK)
++  NPNVDOMWindow      = (12 | NP_ABI_MASK),
++  NPNVToolkit        = (13 | NP_ABI_MASK),
++  NPNVSupportsXEmbedBool = 14
+ } NPNVariable;
+ 
+ /*
++ * The type of Tookkit the widgets use
++ */
++typedef enum {
++  NPNVGtk12 = 1,
++  NPNVGtk2
++} NPNToolkitType;
++
++/*
+  * The type of a NPWindow - it specifies the type of the data structure
+  * returned in the window field.
+  */
+@@ -428,7 +439,7 @@ typedef struct _NPWindow
+   NPRect clipRect; /* Clipping rectangle in port coordinates */
+                    /* Used by MAC only.			  */
+ #if defined(XP_UNIX) && !defined(XP_MACOSX)
+-  void * ws_info; /* Platform-dependent additonal data */
++  void * ws_info; /* Platform-dependent additional data */
+ #endif /* XP_UNIX */
+   NPWindowType type; /* Is this a window or a drawable? */
+ } NPWindow;
+--- nsplugins/sdk/npupp.h.sav	2007-05-16 16:20:29.000000000 +0200
++++ nsplugins/sdk/npupp.h	2007-12-14 14:33:56.000000000 +0100
+@@ -1,11 +1,11 @@
+-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+ /* ***** BEGIN LICENSE BLOCK *****
+- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+  *
+- * The contents of this file are subject to the Netscape Public License
+- * Version 1.1 (the "License"); you may not use this file except in
+- * compliance with the License. You may obtain a copy of the License at
+- * http://www.mozilla.org/NPL/
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
+  *
+  * Software distributed under the License is distributed on an "AS IS" basis,
+  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+@@ -14,31 +14,30 @@
+  *
+  * The Original Code is mozilla.org code.
+  *
+- * The Initial Developer of the Original Code is 
++ * The Initial Developer of the Original Code is
+  * Netscape Communications Corporation.
+  * Portions created by the Initial Developer are Copyright (C) 1998
+  * the Initial Developer. All Rights Reserved.
+  *
+  * Contributor(s):
+  *
+- *
+  * Alternatively, the contents of this file may be used under the terms of
+  * either the GNU General Public License Version 2 or later (the "GPL"), or
+  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+  * in which case the provisions of the GPL or the LGPL are applicable instead
+  * of those above. If you wish to allow use of your version of this file only
+  * under the terms of either the GPL or the LGPL, and not to allow others to
+- * use your version of this file under the terms of the NPL, indicate your
++ * use your version of this file under the terms of the MPL, indicate your
+  * decision by deleting the provisions above and replace them with the notice
+  * and other provisions required by the GPL or the LGPL. If you do not delete
+  * the provisions above, a recipient may use your version of this file under
+- * the terms of any one of the NPL, the GPL or the LGPL.
++ * the terms of any one of the MPL, the GPL or the LGPL.
+  *
+  * ***** END LICENSE BLOCK ***** */
+ 
+ 
+ /*
+- *  npupp.h $Revision$
++ *  npupp.h $Revision$
+  *  function call mecahnics needed by platform specific glue code.
+  */
  
- bin_PROGRAMS = nspluginviewer 
+@@ -58,6 +57,8 @@
+ #include "npapi.h"
+ #endif
  
- nspluginviewer_SOURCES = NSPluginCallbackIface.stub NSPluginClassIface.skel \
--	nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp
--nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic
-+	nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp glibevents.cpp
-+nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic `pkg-config --libs glib-2.0`
- nspluginviewer_LDADD = $(LIB_KIO) $(LIB_KPARTS) -lXt
++#include "npruntime.h"
++
+ #include "jri.h"
  
- NSPluginCallbackIface_DIR = $(srcdir)/..
+ /******************************************************************************************
+@@ -72,7 +73,6 @@
+ 
+ /* NPP_Initialize */
+ 
+-/*#define _NPUPP_USE_UPP_ (TARGET_RT_MAC_CFM && !TARGET_API_MAC_CARBON)*/
+ #define _NPUPP_USE_UPP_ 0
+ 
+ #if _NPUPP_USE_UPP_
+@@ -488,8 +488,6 @@ typedef NPError	(* NP_LOADDS NPP_SetValu
+ #endif
+ 
+ 
+-
 -
---- nsplugins/viewer/viewer.cpp.sav	2007-12-11 15:56:33.000000000 +0100
-+++ nsplugins/viewer/viewer.cpp	2007-12-11 19:30:34.000000000 +0100
-@@ -87,6 +86,7 @@ static int x_errhandler(Display *dpy, XE
+ /*
+  *  Netscape entry points
   */
+@@ -1063,6 +1061,584 @@ typedef void (* NP_LOADDS NPN_ForceRedra
  
- static QCString g_dcopId;
-+int nspluginwrapper_windowId;
+ #endif
  
- /**
-  * parseCommandLine - get command line parameters
-@@ -101,6 +101,11 @@ void parseCommandLine(int argc, char *ar
-          g_dcopId = argv[i+1];
-          i++;
-       }
-+      if (!strcmp(argv[i], "-windowid") && (i+1 < argc))
-+      {
-+         nspluginwrapper_windowId = atoi(argv[i+1]);// long, atol
-+         i++;
-+      }
-    }
- }
++/* NPN_GetStringIdentifier */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_GetStringIdentifierUPP;
++enum {
++	uppNPN_GetStringIdentifierProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const NPUTF8*)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(NPIdentifier)))
++};
++
++#define NewNPN_GetStringIdentifierProc(FUNC)		\
++		(NPN_GetStringIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetStringIdentifierProcInfo, GetCurrentArchitecture())
++#define CallNPN_GetStringIdentifierProc(FUNC, ARG1)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetStringIdentifierProcInfo, (ARG1))	
++
++#else
++
++typedef NPIdentifier (* NP_LOADDS NPN_GetStringIdentifierUPP)(const NPUTF8* name);
++#define NewNPN_GetStringIdentifierProc(FUNC)		\
++		((NPN_GetStringIdentifierUPP) (FUNC))
++#define CallNPN_GetStringIdentifierProc(FUNC, ARG1)		\
++		(*(FUNC))((ARG1))
++
++#endif
++
++/* NPN_GetStringIdentifiers */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_GetStringIdentifiersUPP;
++enum {
++	uppNPN_GetStringIdentifiersProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const NPUTF8**)))
++		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(int32_t)))
++		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier*)))
++        | RESULT_SIZE(SIZE_CODE(0))
++};
++
++#define NewNPN_GetStringIdentifiersProc(FUNC)		\
++		(NPN_GetStringIdentifiersUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetStringIdentifiersProcInfo, GetCurrentArchitecture())
++#define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetStringIdentifiersProcInfo, (ARG1), (ARG2), (ARG3))	
++
++#else
++
++typedef void (* NP_LOADDS NPN_GetStringIdentifiersUPP)(const NPUTF8** names,
++                                                 int32_t nameCount,
++                                                 NPIdentifier* identifiers);
++#define NewNPN_GetStringIdentifiersProc(FUNC)		\
++		((NPN_GetStringIdentifiersUPP) (FUNC))
++#define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3)		\
++		(*(FUNC))((ARG1), (ARG2), (ARG3))
++
++#endif
++
++/* NPN_GetIntIdentifier */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_GetIntIdentifierUPP;
++enum {
++	uppNPN_GetIntIdentifierProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(int32_t)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(NPIdentifier)))
++};
++
++#define NewNPN_GetIntIdentifierProc(FUNC)		\
++		(NPN_GetIntIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetIntIdentifierProcInfo, GetCurrentArchitecture())
++#define CallNPN_GetIntIdentifierProc(FUNC, ARG1)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetIntIdentifierProcInfo, (ARG1))	
++
++#else
++
++typedef NPIdentifier (* NP_LOADDS NPN_GetIntIdentifierUPP)(int32_t intid);
++#define NewNPN_GetIntIdentifierProc(FUNC)		\
++		((NPN_GetIntIdentifierUPP) (FUNC))
++#define CallNPN_GetIntIdentifierProc(FUNC, ARG1)		\
++		(*(FUNC))((ARG1))
++
++#endif
++
++/* NPN_IdentifierIsString */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_IdentifierIsStringUPP;
++enum {
++	uppNPN_IdentifierIsStringProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier identifier)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(bool)))
++};
++
++#define NewNPN_IdentifierIsStringProc(FUNC)		\
++		(NPN_IdentifierIsStringUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_IdentifierIsStringProcInfo, GetCurrentArchitecture())
++#define CallNPN_IdentifierIsStringProc(FUNC, ARG1)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_IdentifierIsStringProcInfo, (ARG1))	
++
++#else
++
++typedef bool (* NP_LOADDS NPN_IdentifierIsStringUPP)(NPIdentifier identifier);
++#define NewNPN_IdentifierIsStringProc(FUNC)		\
++		((NPN_IdentifierIsStringUPP) (FUNC))
++#define CallNPN_IdentifierIsStringProc(FUNC, ARG1)		\
++		(*(FUNC))((ARG1))
++
++#endif
++
++/* NPN_UTF8FromIdentifier */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_UTF8FromIdentifierUPP;
++enum {
++	uppNPN_UTF8FromIdentifierProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(NPUTF8*)))
++};
++
++#define NewNPN_UTF8FromIdentifierProc(FUNC)		\
++		(NPN_UTF8FromIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UTF8FromIdentifierProcInfo, GetCurrentArchitecture())
++#define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UTF8FromIdentifierProcInfo, (ARG1))	
++
++#else
++
++typedef NPUTF8* (* NP_LOADDS NPN_UTF8FromIdentifierUPP)(NPIdentifier identifier);
++#define NewNPN_UTF8FromIdentifierProc(FUNC)		\
++		((NPN_UTF8FromIdentifierUPP) (FUNC))
++#define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1)		\
++		(*(FUNC))((ARG1))
++
++#endif
++
++/* NPN_IntFromIdentifier */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_IntFromIdentifierUPP;
++enum {
++	uppNPN_IntFromIdentifierProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(int32_t)))
++};
++
++#define NewNPN_IntFromIdentifierProc(FUNC)		\
++		(NPN_IntFromIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_IntFromIdentifierProcInfo, GetCurrentArchitecture())
++#define CallNPN_IntFromIdentifierProc(FUNC, ARG1)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_IntFromIdentifierProcInfo, (ARG1))	
++
++#else
++
++typedef int32_t (* NP_LOADDS NPN_IntFromIdentifierUPP)(NPIdentifier identifier);
++#define NewNPN_IntFromIdentifierProc(FUNC)		\
++		((NPN_IntFromIdentifierUPP) (FUNC))
++#define CallNPN_IntFromIdentifierProc(FUNC, ARG1)		\
++		(*(FUNC))((ARG1))
++
++#endif
++
++/* NPN_CreateObject */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_CreateObjectUPP;
++enum {
++	uppNPN_CreateObjectProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
++		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPClass*)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(NPObject*)))
++};
++
++#define NewNPN_CreateObjectProc(FUNC)		\
++		(NPN_CreateObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_CreateObjectProcInfo, GetCurrentArchitecture())
++#define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_CreateObjectProcInfo, (ARG1), (ARG2))	
++
++#else
++
++typedef NPObject* (* NP_LOADDS NPN_CreateObjectUPP)(NPP npp, NPClass *aClass);
++#define NewNPN_CreateObjectProc(FUNC)		\
++		((NPN_CreateObjectUPP) (FUNC))
++#define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2)		\
++		(*(FUNC))((ARG1), (ARG2))
++
++#endif
++
++/* NPN_RetainObject */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_RetainObjectUPP;
++enum {
++	uppNPN_RetainObjectProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(NPObject*)))
++};
++
++#define NewNPN_RetainObjectProc(FUNC)		\
++		(NPN_RetainObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RetainObjectProcInfo, GetCurrentArchitecture())
++#define CallNPN_RetainObjectProc(FUNC, ARG1)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RetainObjectProcInfo, (ARG1))	
++
++#else
++
++typedef NPObject* (* NP_LOADDS NPN_RetainObjectUPP)(NPObject *obj);
++#define NewNPN_RetainObjectProc(FUNC)		\
++		((NPN_RetainObjectUPP) (FUNC))
++#define CallNPN_RetainObjectProc(FUNC, ARG1)		\
++		(*(FUNC))((ARG1))
++
++#endif
++
++/* NPN_ReleaseObject */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_ReleaseObjectUPP;
++enum {
++	uppNPN_ReleaseObjectProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*)))
++		| RESULT_SIZE(SIZE_CODE(0))
++};
++
++#define NewNPN_ReleaseObjectProc(FUNC)		\
++		(NPN_ReleaseObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReleaseObjectProcInfo, GetCurrentArchitecture())
++#define CallNPN_ReleaseObjectProc(FUNC, ARG1)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReleaseObjectProcInfo, (ARG1))
++
++#else
++
++typedef void (* NP_LOADDS NPN_ReleaseObjectUPP)(NPObject *obj);
++#define NewNPN_ReleaseObjectProc(FUNC)		\
++		((NPN_ReleaseObjectUPP) (FUNC))
++#define CallNPN_ReleaseObjectProc(FUNC, ARG1)		\
++		(*(FUNC))((ARG1))
++
++#endif
++
++/* NPN_Invoke */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_InvokeUPP;
++enum {
++	uppNPN_InvokeProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
++		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*)))
++		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier)))
++		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*)))
++		| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint32_t)))
++		| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPVariant*)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(bool)))
++};
++
++#define NewNPN_InvokeProc(FUNC)		\
++		(NPN_InvokeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvokeProcInfo, GetCurrentArchitecture())
++#define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvokeProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
++
++#else
++
++typedef bool (* NP_LOADDS NPN_InvokeUPP)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result);
++#define NewNPN_InvokeProc(FUNC)		\
++		((NPN_InvokeUPP) (FUNC))
++#define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6)		\
++		(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
++
++#endif
++
++/* NPN_InvokeDefault */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_InvokeDefaultUPP;
++enum {
++	uppNPN_InvokeDefaultProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
++		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*)))
++		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*)))
++		| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint32_t)))
++		| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPVariant*)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(bool)))
++};
++
++#define NewNPN_InvokeDefaultProc(FUNC)		\
++		(NPN_InvokeDefaultUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvokeDefaultProcInfo, GetCurrentArchitecture())
++#define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvokeDefaultProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5))
++
++#else
++
++typedef bool (* NP_LOADDS NPN_InvokeDefaultUPP)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result);
++#define NewNPN_InvokeDefaultProc(FUNC)		\
++		((NPN_InvokeDefaultUPP) (FUNC))
++#define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5)		\
++		(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5))
++
++#endif
++
++/* NPN_Evaluate */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_EvaluateUPP;
++enum {
++	uppNPN_EvaluateProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
++		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*)))
++		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPString*)))
++		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPVariant*)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(bool)))
++};
++
++#define NewNPN_EvaluateProc(FUNC)		\
++		(NPN_EvaluateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_EvaluateProcInfo, GetCurrentArchitecture())
++#define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_EvaluateProcInfo, (ARG1), (ARG2), (ARG3), (ARG4))
++
++#else
++
++typedef bool (* NP_LOADDS NPN_EvaluateUPP)(NPP npp, NPObject *obj, NPString *script, NPVariant *result);
++#define NewNPN_EvaluateProc(FUNC)		\
++		((NPN_EvaluateUPP) (FUNC))
++#define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4)		\
++		(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
++
++#endif
++
++/* NPN_GetProperty */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_GetPropertyUPP;
++enum {
++	uppNPN_GetPropertyProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
++		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*)))
++		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier)))
++		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPVariant*)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(bool)))
++};
++
++#define NewNPN_GetPropertyProc(FUNC)		\
++		(NPN_GetPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetPropertyProcInfo, GetCurrentArchitecture())
++#define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetPropertyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4))
++
++#else
++
++typedef bool (* NP_LOADDS NPN_GetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result);
++#define NewNPN_GetPropertyProc(FUNC)		\
++		((NPN_GetPropertyUPP) (FUNC))
++#define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4)		\
++		(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
++
++#endif
++
++/* NPN_SetProperty */
++
++#if _NPUPP_USE_UPP_
++
++typedef UniversalProcPtr NPN_SetPropertyUPP;
++enum {
++	uppNPN_SetPropertyProcInfo = kThinkCStackBased
++		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
++		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*)))
++		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier)))
++		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*)))
++		| RESULT_SIZE(SIZE_CODE(sizeof(bool)))
++};
++
++#define NewNPN_SetPropertyProc(FUNC)		\
++		(NPN_SetPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetPropertyProcInfo, GetCurrentArchitecture())
++#define CallNPN_SetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4)		\
++		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetPropertyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4))
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kdebase-xembed.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list