summaryrefslogtreecommitdiff
path: root/vcl/source/window/winproc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/winproc.cxx')
-rw-r--r--vcl/source/window/winproc.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 424b8b6cdbfa..ec1228b9fe69 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -241,12 +241,16 @@ static bool ImplCallCommand( const VclPtr<vcl::Window>& pChild, CommandEventId n
* necessary if there already was a popup menu running.
*/
+namespace {
+
struct ContextMenuEvent
{
VclPtr<vcl::Window> pWindow;
Point aChildPos;
};
+}
+
static void ContextMenuEventLink( void* pCEvent, void* )
{
ContextMenuEvent* pEv = static_cast<ContextMenuEvent*>(pCEvent);
@@ -1313,6 +1317,8 @@ static bool shouldReusePreviousMouseWindow(const SalWheelMouseEvent& rPrevEvt, c
return (rEvt.mnX == rPrevEvt.mnX && rEvt.mnY == rPrevEvt.mnY && rEvt.mnTime-rPrevEvt.mnTime < 500/*ms*/);
}
+namespace {
+
class HandleGestureEventBase
{
protected:
@@ -1334,6 +1340,8 @@ public:
virtual ~HandleGestureEventBase() {}
};
+}
+
bool HandleGestureEventBase::Setup()
{
@@ -1423,6 +1431,8 @@ vcl::Window *HandleGestureEventBase::Dispatch(vcl::Window* pMouseWindow)
return pDispatchedTo;
}
+namespace {
+
class HandleWheelEvent : public HandleGestureEventBase
{
private:
@@ -1457,6 +1467,8 @@ public:
bool HandleEvent(const SalWheelMouseEvent& rEvt);
};
+}
+
bool HandleWheelEvent::HandleEvent(const SalWheelMouseEvent& rEvt)
{
if (!Setup())
@@ -1482,6 +1494,8 @@ bool HandleWheelEvent::HandleEvent(const SalWheelMouseEvent& rEvt)
return pSVData->maWinData.mpLastWheelWindow.get();
}
+namespace {
+
class HandleGestureEvent : public HandleGestureEventBase
{
public:
@@ -1492,6 +1506,8 @@ public:
bool HandleEvent();
};
+}
+
bool HandleGestureEvent::HandleEvent()
{
if (!Setup())
@@ -1509,6 +1525,8 @@ static bool ImplHandleWheelEvent(vcl::Window* pWindow, const SalWheelMouseEvent&
return aHandler.HandleEvent(rEvt);
}
+namespace {
+
class HandleSwipeEvent : public HandleGestureEvent
{
private:
@@ -1525,12 +1543,16 @@ public:
}
};
+}
+
static bool ImplHandleSwipe(vcl::Window *pWindow, const SalSwipeEvent& rEvt)
{
HandleSwipeEvent aHandler(pWindow, rEvt);
return aHandler.HandleEvent();
}
+namespace {
+
class HandleLongPressEvent : public HandleGestureEvent
{
private:
@@ -1547,12 +1569,16 @@ public:
}
};
+}
+
static bool ImplHandleLongPress(vcl::Window *pWindow, const SalLongPressEvent& rEvt)
{
HandleLongPressEvent aHandler(pWindow, rEvt);
return aHandler.HandleEvent();
}
+namespace {
+
class HandleGeneralGestureEvent : public HandleGestureEvent
{
private:
@@ -1571,6 +1597,8 @@ public:
}
};
+}
+
static bool ImplHandleGestureEvent(vcl::Window* pWindow, const SalGestureEvent& rEvent)
{
HandleGeneralGestureEvent aHandler(pWindow, rEvent);
@@ -1877,11 +1905,15 @@ static void ImplHandleLoseFocus( vcl::Window* pWindow )
pFirstFloat->EndPopupMode(FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll);
}
+namespace {
+
struct DelayedCloseEvent
{
VclPtr<vcl::Window> pWindow;
};
+}
+
static void DelayedCloseEventLink( void* pCEvent, void* )
{
DelayedCloseEvent* pEv = static_cast<DelayedCloseEvent*>(pCEvent);