blob: 897060c2ed485ff98cfa65fef296297d351b34c3 [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001/*
Dominik Laskowski3cb3d4e2019-11-21 11:14:45 -08002 * Copyright 2019 The Android Open Source Project
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Dominik Laskowski3cb3d4e2019-11-21 11:14:45 -080017#pragma once
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080018
Marin Shalamanovf5de90d2019-10-08 10:57:25 +020019#include <optional>
Dominik Laskowski3cb3d4e2019-11-21 11:14:45 -080020#include <type_traits>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080021
Marin Shalamanovf5de90d2019-10-08 10:57:25 +020022#include <ui/DeviceProductInfo.h>
23
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080024namespace android {
25
Dominik Laskowski55c85402020-01-21 16:25:47 -080026enum class DisplayConnectionType { Internal, External };
27
Dominik Laskowski3cb3d4e2019-11-21 11:14:45 -080028// Immutable information about physical display.
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080029struct DisplayInfo {
Dominik Laskowski55c85402020-01-21 16:25:47 -080030 DisplayConnectionType connectionType = DisplayConnectionType::Internal;
Dominik Laskowski3cb3d4e2019-11-21 11:14:45 -080031 float density = 0.f;
32 bool secure = false;
Marin Shalamanovf5de90d2019-10-08 10:57:25 +020033 std::optional<DeviceProductInfo> deviceProductInfo;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080034};
35
Dominik Laskowski3cb3d4e2019-11-21 11:14:45 -080036static_assert(std::is_trivially_copyable_v<DisplayInfo>);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080037
Dominik Laskowski3cb3d4e2019-11-21 11:14:45 -080038} // namespace android