Flutter Engine
 
Loading...
Searching...
No Matches
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#include <vector>
10
11namespace flutter {
12
15 ViewportMetrics(double p_device_pixel_ratio,
16 double p_physical_width,
17 double p_physical_height,
18 double p_physical_touch_slop,
19 size_t display_id);
20 ViewportMetrics(double p_device_pixel_ratio,
21 double p_physical_width,
22 double p_physical_height,
23 double p_physical_min_width_constraint,
24 double p_physical_max_width_constraint,
25 double p_physical_min_height_constraint,
26 double p_physical_max_height_constraint,
27 double p_physical_padding_top,
28 double p_physical_padding_right,
29 double p_physical_padding_bottom,
30 double p_physical_padding_left,
31 double p_physical_view_inset_top,
32 double p_physical_view_inset_right,
33 double p_physical_view_inset_bottom,
34 double p_physical_view_inset_left,
35 double p_physical_system_gesture_inset_top,
36 double p_physical_system_gesture_inset_right,
37 double p_physical_system_gesture_inset_bottom,
38 double p_physical_system_gesture_inset_left,
39 double p_physical_touch_slop,
40 const std::vector<double>& p_physical_display_features_bounds,
41 const std::vector<int>& p_physical_display_features_type,
42 const std::vector<int>& p_physical_display_features_state,
43 size_t p_display_id);
44 double device_pixel_ratio = 1.0;
45 double physical_width = 0;
46 double physical_height = 0;
63 double physical_touch_slop = -1.0;
67 size_t display_id = 0;
68};
69
70bool operator==(const ViewportMetrics& a, const ViewportMetrics& b);
71std::ostream& operator<<(std::ostream& os, const ViewportMetrics& a);
72
73} // namespace flutter
74
75#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)
std::vector< int > physical_display_features_type
std::vector< double > physical_display_features_bounds
std::vector< int > physical_display_features_state