Flutter Engine
viewport_metrics.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_VIEWPORT_METRICS_H_
6 #define FLUTTER_LIB_UI_WINDOW_VIEWPORT_METRICS_H_
7 
8 #include <ostream>
9 
10 namespace flutter {
11 
14  ViewportMetrics(double p_device_pixel_ratio,
15  double p_physical_width,
16  double p_physical_height);
17  ViewportMetrics(double p_device_pixel_ratio,
18  double p_physical_width,
19  double p_physical_height,
20  double p_physical_padding_top,
21  double p_physical_padding_right,
22  double p_physical_padding_bottom,
23  double p_physical_padding_left,
24  double p_physical_view_inset_top,
25  double p_physical_view_inset_right,
26  double p_physical_view_inset_bottom,
27  double p_physical_view_inset_left,
28  double p_physical_system_gesture_inset_top,
29  double p_physical_system_gesture_inset_right,
30  double p_physical_system_gesture_inset_bottom,
31  double p_physical_system_gesture_inset_left);
32 
33  double device_pixel_ratio = 1.0;
34  double physical_width = 0;
35  double physical_height = 0;
48 };
49 
50 bool operator==(const ViewportMetrics& a, const ViewportMetrics& b);
51 std::ostream& operator<<(std::ostream& os, const ViewportMetrics& a);
52 
53 } // namespace flutter
54 
55 #endif // FLUTTER_LIB_UI_WINDOW_VIEWPORT_METRICS_H_
std::ostream & operator<<(std::ostream &os, const ViewportMetrics &a)
bool operator==(const ViewportMetrics &a, const ViewportMetrics &b)