diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-09-08 06:55:30 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-07-13 12:10:21 +0200 |
commit | d348035a60361a1b9ba9eb7b67013204a24a6633 (patch) | |
tree | 85e7e4ff2dd926ef9d2907b4f4900815bdbb96c5 /vcl/inc | |
parent | 1782893282a4543e946e6b2c8de863b10fab0c85 (diff) |
Drop special idle handling
Idles are just instant timers, which should most time have a low
priority, By dropping most special idle handling we'll just
schedule by priority.
This also reverts SalYieldResult back to a bool, which just
indicates if any event was processed.
Change-Id: Ia0b91b06dffb77af066f01838d8f9483523bf67d
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/headless/svpinst.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/osx/salinst.h | 2 | ||||
-rw-r--r-- | vcl/inc/salinst.hxx | 8 | ||||
-rw-r--r-- | vcl/inc/saltimer.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/salwtype.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtkdata.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtkinst.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/saldata.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/saldisp.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/unx/salinst.h | 2 | ||||
-rw-r--r-- | vcl/inc/win/salinst.h | 2 |
11 files changed, 14 insertions, 19 deletions
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx index 4a82c413372a..e8bb96ab68ac 100644 --- a/vcl/inc/headless/svpinst.hxx +++ b/vcl/inc/headless/svpinst.hxx @@ -155,7 +155,7 @@ public: // wait next event and dispatch // must returned by UserEvent (SalFrame::PostEvent) // and timer - virtual SalYieldResult DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override; + virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override; virtual bool AnyInput( VclInputFlags nType ) override; virtual bool IsMainThread() const override { return true; } diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h index b92a2aa35665..146391b073c2 100644 --- a/vcl/inc/osx/salinst.h +++ b/vcl/inc/osx/salinst.h @@ -107,7 +107,7 @@ public: virtual sal_uLong ReleaseYieldMutex() override; virtual void AcquireYieldMutex( sal_uLong nCount ) override; virtual bool CheckYieldMutex() override; - virtual SalYieldResult DoYield(bool bWait, bool bHandleAllCurrentEvents, + virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override; virtual bool AnyInput( VclInputFlags nType ) override; virtual SalMenu* CreateMenu( bool bMenuBar, Menu* pVCLMenu ) override; diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index 0e2703af8999..d8b9b0a32d64 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -58,8 +58,6 @@ class Menu; enum class VclInputFlags; enum class SalFrameStyleFlags; -enum SalYieldResult { EVENT, TIMEOUT }; - typedef struct _cairo_font_options cairo_font_options_t; class VCL_PLUGIN_PUBLIC SalInstance @@ -133,10 +131,10 @@ public: * Wait for the next event (if bWait) and dispatch it, * includes posted events, and timers. * If bHandleAllCurrentEvents - dispatch multiple posted - * user events. Returns true if events needed processing. + * user events. Returns true if events were processed. */ - virtual SalYieldResult DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) = 0; - virtual bool AnyInput( VclInputFlags nType ) = 0; + virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) = 0; + virtual bool AnyInput( VclInputFlags nType ) = 0; // menus virtual SalMenu* CreateMenu( bool bMenuBar, Menu* pMenu ); diff --git a/vcl/inc/saltimer.hxx b/vcl/inc/saltimer.hxx index e9f28169bf35..e0179dd5fd27 100644 --- a/vcl/inc/saltimer.hxx +++ b/vcl/inc/saltimer.hxx @@ -48,10 +48,10 @@ public: m_pProc = pProc; } - void CallCallback( bool idle ) + void CallCallback() { if( m_pProc ) - m_pProc( idle ); + m_pProc(); } }; diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx index e07a980754d0..1538c8e78a25 100644 --- a/vcl/inc/salwtype.hxx +++ b/vcl/inc/salwtype.hxx @@ -258,7 +258,7 @@ struct SalLongPressEvent long mnY; }; -typedef void (*SALTIMERPROC)( bool idle ); +typedef void (*SALTIMERPROC)(); #endif // INCLUDED_VCL_INC_SALWTYPE_HXX diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index 8e8719a8a174..2582314eb003 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -98,7 +98,6 @@ class GtkData : public SalGenericData osl::Mutex m_aDispatchMutex; osl::Condition m_aDispatchCondition; css::uno::Any m_aException; - bool blockIdleTimeout; public: GtkData( SalInstance *pInstance ); @@ -113,14 +112,13 @@ public: static gboolean userEventFn( gpointer data ); void PostUserEvent(); - SalYieldResult Yield( bool bWait, bool bHandleAllCurrentEvents ); + bool Yield( bool bWait, bool bHandleAllCurrentEvents ); inline GdkDisplay *GetGdkDisplay(); virtual void ErrorTrapPush() override; virtual bool ErrorTrapPop( bool bIgnoreError = true ) override; inline GtkSalDisplay *GetGtkDisplay() const; - bool BlockIdleTimeout() const { return blockIdleTimeout; } void setException(const css::uno::Any& rException) { m_aException = rException; } }; diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx index 983fbf287deb..4c86a3d62867 100644 --- a/vcl/inc/unx/gtk/gtkinst.hxx +++ b/vcl/inc/unx/gtk/gtkinst.hxx @@ -208,7 +208,7 @@ public: const SystemGraphicsData* = nullptr ) override; virtual SalBitmap* CreateSalBitmap() override; - virtual SalYieldResult DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override; + virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override; virtual bool AnyInput( VclInputFlags nType ) override; // impossible to handle correctly, as "main thread" depends on the dispatch mutex virtual bool IsMainThread() const override { return false; } diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx index 9e8928122a97..e7899c4138f4 100644 --- a/vcl/inc/unx/saldata.hxx +++ b/vcl/inc/unx/saldata.hxx @@ -72,7 +72,7 @@ public: SalXLib* GetLib() const { return pXLib_; } - static void Timeout( bool idle ); + static void Timeout(); // X errors virtual void ErrorTrapPush() override; diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index 31b11b470530..2c23d6010c35 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -153,7 +153,6 @@ protected: timeval m_aTimeout; sal_uLong m_nTimeoutMS; int m_pTimeoutFDS[2]; - bool blockIdleTimeout; int nFDs_; fd_set aReadFDS_; @@ -167,7 +166,7 @@ public: virtual ~SalXLib(); virtual void Init(); - virtual SalYieldResult Yield( bool bWait, bool bHandleAllCurrentEvents ); + virtual bool Yield( bool bWait, bool bHandleAllCurrentEvents ); virtual void Wakeup(); virtual void PostUserEvent(); diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h index 1f9c43bf2232..848356dff327 100644 --- a/vcl/inc/unx/salinst.h +++ b/vcl/inc/unx/salinst.h @@ -74,7 +74,7 @@ public: virtual SalSession* CreateSalSession() override; virtual OpenGLContext* CreateOpenGLContext() override; - virtual SalYieldResult DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override; + virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override; virtual bool AnyInput( VclInputFlags nType ) override; virtual bool IsMainThread() const override { return true; } diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h index 022f67e0557a..359bc275e463 100644 --- a/vcl/inc/win/salinst.h +++ b/vcl/inc/win/salinst.h @@ -64,7 +64,7 @@ public: virtual bool CheckYieldMutex() override; virtual bool IsMainThread() const override; - virtual SalYieldResult DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override; + virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override; virtual bool AnyInput( VclInputFlags nType ) override; virtual SalMenu* CreateMenu( bool bMenuBar, Menu* ) override; virtual void DestroyMenu( SalMenu* ) override; |