forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathfl_scrolling_view_delegate.h
80 lines (68 loc) · 2.63 KB
/
fl_scrolling_view_delegate.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
// 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_SCROLLING_VIEW_DELEGATE_H_
#define FLUTTER_SHELL_PLATFORM_LINUX_FL_SCROLLING_VIEW_DELEGATE_H_
#include <gdk/gdk.h>
#include <cinttypes>
#include <memory>
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/linux/fl_key_event.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
G_BEGIN_DECLS
G_DECLARE_INTERFACE(FlScrollingViewDelegate,
fl_scrolling_view_delegate,
FL,
SCROLLING_VIEW_DELEGATE,
GObject);
/**
* FlScrollingViewDelegate:
*
* An interface for a class that provides `FlScrollingManager` with
* platform-related features.
*
* This interface is typically implemented by `FlView`.
*/
struct _FlScrollingViewDelegateInterface {
GTypeInterface g_iface;
void (*send_mouse_pointer_event)(FlScrollingViewDelegate* delegate,
FlutterPointerPhase phase,
size_t timestamp,
double x,
double y,
FlutterPointerDeviceKind device_kind,
double scroll_delta_x,
double scroll_delta_y,
int64_t buttons);
void (*send_pointer_pan_zoom_event)(FlScrollingViewDelegate* delegate,
size_t timestamp,
double x,
double y,
FlutterPointerPhase phase,
double pan_x,
double pan_y,
double scale,
double rotation);
};
void fl_scrolling_view_delegate_send_mouse_pointer_event(
FlScrollingViewDelegate* delegate,
FlutterPointerPhase phase,
size_t timestamp,
double x,
double y,
FlutterPointerDeviceKind device_kind,
double scroll_delta_x,
double scroll_delta_y,
int64_t buttons);
void fl_scrolling_view_delegate_send_pointer_pan_zoom_event(
FlScrollingViewDelegate* delegate,
size_t timestamp,
double x,
double y,
FlutterPointerPhase phase,
double pan_x,
double pan_y,
double scale,
double rotation);
G_END_DECLS
#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_SCROLLING_VIEW_DELEGATE_H_