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