Flutter Engine
window_binding_handler_delegate.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter 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 FLUTTER_SHELL_PLATFORM_WINDOWS_WINDOW_BINDING_HANDLER_DELEGATE_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_WINDOW_BINDING_HANDLER_DELEGATE_H_
7 
8 #include "flutter/shell/platform/embedder/embedder.h"
9 
10 namespace flutter {
11 
13  public:
14  // Notifies delegate that backing window size has changed.
15  // Typically called by currently configured WindowBindingHandler
16  virtual void OnWindowSizeChanged(size_t width, size_t height) const = 0;
17 
18  // Notifies delegate that backing window mouse has moved.
19  // Typically called by currently configured WindowBindingHandler
20  virtual void OnPointerMove(double x, double y) = 0;
21 
22  // Notifies delegate that backing window mouse pointer button has been
23  // pressed. Typically called by currently configured WindowBindingHandler
24  virtual void OnPointerDown(double x,
25  double y,
26  FlutterPointerMouseButtons button) = 0;
27 
28  // Notifies delegate that backing window mouse pointer button has been
29  // released. Typically called by currently configured WindowBindingHandler
30  virtual void OnPointerUp(double x,
31  double y,
32  FlutterPointerMouseButtons button) = 0;
33 
34  // Notifies delegate that backing window mouse pointer has left the window.
35  // Typically called by currently configured WindowBindingHandler
36  virtual void OnPointerLeave() = 0;
37 
38  // Notifies delegate that backing window has received text.
39  // Typically called by currently configured WindowBindingHandler
40  virtual void OnText(const std::u16string&) = 0;
41 
42  // Notifies delegate that backing window size has received key press.
43  // Typically called by currently configured WindowBindingHandler
44  virtual void OnKey(int key, int scancode, int action, char32_t character) = 0;
45 
46  // Notifies delegate that backing window size has recevied scroll.
47  // Typically called by currently configured WindowBindingHandler
48  virtual void OnScroll(double x,
49  double y,
50  double delta_x,
51  double delta_y,
52  int scroll_offset_multiplier) = 0;
53 };
54 
55 } // namespace flutter
56 
57 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_WINDOW_BINDING_HANDLER_DELEGATE_H_
FlutterPointerMouseButtons
Definition: embedder.h:514
virtual void OnPointerUp(double x, double y, FlutterPointerMouseButtons button)=0
virtual void OnText(const std::u16string &)=0
virtual void OnPointerMove(double x, double y)=0
virtual void OnWindowSizeChanged(size_t width, size_t height) const =0
virtual void OnKey(int key, int scancode, int action, char32_t character)=0
virtual void OnPointerDown(double x, double y, FlutterPointerMouseButtons button)=0
SemanticsAction action
int32_t height
int32_t width
virtual void OnScroll(double x, double y, double delta_x, double delta_y, int scroll_offset_multiplier)=0