diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-02-01 13:08:06 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-02-01 13:08:06 +0000 |
commit | e206328880cc901b8ba657d78e7158704f21dcfe (patch) | |
tree | dfe2842a9cc073d05387de2a75893abf9bd85a8e /vcl/unx | |
parent | 82feb1d25cb877283f9cc87d56c36d35f512a57e (diff) |
implement XDisplayConnection interface
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/inc/salinst.h | 16 | ||||
-rw-r--r-- | vcl/unx/source/app/saldisp.cxx | 9 | ||||
-rw-r--r-- | vcl/unx/source/app/salinst.cxx | 23 |
3 files changed, 37 insertions, 11 deletions
diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h index 88d471eeae6d..69b1b6f39094 100644 --- a/vcl/unx/inc/salinst.h +++ b/vcl/unx/inc/salinst.h @@ -2,9 +2,9 @@ * * $RCSfile: salinst.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:41 $ + * last change: $Author: pl $ $Date: 2001-02-01 14:08:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,7 +62,7 @@ // // // (C) 1997 Star Division GmbH, Hamburg, Germany // // // -// $Revision: 1.1.1.1 $ $Author: hr $ $Date: 2000-09-18 17:05:41 $ // +// $Revision: 1.2 $ $Author: pl $ $Date: 2001-02-01 14:08:06 $ // // // // $Workfile: salinst.h $ // // $Modtime: 17 Jul 1997 17:21:10 $ // @@ -106,9 +106,13 @@ class SalInstanceData public: - void* mpFilterInst; - void* mpFilterCallback; - SalYieldMutex* mpSalYieldMutex; + void* mpFilterInst; + void* mpFilterCallback; + SalYieldMutex* mpSalYieldMutex; + bool(*mpEventCallback)(void*,void*,int); + void* mpEventInst; + bool(*mpErrorEventCallback)(void*,void*,int); + void* mpErrorEventInst; }; #endif // _SV_SALINST_H diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx index ed7b5879d18f..2419ad04c235 100644 --- a/vcl/unx/source/app/saldisp.cxx +++ b/vcl/unx/source/app/saldisp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: saldisp.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: oisin $ $Date: 2001-01-31 15:00:25 $ + * last change: $Author: pl $ $Date: 2001-02-01 14:08:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2671,7 +2671,10 @@ final long SalDisplay::Dispatch( XEvent *pEvent ) if ( mpInputMethod->FilterEvent( pEvent, None ) ) return 0; - DtIntegrator::HandleXEvent( pEvent ); + // DtIntegrator::HandleXEvent( pEvent ); + SalInstance* pInstance = GetSalData()->pFirstInstance_; + if( pInstance->maInstData.mpEventCallback ) + pInstance->maInstData.mpEventCallback( pInstance->maInstData.mpEventInst, pEvent, sizeof( XEvent ) ); switch( pEvent->type ) { diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx index 5e5bd150815b..fed3bac40bd7 100644 --- a/vcl/unx/source/app/salinst.cxx +++ b/vcl/unx/source/app/salinst.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salinst.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oisin $ $Date: 2001-01-31 15:00:25 $ + * last change: $Author: pl $ $Date: 2001-02-01 14:08:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -354,3 +354,22 @@ void SalInstance::AcquireYieldMutex( ULONG nCount ) final void SalInstance::Yield( BOOL bWait ) { GetSalData()->GetLib()->Yield( bWait ); } +void SalInstance::SetEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) ) +{ + maInstData.mpEventInst = pInstance; + maInstData.mpEventCallback = pCallback; +} + +void SalInstance::SetErrorEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) ) +{ + maInstData.mpErrorEventInst = pInstance; + maInstData.mpErrorEventCallback = pCallback; +} + +void* SalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) +{ + static const char* pDisplay = getenv( "DISPLAY" ); + rReturnedType = AsciiCString; + rReturnedBytes = pDisplay ? strlen( pDisplay )+1 : 1; + return pDisplay ? pDisplay : ""; +} |