mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
38 lines
1.0 KiB
C++
38 lines
1.0 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 SKY_SHELL_PLATFORM_MOJO_POINTER_CONVERTER_MOJO_H_
|
|
#define SKY_SHELL_PLATFORM_MOJO_POINTER_CONVERTER_MOJO_H_
|
|
|
|
#include <map>
|
|
|
|
#include "base/macros.h"
|
|
#include "mojo/services/input_events/interfaces/input_events.mojom.h"
|
|
#include "sky/services/pointer/pointer.mojom.h"
|
|
|
|
namespace sky {
|
|
namespace shell {
|
|
|
|
class PointerConverterMojo {
|
|
public:
|
|
PointerConverterMojo();
|
|
~PointerConverterMojo();
|
|
|
|
pointer::PointerPacketPtr ConvertEvent(mojo::EventPtr event);
|
|
|
|
private:
|
|
pointer::PointerPtr CreatePointer(pointer::PointerType type,
|
|
mojo::Event* event,
|
|
mojo::PointerData* data);
|
|
|
|
std::map<int, std::pair<float, float>> pointer_positions_;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(PointerConverterMojo);
|
|
};
|
|
|
|
} // namespace shell
|
|
} // namespace sky
|
|
|
|
#endif // SKY_SHELL_PLATFORM_MOJO_POINTER_CONVERTER_MOJO_H_
|