#include "ui/ozone/platform/wayland/host/wayland_zaura_output_manager_v2.h"
#include <components/exo/wayland/protocol/aura-output-management-client-protocol.h>
#include <algorithm>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "ui/base/wayland/wayland_display_util.h"
#include "ui/display/screen.h"
#include "ui/ozone/platform/wayland/host/wayland_connection.h"
#include "ui/ozone/platform/wayland/host/wayland_output_manager.h"
namespace ui {
namespace {
constexpr uint32_t kMinVersion = …;
constexpr uint32_t kMaxVersion = …;
}
constexpr char WaylandZAuraOutputManagerV2::kInterfaceName[];
void WaylandZAuraOutputManagerV2::Instantiate(WaylandConnection* connection,
wl_registry* registry,
uint32_t name,
const std::string& interface,
uint32_t version) { … }
WaylandZAuraOutputManagerV2::WaylandZAuraOutputManagerV2(
zaura_output_manager_v2* output_manager,
WaylandConnection* connection)
: … { … }
WaylandZAuraOutputManagerV2::~WaylandZAuraOutputManagerV2() = default;
void WaylandZAuraOutputManagerV2::ScheduleRemoveWaylandOutput(
WaylandOutput::Id output_id) { … }
void WaylandZAuraOutputManagerV2::DumpState(std::ostream& out) const { … }
WaylandOutput* WaylandZAuraOutputManagerV2::GetWaylandOutput(
WaylandOutput::Id output_id) { … }
bool WaylandZAuraOutputManagerV2::IsReady(WaylandOutput::Id output_id) const { … }
void WaylandZAuraOutputManagerV2::RemoveOutput(WaylandOutput::Id output_id) { … }
void WaylandZAuraOutputManagerV2::OnDone(
void* data,
zaura_output_manager_v2* output_manager) { … }
void WaylandZAuraOutputManagerV2::OnDisplayId(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
uint32_t display_id_hi,
uint32_t display_id_lo) { … }
void WaylandZAuraOutputManagerV2::OnLogicalPosition(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
int32_t x,
int32_t y) { … }
void WaylandZAuraOutputManagerV2::OnLogicalSize(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
int32_t width,
int32_t height) { … }
void WaylandZAuraOutputManagerV2::OnPhysicalSize(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
int32_t width,
int32_t height) { … }
void WaylandZAuraOutputManagerV2::OnWorkAreaInsets(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
int32_t top,
int32_t left,
int32_t bottom,
int32_t right) { … }
void WaylandZAuraOutputManagerV2::OnDeviceScaleFactor(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
uint32_t scale_as_uint) { … }
void WaylandZAuraOutputManagerV2::OnLogicalTransform(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
int32_t transform) { … }
void WaylandZAuraOutputManagerV2::OnPanelTransform(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
int32_t transform) { … }
void WaylandZAuraOutputManagerV2::OnName(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
const char* name) { … }
void WaylandZAuraOutputManagerV2::OnDescription(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
const char* description) { … }
void WaylandZAuraOutputManagerV2::OnOverscanInsets(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id,
int32_t top,
int32_t left,
int32_t bottom,
int32_t right) { … }
void WaylandZAuraOutputManagerV2::OnActivated(
void* data,
zaura_output_manager_v2* output_manager,
uint32_t output_id) { … }
}