blob: 77f78719a34b63bb72416306e797ea3d9ddd9325 [file] [log] [blame]
Sean O'Brien1bb3d172017-10-05 19:44:581// Copyright 2017 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef COMPONENTS_EXO_POINTER_GESTURE_PINCH_DELEGATE_H_
6#define COMPONENTS_EXO_POINTER_GESTURE_PINCH_DELEGATE_H_
7
8#include "base/time/time.h"
9
10namespace exo {
11class Pointer;
12
13// Handles pinch event details on pointers. Used as an extension to the
14// PointerDelegate.
15class PointerGesturePinchDelegate {
16 public:
17 // Called at the top of the pointer's destructor, to give observers a
18 // chance to remove themselves.
19 virtual void OnPointerDestroying(Pointer* pointer) = 0;
20
21 virtual void OnPointerPinchBegin(uint32_t unique_touch_event_id,
22 base::TimeTicks time_stamp,
23 Surface* surface) = 0;
24
25 virtual void OnPointerPinchUpdate(base::TimeTicks time_stamp,
26 float scale) = 0;
27
28 virtual void OnPointerPinchEnd(uint32_t unique_touch_event_id,
29 base::TimeTicks time_stamp) = 0;
30
31 protected:
32 virtual ~PointerGesturePinchDelegate() {}
33};
34
35} // namespace exo
36
37#endif // COMPONENTS_EXO_POINTER_GESTURE_PINCH_DELEGATE_H_