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_WINDOW_H_ |
6 | #define FLUTTER_LIB_UI_WINDOW_WINDOW_H_ |
7 | |
8 | #include <string> |
9 | #include <unordered_map> |
10 | #include <vector> |
11 | |
12 | #include "flutter/lib/ui/window/platform_message.h" |
13 | #include "flutter/lib/ui/window/pointer_data_packet.h" |
14 | #include "flutter/lib/ui/window/viewport_metrics.h" |
15 | #include "third_party/skia/include/gpu/GrDirectContext.h" |
16 | #include "third_party/tonic/dart_persistent_value.h" |
17 | |
18 | namespace flutter { |
19 | class Window final { |
20 | public: |
21 | explicit Window(ViewportMetrics metrics); |
22 | |
23 | ~Window(); |
24 | |
25 | const ViewportMetrics& viewport_metrics() const { return viewport_metrics_; } |
26 | |
27 | void DispatchPointerDataPacket(const PointerDataPacket& packet); |
28 | void UpdateWindowMetrics(const ViewportMetrics& metrics); |
29 | |
30 | private: |
31 | tonic::DartPersistentValue library_; |
32 | ViewportMetrics viewport_metrics_; |
33 | }; |
34 | |
35 | } // namespace flutter |
36 | |
37 | #endif // FLUTTER_LIB_UI_WINDOW_WINDOW_H_ |
38 |