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  double p_physical_touch_slop);
18  ViewportMetrics(double p_device_pixel_ratio,
19  double p_physical_width,
20  double p_physical_height,
21  double p_physical_padding_top,
22  double p_physical_padding_right,
23  double p_physical_padding_bottom,
24  double p_physical_padding_left,
25  double p_physical_view_inset_top,
26  double p_physical_view_inset_right,
27  double p_physical_view_inset_bottom,
28  double p_physical_view_inset_left,
29  double p_physical_system_gesture_inset_top,
30  double p_physical_system_gesture_inset_right,
31  double p_physical_system_gesture_inset_bottom,
32  double p_physical_system_gesture_inset_left,
33  double p_physical_touch_slop);
34 
35  double device_pixel_ratio = 1.0;
36  double physical_width = 0;
37  double physical_height = 0;
50  double physical_touch_slop = -1.0;
51 };
52 
53 bool operator==(const ViewportMetrics& a, const ViewportMetrics& b);
54 std::ostream& operator<<(std::ostream& os, const ViewportMetrics& a);
55 
56 } // namespace flutter
57 
58 #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)