forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewport_metrics.h
55 lines (47 loc) · 2.06 KB
/
viewport_metrics.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_LIB_UI_WINDOW_VIEWPORT_METRICS_H_
#define FLUTTER_LIB_UI_WINDOW_VIEWPORT_METRICS_H_
#include <ostream>
namespace flutter {
struct ViewportMetrics {
ViewportMetrics();
ViewportMetrics(double p_device_pixel_ratio,
double p_physical_width,
double p_physical_height);
ViewportMetrics(double p_device_pixel_ratio,
double p_physical_width,
double p_physical_height,
double p_physical_padding_top,
double p_physical_padding_right,
double p_physical_padding_bottom,
double p_physical_padding_left,
double p_physical_view_inset_top,
double p_physical_view_inset_right,
double p_physical_view_inset_bottom,
double p_physical_view_inset_left,
double p_physical_system_gesture_inset_top,
double p_physical_system_gesture_inset_right,
double p_physical_system_gesture_inset_bottom,
double p_physical_system_gesture_inset_left);
double device_pixel_ratio = 1.0;
double physical_width = 0;
double physical_height = 0;
double physical_padding_top = 0;
double physical_padding_right = 0;
double physical_padding_bottom = 0;
double physical_padding_left = 0;
double physical_view_inset_top = 0;
double physical_view_inset_right = 0;
double physical_view_inset_bottom = 0;
double physical_view_inset_left = 0;
double physical_system_gesture_inset_top = 0;
double physical_system_gesture_inset_right = 0;
double physical_system_gesture_inset_bottom = 0;
double physical_system_gesture_inset_left = 0;
};
bool operator==(const ViewportMetrics& a, const ViewportMetrics& b);
std::ostream& operator<<(std::ostream& os, const ViewportMetrics& a);
} // namespace flutter
#endif // FLUTTER_LIB_UI_WINDOW_VIEWPORT_METRICS_H_