summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-12-05 19:29:07 +0100
committerMathias Bauer <mba@openoffice.org>2009-12-05 19:29:07 +0100
commit342e37f151084dfb8f840c0cfaa4674dcf880267 (patch)
tree2dea2ded6ba96ae62da1d9dd7faeb9a80ca7065a /vcl/inc
parent549fb21f357eaa2cda1a53d4fa84cf87896aed6d (diff)
parent2f883652c1af80075dc68b5cb439a13cd1dc4129 (diff)
merge to m67
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/vcl/svapp.hxx3
-rw-r--r--vcl/inc/vcl/svdata.hxx31
-rw-r--r--vcl/inc/vcl/vclevent.hxx33
3 files changed, 50 insertions, 17 deletions
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index 1e0c5218d1c5..3e9a1cc55019 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -287,6 +287,9 @@ public:
static vos::OThread::TThreadIdentifier GetMainThreadIdentifier();
static ULONG ReleaseSolarMutex();
static void AcquireSolarMutex( ULONG nCount );
+ static void EnableNoYieldMode( bool i_bNoYield );
+ static void AddPostYieldListener( const Link& i_rListener );
+ static void RemovePostYieldListener( const Link& i_rListener );
static BOOL IsInMain();
static BOOL IsInExecute();
diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx
index 12c595350472..d912c172baa5 100644
--- a/vcl/inc/vcl/svdata.hxx
+++ b/vcl/inc/vcl/svdata.hxx
@@ -111,6 +111,7 @@ class ImplWheelWindow;
class SalTimer;
class SalI18NImeStatus;
class DockingManager;
+class VclEventListeners2;
namespace vos { class OMutex; }
namespace vos { class OCondition; }
@@ -137,7 +138,6 @@ struct ImplSVAppData
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
String* mpMSFTempFileName;
- AllSettings* mpSettings; // Application settings
LocaleConfigurationListener* mpCfgListener;
VclEventListeners* mpEventListeners; // listeners for vcl events (eg, extended toolkit)
VclEventListeners* mpKeyListeners; // listeners for key events only (eg, extended toolkit)
@@ -153,19 +153,22 @@ struct ImplSVAppData
ImplWheelWindow* mpWheelWindow; // WheelWindow
ImplHotKey* mpFirstHotKey; // HotKey-Verwaltung
ImplEventHook* mpFirstEventHook; // Event-Hooks
- ULONG mnLastInputTime; // GetLastInputTime()
- USHORT mnDispatchLevel; // DispatchLevel
- USHORT mnModalMode; // ModalMode Count
- USHORT mnModalDialog; // ModalDialog Count
- USHORT mnAccessCount; // AccessHdl Count
- USHORT mnSysWinMode; // Modus, wann SystemWindows erzeugt werden sollen
- USHORT mnLayout; // --- RTL-Flags --- currently not used, only for testing
- short mnDialogScaleX; // Scale X-Positions and sizes in Dialogs
- BOOL mbInAppMain; // is Application::Main() on stack
- BOOL mbInAppExecute; // is Application::Execute() on stack
- BOOL mbAppQuit; // is Application::Quit() called
- BOOL mbSettingsInit; // TRUE: Settings are init
- BOOL mbDialogCancel; // TRUE: Alle Dialog::Execute()-Aufrufe werden mit return FALSE sofort beendet
+ VclEventListeners2* mpPostYieldListeners; // post yield listeners
+ ULONG mnLastInputTime; // GetLastInputTime()
+ USHORT mnDispatchLevel; // DispatchLevel
+ USHORT mnModalMode; // ModalMode Count
+ USHORT mnModalDialog; // ModalDialog Count
+ USHORT mnAccessCount; // AccessHdl Count
+ USHORT mnSysWinMode; // Modus, wann SystemWindows erzeugt werden sollen
+ USHORT mnLayout; // --- RTL-Flags --- currently not used, only for testing
+ short mnDialogScaleX; // Scale X-Positions and sizes in Dialogs
+ BOOL mbInAppMain; // is Application::Main() on stack
+ BOOL mbInAppExecute; // is Application::Execute() on stack
+ BOOL mbAppQuit; // is Application::Quit() called
+ BOOL mbSettingsInit; // TRUE: Settings are initialized
+ BOOL mbDialogCancel; // TRUE: Alle Dialog::Execute()-Aufrufe werden mit return FALSE sofort beendet
+ BOOL mbNoYield; // Application::Yield will not wait for events if the queue is empty
+ // essentially that makes it the same as Application::Reschedule
/** Controls whether showing any IME status window is toggled on or off.
diff --git a/vcl/inc/vcl/vclevent.hxx b/vcl/inc/vcl/vclevent.hxx
index ff0639d70e82..74971f62c5a6 100644
--- a/vcl/inc/vcl/vclevent.hxx
+++ b/vcl/inc/vcl/vclevent.hxx
@@ -31,11 +31,13 @@
#ifndef _VCL_VCLEVENT_HXX
#define _VCL_VCLEVENT_HXX
-#include <tools/link.hxx>
-#include <tools/rtti.hxx>
-#include <vcl/dllapi.h>
+#include "tools/link.hxx"
+#include "tools/rtti.hxx"
+#include "vcl/dllapi.h"
+#include "vcl/impdel.hxx"
#include <list>
+#include <vector>
class Window;
class Menu;
@@ -251,4 +253,29 @@ public:
BOOL Process( VclSimpleEvent* pEvent ) const;
};
+class VCL_DLLPUBLIC VclEventListeners2 : public vcl::DeletionNotifier
+{
+ std::list< Link > m_aListeners;
+
+ struct ListenerIt
+ {
+ std::list< Link >::iterator m_aIt;
+ bool m_bWasInvalidated;
+
+ ListenerIt() : m_bWasInvalidated( false ) {}
+ };
+
+ std::vector< ListenerIt > m_aIterators;
+
+
+public:
+ VclEventListeners2();
+ ~VclEventListeners2();
+
+ void addListener( const Link& );
+ void removeListener( const Link& );
+
+ void callListeners( VclSimpleEvent* );
+};
+
#endif // _VCL_VCLEVENT_HXX