2022-04-23 22:49:07 +04:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-12-28 19:15:37 +04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
class System;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
class HLERequestContext;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Service::NVFlinger {
|
|
|
|
class NVFlinger;
|
2022-05-19 09:27:35 +04:00
|
|
|
}
|
2020-12-28 19:15:37 +04:00
|
|
|
|
|
|
|
namespace Service::SM {
|
|
|
|
class ServiceManager;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Service::VI {
|
|
|
|
|
|
|
|
enum class DisplayResolution : u32 {
|
|
|
|
DockedWidth = 1920,
|
|
|
|
DockedHeight = 1080,
|
|
|
|
UndockedWidth = 1280,
|
|
|
|
UndockedHeight = 720,
|
|
|
|
};
|
|
|
|
|
|
|
|
/// Permission level for a particular VI service instance
|
|
|
|
enum class Permission {
|
|
|
|
User,
|
|
|
|
System,
|
|
|
|
Manager,
|
|
|
|
};
|
|
|
|
|
|
|
|
/// A policy type that may be requested via GetDisplayService and
|
|
|
|
/// GetDisplayServiceWithProxyNameExchange
|
|
|
|
enum class Policy {
|
|
|
|
User,
|
|
|
|
Compositor,
|
|
|
|
};
|
|
|
|
|
|
|
|
namespace detail {
|
|
|
|
void GetDisplayServiceImpl(Kernel::HLERequestContext& ctx, Core::System& system,
|
2022-05-19 09:27:35 +04:00
|
|
|
NVFlinger::NVFlinger& nv_flinger, Permission permission);
|
2020-12-28 19:15:37 +04:00
|
|
|
} // namespace detail
|
|
|
|
|
|
|
|
/// Registers all VI services with the specified service manager.
|
|
|
|
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system,
|
2022-05-19 09:27:35 +04:00
|
|
|
NVFlinger::NVFlinger& nv_flinger);
|
2020-12-28 19:15:37 +04:00
|
|
|
|
|
|
|
} // namespace Service::VI
|