summaryrefslogtreecommitdiffstats
path: root/include/vcl/cmdevt.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-26 10:20:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-26 14:48:13 +0000
commit873141fb5be5fa49b56ea413bc912af33f758a0b (patch)
treee996d17f50a08c82bb469448886d0198a065d2b4 /include/vcl/cmdevt.hxx
parentconst_cast: convert some C-style casts and remove some redundant ones (diff)
downloadcore-873141fb5be5fa49b56ea413bc912af33f758a0b.tar.gz
core-873141fb5be5fa49b56ea413bc912af33f758a0b.zip
add GtkLongPressGesture support and implement long-press in slideshow
so a long press shows the context menu to e.g. allow switching on/off draw-on-slide mode Change-Id: Icd6ea52d2172217794f4fc802246ccf13020e134
Diffstat (limited to 'include/vcl/cmdevt.hxx')
-rw-r--r--include/vcl/cmdevt.hxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/vcl/cmdevt.hxx b/include/vcl/cmdevt.hxx
index 8e62e256fa73..851c5d9aec1e 100644
--- a/include/vcl/cmdevt.hxx
+++ b/include/vcl/cmdevt.hxx
@@ -355,6 +355,26 @@ public:
double getVelocityY() const { return mnVelocityY; }
};
+class VCL_DLLPUBLIC CommandLongPressData
+{
+ double mnX;
+ double mnY;
+public:
+ CommandLongPressData()
+ : mnX(0)
+ , mnY(0)
+ {
+ }
+ CommandLongPressData(double nX, double nY)
+ : mnX(nX)
+ , mnY(nY)
+ {
+ }
+ double getX() const { return mnX; }
+ double getY() const { return mnY; }
+};
+
+
// - CommandEvent -
#define COMMAND_CONTEXTMENU ((sal_uInt16)1)
#define COMMAND_STARTDRAG ((sal_uInt16)2)
@@ -376,6 +396,7 @@ public:
#define COMMAND_PREPARERECONVERSION ((sal_uInt16)19)
#define COMMAND_QUERYCHARPOSITION ((sal_uInt16)20)
#define COMMAND_SWIPE ((sal_uInt16)21)
+#define COMMAND_LONGPRESS ((sal_uInt16)22)
class VCL_DLLPUBLIC CommandEvent
{
@@ -404,6 +425,7 @@ public:
CommandMediaData* GetMediaData() const;
const CommandSelectionChangeData* GetSelectionChangeData() const;
const CommandSwipeData* GetSwipeData() const;
+ const CommandLongPressData* GetLongPressData() const;
};
inline CommandEvent::CommandEvent()
@@ -494,6 +516,14 @@ inline const CommandSwipeData* CommandEvent::GetSwipeData() const
return NULL;
}
+inline const CommandLongPressData* CommandEvent::GetLongPressData() const
+{
+ if( mnCommand == COMMAND_LONGPRESS )
+ return (const CommandLongPressData*)(mpData);
+ else
+ return NULL;
+}
+
#endif // INCLUDED_VCL_CMDEVT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */