summaryrefslogtreecommitdiff
path: root/vcl/inc/salinst.hxx
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-03-23 18:06:39 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-03-23 18:06:39 +0100
commitd67e92069b9fb109e33a5133326eef51bf99aeb8 (patch)
tree8e403c695b28b8ba6adf2dc305a5c62388f7ae01 /vcl/inc/salinst.hxx
parent4617694b3fd830c8560f8d75d5f6afca618a8d65 (diff)
parent78f80b020fe009bc48e9e5f8b7862de51f1f8381 (diff)
vcl2gnumake: rebase to DEV300m103
Diffstat (limited to 'vcl/inc/salinst.hxx')
-rw-r--r--vcl/inc/salinst.hxx38
1 files changed, 10 insertions, 28 deletions
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index e1ed7288651a..51f1f5b3b4e0 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -31,10 +31,12 @@
#include "com/sun/star/uno/Reference.hxx"
#include "vcl/sv.h"
+#include "vcl/displayconnectiondispatch.hxx"
#include "vcl/dllapi.h"
#include "tools/string.hxx"
+#include "rtl/ref.hxx"
#include "rtl/string.hxx"
#include <list>
@@ -68,23 +70,13 @@ namespace vos { class IMutex; }
// - SalInstance -
// ---------------
-class VCL_DLLPUBLIC SalInstance
+class VCL_PLUGIN_PUBLIC SalInstance
{
-public:
- typedef bool(*Callback)(void*,void*,int);
private:
- void* m_pEventInst;
- void* m_pErrorInst;
- Callback m_pEventCallback;
- Callback m_pErrorCallback;
+ rtl::Reference< vcl::DisplayConnectionDispatch > m_pEventInst;
public:
- SalInstance() :
- m_pEventInst( NULL ),
- m_pErrorInst( NULL ),
- m_pEventCallback( NULL ),
- m_pErrorCallback( NULL )
- {}
+ SalInstance() {}
virtual ~SalInstance();
// Frame
@@ -154,22 +146,12 @@ public:
// methods for XDisplayConnection
- // the parameters for the callbacks are:
- // void* pInst: pInstance form the SetCallback call
- // void* pEvent: address of the system specific event structure
- // int nBytes: length of the system specific event structure
- void SetEventCallback( void* pInstance, Callback pCallback )
- { m_pEventInst = pInstance; m_pEventCallback = pCallback; }
- Callback GetEventCallback() const
- { return m_pEventCallback; }
+ void SetEventCallback( rtl::Reference< vcl::DisplayConnectionDispatch > const & pInstance )
+ { m_pEventInst = pInstance; }
bool CallEventCallback( void* pEvent, int nBytes )
- { return m_pEventCallback ? m_pEventCallback( m_pEventInst, pEvent, nBytes ) : false; }
- void SetErrorEventCallback( void* pInstance, Callback pCallback )
- { m_pErrorInst = pInstance; m_pErrorCallback = pCallback; }
- Callback GetErrorEventCallback() const
- { return m_pErrorCallback; }
+ { return m_pEventInst.is() && m_pEventInst->dispatchEvent( pEvent, nBytes ); }
bool CallErrorCallback( void* pEvent, int nBytes )
- { return m_pErrorCallback ? m_pErrorCallback( m_pErrorInst, pEvent, nBytes ) : false; }
+ { return m_pEventInst.is() && m_pEventInst->dispatchErrorEvent( pEvent, nBytes ); }
enum ConnectionIdentifierType { AsciiCString, Blob };
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0;
@@ -197,7 +179,7 @@ void DestroySalInstance( SalInstance* pInst );
void SalAbort( const XubString& rErrorText );
-VCL_DLLPUBLIC const ::rtl::OUString& SalGetDesktopEnvironment();
+VCL_PLUGIN_PUBLIC const ::rtl::OUString& SalGetDesktopEnvironment();
// -----------
// - SalData -