| Flutter Linux Embedder |

fl_scrolling_manager.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_LINUX_FL_SCROLLING_MANAGER_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_SCROLLING_MANAGER_H_
7
8 #include <gdk/gdk.h>
9 #include <functional>
10
11 #include "flutter/shell/platform/linux/fl_scrolling_view_delegate.h"
12
13 G_BEGIN_DECLS
14
15 #define FL_TYPE_SCROLLING_MANAGER fl_scrolling_manager_get_type()
16 G_DECLARE_FINAL_TYPE(FlScrollingManager,
17 fl_scrolling_manager,
18 FL,
19 SCROLLING_MANAGER,
20 GObject);
21
22 /**
23 * fl_scrolling_manager_new:
24 * @view_delegate: An interface that the manager requires to communicate with
25 * the platform. Usually implemented by FlView.
26 *
27 * Create a new #FlScrollingManager.
28 *
29 * Returns: a new #FlScrollingManager.
30 */
31 FlScrollingManager* fl_scrolling_manager_new(
32 FlScrollingViewDelegate* view_delegate);
33
34 /**
35 * fl_scrolling_manager_set_last_mouse_position:
36 * @manager: the #FlScrollingManager self.
37 * @x: the mouse x-position, in window coordinates.
38 * @y: the mouse y-position, in window coordinates.
39 *
40 * Inform the scrolling manager of the mouse position.
41 * This position will be used when sending scroll pointer events.
42 */
43 void fl_scrolling_manager_set_last_mouse_position(FlScrollingManager* manager,
44 gdouble x,
45 gdouble y);
46
47 /**
48 * fl_scrolling_manager_handle_scroll_event:
49 * @manager: the #FlScrollingManager self.
50 * @event: the scroll event.
51 * @scale_factor: the GTK scaling factor of the window.
52 *
53 * Inform the scrolling manager of a scroll event.
54 */
55 void fl_scrolling_manager_handle_scroll_event(FlScrollingManager* manager,
56 GdkEventScroll* event,
57 gint scale_factor);
58
59 /**
60 * fl_scrolling_manager_handle_rotation_begin:
61 * @manager: the #FlScrollingManager self.
62 *
63 * Inform the scrolling manager that a rotation gesture has begun.
64 */
65 void fl_scrolling_manager_handle_rotation_begin(FlScrollingManager* manager);
66
67 /**
68 * fl_scrolling_manager_handle_rotation_update:
69 * @manager: the #FlScrollingManager self.
70 * @rotation: the rotation angle, in radians.
71 *
72 * Inform the scrolling manager that a rotation gesture has updated.
73 */
74 void fl_scrolling_manager_handle_rotation_update(FlScrollingManager* manager,
75 gdouble rotation);
76
77 /**
78 * fl_scrolling_manager_handle_rotation_end:
79 * @manager: the #FlScrollingManager self.
80 *
81 * Inform the scrolling manager that a rotation gesture has ended.
82 */
83 void fl_scrolling_manager_handle_rotation_end(FlScrollingManager* manager);
84
85 /**
86 * fl_scrolling_manager_handle_zoom_begin:
87 * @manager: the #FlScrollingManager self.
88 *
89 * Inform the scrolling manager that a zoom gesture has begun.
90 */
91 void fl_scrolling_manager_handle_zoom_begin(FlScrollingManager* manager);
92
93 /**
94 * fl_scrolling_manager_handle_zoom_update:
95 * @manager: the #FlScrollingManager self.
96 * @scale: the zoom scale.
97 *
98 * Inform the scrolling manager that a zoom gesture has updated.
99 */
100 void fl_scrolling_manager_handle_zoom_update(FlScrollingManager* manager,
101 gdouble scale);
102
103 /**
104 * fl_scrolling_manager_handle_zoom_end:
105 * @manager: the #FlScrollingManager self.
106 *
107 * Inform the scrolling manager that a zoom gesture has ended.
108 */
109 void fl_scrolling_manager_handle_zoom_end(FlScrollingManager* manager);
110
111 G_END_DECLS
112
113 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_SCROLLING_MANAGER_H_
event
FlKeyEvent * event
Definition: fl_key_channel_responder.cc:118
fl_scrolling_manager_handle_zoom_end
void fl_scrolling_manager_handle_zoom_end(FlScrollingManager *manager)
Definition: fl_scrolling_manager.cc:174
fl_scrolling_view_delegate.h
fl_scrolling_manager_handle_zoom_begin
void fl_scrolling_manager_handle_zoom_begin(FlScrollingManager *manager)
Definition: fl_scrolling_manager.cc:157
fl_scrolling_manager_handle_scroll_event
void fl_scrolling_manager_handle_scroll_event(FlScrollingManager *manager, GdkEventScroll *event, gint scale_factor)
Definition: fl_scrolling_manager.cc:67
fl_scrolling_manager_handle_rotation_end
void fl_scrolling_manager_handle_rotation_end(FlScrollingManager *manager)
Definition: fl_scrolling_manager.cc:148
FL
FL
Definition: fl_binary_messenger.cc:27
fl_scrolling_manager_handle_rotation_update
void fl_scrolling_manager_handle_rotation_update(FlScrollingManager *manager, gdouble rotation)
Definition: fl_scrolling_manager.cc:141
G_DECLARE_FINAL_TYPE
G_DECLARE_FINAL_TYPE(FlScrollingManager, fl_scrolling_manager, FL, SCROLLING_MANAGER, GObject)
fl_scrolling_manager_set_last_mouse_position
void fl_scrolling_manager_set_last_mouse_position(FlScrollingManager *manager, gdouble x, gdouble y)
Definition: fl_scrolling_manager.cc:60
fl_scrolling_manager_handle_rotation_begin
void fl_scrolling_manager_handle_rotation_begin(FlScrollingManager *manager)
Definition: fl_scrolling_manager.cc:130
fl_scrolling_manager_handle_zoom_update
void fl_scrolling_manager_handle_zoom_update(FlScrollingManager *manager, gdouble scale)
Definition: fl_scrolling_manager.cc:167
fl_scrolling_manager_new
FlScrollingManager * fl_scrolling_manager_new(FlScrollingViewDelegate *view_delegate)
Definition: fl_scrolling_manager.cc:41