Banuba SDK
input_manager.hpp
Go to the documentation of this file.
1 /// \file
2 /// \addtogroup EffectPlayer
3 /// @{
4 ///
5 // AUTOGENERATED FILE - DO NOT MODIFY!
6 // This file generated by Djinni from effect_player.djinni
7 
8 #pragma once
9 
10 #include <bnb/utils/defs.hpp>
11 #include <cstdint>
12 #include <string>
13 #include <unordered_map>
14 
15 namespace bnb { namespace interfaces {
16 
17 struct touch;
18 
19 /**
20  * Class to accepts touches from user.
21  *
22  * Key in each map is id of an event.
23  */
24 class BNB_EXPORT input_manager {
25 public:
26  virtual ~input_manager() {}
27 
28  virtual void on_touches_began(const std::unordered_map<int64_t, touch> & tocuhes) = 0;
29 
30  virtual void on_touches_moved(const std::unordered_map<int64_t, touch> & tocuhes) = 0;
31 
32  virtual void on_touches_ended(const std::unordered_map<int64_t, touch> & tocuhes) = 0;
33 
34  virtual void on_touches_cancelled(const std::unordered_map<int64_t, touch> & tocuhes) = 0;
35 
36  virtual void on_rotation_gesture(float angle) = 0;
37 
38  virtual void on_scale_gesture(float scale) = 0;
39 
40  virtual void on_swipe_gesture(float dir_x, float dir_y) = 0;
41 
42  virtual void on_double_tap_gesture(const touch & pos) = 0;
43 
44  virtual void on_long_tap_gesture(const touch & pos) = 0;
45 
46  virtual void on_gesture_ended(const std::string & id) = 0;
47 };
48 
49 } } // namespace bnb::interfaces
50 /// @}
51 
bnb::interfaces::touch
User touch object.
Definition: touch.hpp:19
bnb::interfaces::input_manager
Class to accepts touches from user.
Definition: input_manager.hpp:24