forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fl_pointer_manager.h
118 lines (107 loc) · 3.74 KB
/
fl_pointer_manager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_POINTER_MANAGER_H_
#define FLUTTER_SHELL_PLATFORM_LINUX_FL_POINTER_MANAGER_H_
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"
G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(FlPointerManager,
fl_pointer_manager,
FL,
POINTER_MANAGER,
GObject);
/**
* fl_pointer_manager_new:
* @view_id: view ID to report events for.
* @engine: an #FlEngine.
*
* Create a new #FlPointerManager.
*
* Returns: a new #FlPointerManager.
*/
FlPointerManager* fl_pointer_manager_new(FlutterViewId view_id,
FlEngine* engine);
/**
* fl_pointer_manager_handle_button_press:
* @manager: an #FlPointerManager.
* @event_time: event time in milliseconds.
* @device_kind: kind of device generating the event.
* @x: x co-ordinate of event.
* @y: y co-ordinate of event.
* @button: button being pressed.
*
* Returns %TRUE if this event was handled.
*/
gboolean fl_pointer_manager_handle_button_press(
FlPointerManager* manager,
guint event_time,
FlutterPointerDeviceKind device_kind,
gdouble x,
gdouble y,
int64_t button);
/**
* fl_pointer_manager_handle_button_release:
* @manager: an #FlPointerManager.
* @event_time: event time in milliseconds.
* @device_kind: kind of device generating the event.
* @x: x co-ordinate of event.
* @y: y co-ordinate of event.
* @button: button being released.
*
* Returns %TRUE if this event was handled.
*/
gboolean fl_pointer_manager_handle_button_release(
FlPointerManager* manager,
guint event_time,
FlutterPointerDeviceKind device_kind,
gdouble x,
gdouble y,
int64_t button);
/**
* fl_pointer_manager_handle_motion:
* @manager: an #FlPointerManager.
* @event_time: event time in milliseconds.
* @device_kind: kind of device generating the event.
* @x: x co-ordinate of event.
* @y: y co-ordinate of event.
*
* Returns %TRUE if this event was handled.
*/
gboolean fl_pointer_manager_handle_motion(FlPointerManager* manager,
guint event_time,
FlutterPointerDeviceKind device_kind,
gdouble x,
gdouble y);
/**
* fl_pointer_manager_handle_enter:
* @manager: an #FlPointerManager.
* @event_time: event time in milliseconds.
* @device_kind: kind of device generating the event.
* @x: x co-ordinate of event.
* @y: y co-ordinate of event.
*
* Returns %TRUE if this event was handled.
*/
gboolean fl_pointer_manager_handle_enter(FlPointerManager* manager,
guint event_time,
FlutterPointerDeviceKind device_kind,
gdouble x,
gdouble y);
/**
* fl_pointer_manager_handle_leave:
* @manager: an #FlPointerManager.
* @event_time: event time in milliseconds.
* @device_kind: kind of device generating the event.
* @x: x co-ordinate of event.
* @y: y co-ordinate of event.
*
* Returns %TRUE if this event was handled.
*/
gboolean fl_pointer_manager_handle_leave(FlPointerManager* manager,
guint event_time,
FlutterPointerDeviceKind device_kind,
gdouble x,
gdouble y);
G_END_DECLS
#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_POINTER_MANAGER_H_