• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_LIB_UI_WINDOW_POINTER_DATA_PACKET_H_
6 #define FLUTTER_LIB_UI_WINDOW_POINTER_DATA_PACKET_H_
7 
8 #include <string.h>
9 
10 #include <vector>
11 
12 #include "flutter/fml/macros.h"
13 #include "flutter/lib/ui/window/pointer_data.h"
14 
15 namespace flutter {
16 
17 class PointerDataPacket {
18  public:
19   explicit PointerDataPacket(size_t count);
20   PointerDataPacket(uint8_t* data, size_t num_bytes);
21   ~PointerDataPacket();
22 
23   void SetPointerData(size_t i, const PointerData& data);
data()24   const std::vector<uint8_t>& data() const { return data_; }
25 
26  private:
27   std::vector<uint8_t> data_;
28 
29   FML_DISALLOW_COPY_AND_ASSIGN(PointerDataPacket);
30 };
31 
32 }  // namespace flutter
33 
34 #endif  // FLUTTER_LIB_UI_WINDOW_POINTER_DATA_PACKET_H_
35