Flutter Engine
The 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#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_padding_top,
24 double p_physical_padding_right,
25 double p_physical_padding_bottom,
26 double p_physical_padding_left,
27 double p_physical_view_inset_top,
28 double p_physical_view_inset_right,
29 double p_physical_view_inset_bottom,
30 double p_physical_view_inset_left,
31 double p_physical_system_gesture_inset_top,
32 double p_physical_system_gesture_inset_right,
33 double p_physical_system_gesture_inset_bottom,
34 double p_physical_system_gesture_inset_left,
35 double p_physical_touch_slop,
36 const std::vector<double>& p_physical_display_features_bounds,
37 const std::vector<int>& p_physical_display_features_type,
38 const std::vector<int>& p_physical_display_features_state,
39 size_t p_display_id);
40
41 double device_pixel_ratio = 1.0;
42 double physical_width = 0;
43 double physical_height = 0;
56 double physical_touch_slop = -1.0;
60 size_t display_id = 0;
61};
62
63bool operator==(const ViewportMetrics& a, const ViewportMetrics& b);
64std::ostream& operator<<(std::ostream& os, const ViewportMetrics& a);
65
66} // namespace flutter
67
68#endif // FLUTTER_LIB_UI_WINDOW_VIEWPORT_METRICS_H_
static bool b
struct MyStruct a[10]
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