summaryrefslogtreecommitdiffstats
path: root/ui/base/events.h
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-17 17:10:26 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-17 17:10:26 +0000
commitec7b271972848c075878d14fe07f29197ebec6d6 (patch)
tree1bcb43f652089f561c4ee4aa009b8f08a0324acc /ui/base/events.h
parent1b62b89312329852d43103c6ab718bd60cfacdcf (diff)
downloadchromium_src-ec7b271972848c075878d14fe07f29197ebec6d6.zip
chromium_src-ec7b271972848c075878d14fe07f29197ebec6d6.tar.gz
chromium_src-ec7b271972848c075878d14fe07f29197ebec6d6.tar.bz2
Use times from the initiation of events to determine whether two
successive clicks should be considered a double click. Also implements triple click for web content in aura. BUG=None TEST=aura_unittests::EventTest.* Review URL: https://chromiumcodereview.appspot.com/9133013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117907 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/events.h')
-rw-r--r--ui/base/events.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/base/events.h b/ui/base/events.h
index 2128df5..d9cac3d 100644
--- a/ui/base/events.h
+++ b/ui/base/events.h
@@ -14,6 +14,10 @@ namespace gfx {
class Point;
}
+namespace base {
+class TimeDelta;
+}
+
namespace ui {
// Event types. (prefixed because of a conflict with windows headers)
@@ -64,7 +68,8 @@ enum EventFlags {
// Flags specific to mouse events
enum MouseEventFlags {
EF_IS_DOUBLE_CLICK = 1 << 16,
- EF_IS_NON_CLIENT = 1 << 17
+ EF_IS_TRIPLE_CLICK = 1 << 17,
+ EF_IS_NON_CLIENT = 1 << 18
};
enum TouchStatus {
@@ -100,6 +105,9 @@ UI_EXPORT EventType EventTypeFromNative(const base::NativeEvent& native_event);
// Get the EventFlags from a native event.
UI_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event);
+UI_EXPORT base::TimeDelta EventTimeFromNative(
+ const base::NativeEvent& native_event);
+
// Get the location from a native event. The coordinate system of the resultant
// |Point| has the origin at top-left of the "root window". The nature of
// this "root window" and how it maps to platform-specific drawing surfaces is
@@ -144,6 +152,10 @@ UI_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event,
float* x_offset,
float* y_offset);
+UI_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event,
+ double* start_time,
+ double* end_time);
+
// Creates and returns no-op event.
UI_EXPORT base::NativeEvent CreateNoopEvent();