summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas@radix.lt>2022-09-02 00:04:42 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-05 16:22:31 +0200
commitd752cb42473547872741c74a70809f28f9fe789c (patch)
treeb967cd9446feec9cadb57c408b825a6dab14945c
parent35319adcc28f197b73e146f9ba233e20616fd11f (diff)
vcl: Rename LongPress event to GestureLongPress
We have 5 gesture types: GestureZoom, GestureRotate, GesturePan, GestureSwipe 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: I8b9e245d011203a19c1172f9833c172f65382cab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--compilerplugins/clang/unusedmethods.results2
-rw-r--r--include/vcl/commandevent.hxx12
-rw-r--r--sc/source/ui/app/inputwin.cxx4
-rw-r--r--sd/source/ui/inc/slideshow.hxx4
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.hxx2
-rw-r--r--sd/source/ui/view/viewshel.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx2
-rw-r--r--vcl/inc/salwtype.hxx4
-rw-r--r--vcl/source/window/commandevent.cxx6
-rw-r--r--vcl/source/window/winproc.cxx16
-rw-r--r--vcl/unx/gtk3/gtkframe.cxx4
13 files changed, 32 insertions, 32 deletions
diff --git a/compilerplugins/clang/unusedmethods.results b/compilerplugins/clang/unusedmethods.results
index 7c0f0279d085..98c1d36bd64a 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -2047,7 +2047,7 @@ include/vcl/commandevent.hxx:256
include/vcl/commandevent.hxx:276
CommandGestureSwipeData::CommandGestureSwipeData()
include/vcl/commandevent.hxx:293
- CommandLongPressData::CommandLongPressData()
+ CommandGestureLongPressData::CommandGestureLongPressData()
include/vcl/cursor.hxx:96
_Bool vcl::Cursor::operator!=(const vcl::Cursor &) const
include/vcl/customweld.hxx:45
diff --git a/include/vcl/commandevent.hxx b/include/vcl/commandevent.hxx
index d8c2b702987e..d5b043ddb97a 100644
--- a/include/vcl/commandevent.hxx
+++ b/include/vcl/commandevent.hxx
@@ -39,7 +39,7 @@ class CommandDialogData;
class CommandMediaData;
class CommandSelectionChangeData;
class CommandGestureSwipeData;
-class CommandLongPressData;
+class CommandGestureLongPressData;
class CommandGesturePanData;
class CommandGestureZoomData;
class CommandGestureRotateData;
@@ -92,7 +92,7 @@ public:
CommandMediaData* GetMediaData() const;
const CommandSelectionChangeData* GetSelectionChangeData() const;
const CommandGestureSwipeData* GetGestureSwipeData() const;
- const CommandLongPressData* GetLongPressData() const;
+ const CommandGestureLongPressData* GetLongPressData() const;
const CommandGesturePanData* GetGesturePanData() const;
const CommandGestureZoomData* GetGestureZoomData() const;
const CommandGestureRotateData* GetGestureRotateData() const;
@@ -291,17 +291,17 @@ public:
};
-class VCL_DLLPUBLIC CommandLongPressData
+class VCL_DLLPUBLIC CommandGestureLongPressData
{
double mnX;
double mnY;
public:
- CommandLongPressData()
+ CommandGestureLongPressData()
: mnX(0)
, mnY(0)
{
}
- CommandLongPressData(double nX, double nY)
+ CommandGestureLongPressData(double nX, double nY)
: mnX(nX)
, mnY(nY)
{
@@ -384,7 +384,7 @@ enum class CommandEventId
PrepareReconversion = 19,
QueryCharPosition = 20,
GestureSwipe = 21,
- LongPress = 22,
+ GestureLongPress = 22,
GesturePan = 23,
GestureZoom = 24,
GestureRotate = 25,
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 55e40f0f25d2..6b695c05bebb 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1764,9 +1764,9 @@ bool ScTextWnd::Command( const CommandEvent& rCEvt )
{
//don't call InputChanged for CommandEventId::GestureSwipe
}
- else if ( nCommand == CommandEventId::LongPress )
+ else if ( nCommand == CommandEventId::GestureLongPress )
{
- //don't call InputChanged for CommandEventId::LongPress
+ //don't call InputChanged for CommandEventId::GestureLongPress
}
else if ( nCommand == CommandEventId::ModKeyChange )
{
diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index 2f127f4610a3..afbfee68469b 100644
--- a/sd/source/ui/inc/slideshow.hxx
+++ b/sd/source/ui/inc/slideshow.hxx
@@ -49,7 +49,7 @@ namespace vcl { class Window; }
class SfxRequest;
class WorkWindow;
class CommandGestureSwipeData;
-class CommandLongPressData;
+class CommandGestureLongPressData;
struct ImplSVEvent;
// TODO: Remove
@@ -146,7 +146,7 @@ public:
!!!! This should only be called by the SdShowWindow !!!!*/
void pause( bool bPause );
bool swipe(const CommandGestureSwipeData &rSwipeData);
- bool longpress(const CommandLongPressData& rLongPressData);
+ bool longpress(const CommandGestureLongPressData& rLongPressData);
// settings
bool isFullScreen() const; // a.k.a. FuSlideShow::IsFullScreen()
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 00702d422631..aeee4ca7cae0 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -1020,7 +1020,7 @@ bool SlideShow::swipe(const CommandGestureSwipeData& rSwipeData)
return mxController.is() && mxController->swipe(rSwipeData);
}
-bool SlideShow::longpress(const CommandLongPressData& rLongPressData)
+bool SlideShow::longpress(const CommandGestureLongPressData& rLongPressData)
{
return mxController.is() && mxController->longpress(rLongPressData);
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index b13ced3c128f..210a367b5007 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1175,7 +1175,7 @@ bool SlideshowImpl::swipe(const CommandGestureSwipeData &rSwipeData)
return true;
}
-bool SlideshowImpl::longpress(const CommandLongPressData &rLongPressData)
+bool SlideshowImpl::longpress(const CommandGestureLongPressData &rLongPressData)
{
if (mnContextMenuEvent)
return false;
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index b6cd778d8763..748a1898cff8 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -186,7 +186,7 @@ public:
void hyperLinkClicked(const OUString & hyperLink);
void click(const css::uno::Reference< css::drawing::XShape > & xShape);
bool swipe(const CommandGestureSwipeData &rSwipeData);
- bool longpress(const CommandLongPressData& rLongPressData);
+ bool longpress(const CommandGestureLongPressData& rLongPressData);
/// ends the presentation async
void endPresentation();
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 5df0bf11d00a..153a0c52a804 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -671,12 +671,12 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
}
}
break;
- case CommandEventId::LongPress:
+ case CommandEventId::GestureLongPress:
{
rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) );
if (xSlideShow.is())
{
- const CommandLongPressData* pLongPressData = rCEvt.GetLongPressData();
+ const CommandGestureLongPressData* pLongPressData = rCEvt.GetLongPressData();
bDone = xSlideShow->longpress(*pLongPressData);
}
}
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 04b31378e068..d6d828db846e 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5610,7 +5610,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
bCallBase = !m_rView.HandleWheelCommands( rCEvt );
break;
- case CommandEventId::LongPress:
+ case CommandEventId::GestureLongPress:
case CommandEventId::GestureSwipe: //nothing yet
break;
diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx
index 14883f43975f..9e43d16d4135 100644
--- a/vcl/inc/salwtype.hxx
+++ b/vcl/inc/salwtype.hxx
@@ -90,7 +90,7 @@ enum class SalEvent {
StartReconversion,
QueryCharPosition,
GestureSwipe,
- LongPress,
+ GestureLongPress,
ExternalGesture,
GesturePan,
GestureZoom,
@@ -252,7 +252,7 @@ struct SalGestureSwipeEvent
tools::Long mnY;
};
-struct SalLongPressEvent
+struct SalGestureLongPressEvent
{
tools::Long mnX;
tools::Long mnY;
diff --git a/vcl/source/window/commandevent.cxx b/vcl/source/window/commandevent.cxx
index ef3f753ac6a5..83c21826e7c3 100644
--- a/vcl/source/window/commandevent.cxx
+++ b/vcl/source/window/commandevent.cxx
@@ -179,10 +179,10 @@ const CommandGestureSwipeData* CommandEvent::GetGestureSwipeData() const
return nullptr;
}
-const CommandLongPressData* CommandEvent::GetLongPressData() const
+const CommandGestureLongPressData* CommandEvent::GetLongPressData() const
{
- if( mnCommand == CommandEventId::LongPress )
- return static_cast<const CommandLongPressData*>(mpData);
+ if( mnCommand == CommandEventId::GestureLongPress )
+ return static_cast<const CommandGestureLongPressData*>(mpData);
else
return nullptr;
}
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index e0af8255e514..45182d0a09f8 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1769,27 +1769,27 @@ static bool ImplHandleSwipe(vcl::Window *pWindow, const SalGestureSwipeEvent& rE
namespace {
-class HandleLongPressEvent : public HandleGestureEvent
+class HandleGestureLongPressEvent : public HandleGestureEvent
{
private:
- CommandLongPressData m_aLongPressData;
+ CommandGestureLongPressData m_aLongPressData;
public:
- HandleLongPressEvent(vcl::Window *pWindow, const SalLongPressEvent& rEvt)
+ HandleGestureLongPressEvent(vcl::Window *pWindow, const SalGestureLongPressEvent& rEvt)
: HandleGestureEvent(pWindow, Point(rEvt.mnX, rEvt.mnY)),
m_aLongPressData(rEvt.mnX, rEvt.mnY)
{
}
virtual bool CallCommand(vcl::Window *pWindow, const Point &/*rMousePos*/) override
{
- return ImplCallCommand(pWindow, CommandEventId::LongPress, &m_aLongPressData);
+ return ImplCallCommand(pWindow, CommandEventId::GestureLongPress, &m_aLongPressData);
}
};
}
-static bool ImplHandleLongPress(vcl::Window *pWindow, const SalLongPressEvent& rEvt)
+static bool ImplHandleLongPress(vcl::Window *pWindow, const SalGestureLongPressEvent& rEvt)
{
- HandleLongPressEvent aHandler(pWindow, rEvt);
+ HandleGestureLongPressEvent aHandler(pWindow, rEvt);
return aHandler.HandleEvent();
}
@@ -2907,8 +2907,8 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
bRet = ImplHandleSwipe(pWindow, *static_cast<const SalGestureSwipeEvent*>(pEvent));
break;
- case SalEvent::LongPress:
- bRet = ImplHandleLongPress(pWindow, *static_cast<const SalLongPressEvent*>(pEvent));
+ case SalEvent::GestureLongPress:
+ bRet = ImplHandleLongPress(pWindow, *static_cast<const SalGestureLongPressEvent*>(pEvent));
break;
case SalEvent::ExternalGesture:
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 3992672b479b..ab66866f8811 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -3443,12 +3443,12 @@ void GtkSalFrame::gestureLongPress(GtkGestureLongPress* gesture, gdouble x, gdou
GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
if (gtk_gesture_get_point(GTK_GESTURE(gesture), sequence, &x, &y))
{
- SalLongPressEvent aEvent;
+ SalGestureLongPressEvent aEvent;
aEvent.mnX = x;
aEvent.mnY = y;
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
- pThis->CallCallbackExc(SalEvent::LongPress, &aEvent);
+ pThis->CallCallbackExc(SalEvent::GestureLongPress, &aEvent);
}
}