blob: d279a55eef1f42604fc8a2e578d5a44fcd533f31 [file] [log] [blame]
// Copyright 2015 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.
[DartPackage="sky_services"]
module pointer;
// See https://github.com/flutter/engine/blob/master/sky/specs/pointer.md
enum PointerType {
DOWN,
UP,
MOVE,
CANCEL,
};
enum PointerKind {
TOUCH,
MOUSE,
STYLUS,
INVERTED_STYLUS,
};
struct Pointer {
int64 time_stamp;
int32 pointer;
PointerType type;
PointerKind kind;
float x;
float y;
int32 buttons;
bool down;
bool primary;
bool obscured;
float pressure;
float pressure_min;
float pressure_max;
float distance;
float distance_min;
float distance_max;
float radius_major;
float radius_minor;
float radius_min;
float radius_max;
float orientation;
float tilt;
};
struct PointerPacket {
array<Pointer> pointers;
};
[ServiceName="pointer::PointerListener"]
interface PointerListener {
OnPointerPacket(PointerPacket packet);
};