diff options
author | Povilas Kanapickas <povilas@radix.lt> | 2022-09-02 00:04:41 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-05 16:21:49 +0200 |
commit | 35319adcc28f197b73e146f9ba233e20616fd11f (patch) | |
tree | 41bf3dcd9461d15d5886cee77e4cf07a9fd51418 /vcl/source/window/winproc.cxx | |
parent | 231342ef6a913f0a5c9dfea3bd28830e92a3fc98 (diff) |
vcl: Rename Swipe event to GestureSwipe
We have 5 gesture types: GestureZoom, GestureRotate, GesturePan, Swipe
and LongPress. For consistency all of these will use Gesture as a prefix
to reduce confusion and for easier grepping throughout the codebase.
Change-Id: I8b9e245d011203a19c1172f9833c172f65382caa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139243
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window/winproc.cxx')
-rw-r--r-- | vcl/source/window/winproc.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index efa818d7b60e..e0af8255e514 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1743,27 +1743,27 @@ static bool ImplHandleWheelEvent(vcl::Window* pWindow, const SalWheelMouseEvent& namespace { -class HandleSwipeEvent : public HandleGestureEvent +class HandleGestureSwipeEvent : public HandleGestureEvent { private: - CommandSwipeData m_aSwipeData; + CommandGestureSwipeData m_aSwipeData; public: - HandleSwipeEvent(vcl::Window *pWindow, const SalSwipeEvent& rEvt) + HandleGestureSwipeEvent(vcl::Window *pWindow, const SalGestureSwipeEvent& rEvt) : HandleGestureEvent(pWindow, Point(rEvt.mnX, rEvt.mnY)), m_aSwipeData(rEvt.mnVelocityX) { } virtual bool CallCommand(vcl::Window *pWindow, const Point &/*rMousePos*/) override { - return ImplCallCommand(pWindow, CommandEventId::Swipe, &m_aSwipeData); + return ImplCallCommand(pWindow, CommandEventId::GestureSwipe, &m_aSwipeData); } }; } -static bool ImplHandleSwipe(vcl::Window *pWindow, const SalSwipeEvent& rEvt) +static bool ImplHandleSwipe(vcl::Window *pWindow, const SalGestureSwipeEvent& rEvt) { - HandleSwipeEvent aHandler(pWindow, rEvt); + HandleGestureSwipeEvent aHandler(pWindow, rEvt); return aHandler.HandleEvent(); } @@ -2903,8 +2903,8 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE ImplHandleSalQueryCharPosition( pWindow, const_cast<SalQueryCharPositionEvent *>(static_cast<SalQueryCharPositionEvent const *>(pEvent)) ); break; - case SalEvent::Swipe: - bRet = ImplHandleSwipe(pWindow, *static_cast<const SalSwipeEvent*>(pEvent)); + case SalEvent::GestureSwipe: + bRet = ImplHandleSwipe(pWindow, *static_cast<const SalGestureSwipeEvent*>(pEvent)); break; case SalEvent::LongPress: |