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