mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
1a40ee953a
To make the default state all zeros. Fixes https://github.com/flutter/flutter/issues/6236
58 lines
1.2 KiB
C++
58 lines
1.2 KiB
C++
// Copyright 2016 The Chromium 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_LIB_UI_WINDOW_POINTER_DATA_H_
|
|
#define FLUTTER_LIB_UI_WINDOW_POINTER_DATA_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
namespace blink {
|
|
|
|
// This structure is unpacked by hooks.dart.
|
|
struct alignas(8) PointerData {
|
|
// Must match the PointerChange enum in pointer.dart.
|
|
enum class Change : int64_t {
|
|
kCancel,
|
|
kAdd,
|
|
kRemove,
|
|
kDown,
|
|
kMove,
|
|
kUp,
|
|
};
|
|
|
|
// Must match the PointerDeviceKind enum in pointer.dart.
|
|
enum class DeviceKind : int64_t {
|
|
kTouch,
|
|
kMouse,
|
|
kStylus,
|
|
kInvertedStylus,
|
|
};
|
|
|
|
int64_t time_stamp;
|
|
int64_t pointer;
|
|
Change change;
|
|
DeviceKind kind;
|
|
double physical_x;
|
|
double physical_y;
|
|
int64_t buttons;
|
|
int64_t obscured;
|
|
double pressure;
|
|
double pressure_min;
|
|
double pressure_max;
|
|
double distance;
|
|
double distance_max;
|
|
double radius_major;
|
|
double radius_minor;
|
|
double radius_min;
|
|
double radius_max;
|
|
double orientation;
|
|
double tilt;
|
|
|
|
void Clear();
|
|
};
|
|
|
|
} // namespace blink
|
|
|
|
#endif // FLUTTER_LIB_UI_WINDOW_POINTER_DATA_H_
|