Flutter Engine
window.h
Go to the documentation of this file.
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"
17 
18 namespace flutter {
19 class Window final {
20  public:
21  Window(int64_t window_id, ViewportMetrics metrics);
22 
23  ~Window();
24 
25  int window_id() const { return window_id_; }
26 
27  const ViewportMetrics& viewport_metrics() const { return viewport_metrics_; }
28 
29  void DispatchPointerDataPacket(const PointerDataPacket& packet);
30  void UpdateWindowMetrics(const ViewportMetrics& metrics);
31 
32  private:
34  int64_t window_id_;
35  ViewportMetrics viewport_metrics_;
36 };
37 
38 } // namespace flutter
39 
40 #endif // FLUTTER_LIB_UI_WINDOW_WINDOW_H_
int window_id() const
Definition: window.h:25
Window(int64_t window_id, ViewportMetrics metrics)
Definition: window.cc:14
void DispatchPointerDataPacket(const PointerDataPacket &packet)
Definition: window.cc:22
const ViewportMetrics & viewport_metrics() const
Definition: window.h:27
void UpdateWindowMetrics(const ViewportMetrics &metrics)
Definition: window.cc:39