forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathfl_scrolling_view_delegate.cc
44 lines (38 loc) · 1.41 KB
/
fl_scrolling_view_delegate.cc
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
// 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.
#include "flutter/shell/platform/linux/fl_scrolling_view_delegate.h"
G_DEFINE_INTERFACE(FlScrollingViewDelegate,
fl_scrolling_view_delegate,
G_TYPE_OBJECT)
static void fl_scrolling_view_delegate_default_init(
FlScrollingViewDelegateInterface* iface) {}
void fl_scrolling_view_delegate_send_mouse_pointer_event(
FlScrollingViewDelegate* self,
FlutterPointerPhase phase,
size_t timestamp,
double x,
double y,
FlutterPointerDeviceKind device_kind,
double scroll_delta_x,
double scroll_delta_y,
int64_t buttons) {
g_return_if_fail(FL_IS_SCROLLING_VIEW_DELEGATE(self));
FL_SCROLLING_VIEW_DELEGATE_GET_IFACE(self)->send_mouse_pointer_event(
self, phase, timestamp, x, y, device_kind, scroll_delta_x, scroll_delta_y,
buttons);
}
void fl_scrolling_view_delegate_send_pointer_pan_zoom_event(
FlScrollingViewDelegate* self,
size_t timestamp,
double x,
double y,
FlutterPointerPhase phase,
double pan_x,
double pan_y,
double scale,
double rotation) {
g_return_if_fail(FL_IS_SCROLLING_VIEW_DELEGATE(self));
FL_SCROLLING_VIEW_DELEGATE_GET_IFACE(self)->send_pointer_pan_zoom_event(
self, timestamp, x, y, phase, pan_x, pan_y, scale, rotation);
}