summaryrefslogtreecommitdiff
path: root/extensions/source/plugin/inc
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2008-11-20 13:15:41 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2008-11-20 13:15:41 +0000
commit813bf83f9420868f903e88cb47f68c1ebb51ae86 (patch)
tree614c44374e319ab3aada88f8514b68da4dabc81e /extensions/source/plugin/inc
parentda36515d3f7e4a3eaa0aa56bd85e3b646615b4fb (diff)
CWS-TOOLING: integrate CWS swffixes_DEV300
Diffstat (limited to 'extensions/source/plugin/inc')
-rw-r--r--extensions/source/plugin/inc/plugin/unx/mediator.hxx9
-rw-r--r--extensions/source/plugin/inc/plugin/unx/plugcon.hxx45
2 files changed, 37 insertions, 17 deletions
diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx
index 01c1db903..8d0840fcb 100644
--- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: mediator.hxx,v $
- * $Revision: 1.8 $
+ * $Revision: 1.8.90.1 $
*
* This file is part of OpenOffice.org.
*
@@ -33,7 +33,6 @@
#include <string.h>
#include <stdarg.h>
#include <tools/string.hxx>
-#include <tools/list.hxx>
#include <tools/link.hxx>
#include <vos/pipe.hxx>
#include <vos/mutex.hxx>
@@ -43,6 +42,8 @@
#include <stdio.h>
#endif
+#include <vector>
+
struct MediatorMessage
{
ULONG m_nID;
@@ -83,8 +84,6 @@ struct MediatorMessage
void Rewind() { m_pRun = NULL; }
};
-DECLARE_LIST( MediatorMessageList, MediatorMessage* )
-
class MediatorListener;
class Mediator
@@ -93,7 +92,7 @@ class Mediator
protected:
int m_nSocket;
- MediatorMessageList m_aMessageQueue;
+ std::vector<MediatorMessage*> m_aMessageQueue;
NAMESPACE_VOS(OMutex) m_aQueueMutex;
NAMESPACE_VOS(OMutex) m_aSendMutex;
// only one thread can send a message at any given time
diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
index 6b20dd436..5a83c95bd 100644
--- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: plugcon.hxx,v $
- * $Revision: 1.13 $
+ * $Revision: 1.13.90.3 $
*
* This file is part of OpenOffice.org.
*
@@ -34,7 +34,7 @@
#include <string.h>
#include <list>
-#include <tools/list.hxx>
+#include <vector>
#include <plugin/unx/mediator.hxx>
#if defined SOLARIS
@@ -82,6 +82,25 @@ extern "C" {
#include <npsdk/npupp.h>
}
#include <npapi.h>
+
+#if NP_VERSION_MINOR < 17
+// compatibility hack: compile with older NPN api header, but define
+// some later introduced constants
+// for gcc 3
+#define NP_ABI_MASK 0x10000000
+#define NPNVSupportsXEmbedBool ((NPNVariable)14)
+#define NPPVpluginNeedsXEmbed ((NPPVariable)14)
+#define NPNVToolkit ((int)(13 | NP_ABI_MASK))
+#define NPNVGtk12 1
+#define NPNVGtk2 2
+#endif
+#endif
+
+#ifdef ENABLE_GTK
+#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
+#else
+#define GtkWidget void
#endif
#undef Window
@@ -104,6 +123,11 @@ public:
void* pShell;
void* pWidget;
void* pForm;
+
+ GtkWidget* pGtkWindow;
+ GtkWidget* pGtkWidget;
+
+ bool bShouldUseXEmbed;
int nArg;
char** argn;
@@ -119,24 +143,18 @@ public:
~ConnectorInstance();
};
-class PluginConnector;
-
-DECLARE_LIST( NPStreamList, NPStream* )
-DECLARE_LIST( InstanceList, ConnectorInstance* )
-DECLARE_LIST( PluginConnectorList, PluginConnector* )
-
class PluginConnector : public Mediator
{
protected:
NAMESPACE_VOS(OMutex) m_aUserEventMutex;
- static PluginConnectorList allConnectors;
+ static std::vector<PluginConnector*> allConnectors;
DECL_LINK( NewMessageHdl, Mediator* );
DECL_LINK( WorkOnNewMessageHdl, Mediator* );
- NPStreamList m_aNPWrapStreams;
- InstanceList m_aInstances;
+ std::vector<NPStream*> m_aNPWrapStreams;
+ std::vector<ConnectorInstance*> m_aInstances;
ULONG FillBuffer( char*&, const char*, ULONG, va_list );
public:
@@ -155,7 +173,7 @@ public:
UINT32 GetStreamID( NPStream* pStream );
UINT32 GetNPPID( NPP );
- NPStreamList& getStreamList() { return m_aNPWrapStreams; }
+ std::vector<NPStream*>& getStreamList() { return m_aNPWrapStreams; }
NPError GetNPError( MediatorMessage* pMes )
{
@@ -170,6 +188,9 @@ public:
LINK( this, PluginConnector, WorkOnNewMessageHdl ).
Call( (Mediator*)this );
}
+
+ ConnectorInstance* getInstance( NPP );
+ ConnectorInstance* getInstanceById( UINT32 );
};
enum CommandAtoms