#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/ozone/platform/wayland/host/wayland_zaura_shell.h"
#include <cstring>
#include <components/exo/wayland/protocol/aura-shell-client-protocol.h>
#include "base/check.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "base/strings/utf_string_conversions.h"
#include "base/version.h"
#include "ui/gfx/geometry/rounded_corners_f.h"
#include "ui/ozone/common/features.h"
#include "ui/ozone/platform/wayland/host/wayland_connection.h"
#include "ui/ozone/platform/wayland/host/wayland_output_manager.h"
#include "ui/ozone/platform/wayland/host/wayland_screen.h"
#include "ui/ozone/platform/wayland/host/wayland_toplevel_window.h"
#include "ui/ozone/platform/wayland/host/wayland_window.h"
namespace ui {
namespace {
constexpr uint32_t kMinVersion = …;
constexpr uint32_t kMaxVersion = …;
}
constexpr char WaylandZAuraShell::kInterfaceName[];
void WaylandZAuraShell::Instantiate(WaylandConnection* connection,
wl_registry* registry,
uint32_t name,
const std::string& interface,
uint32_t version) { … }
WaylandZAuraShell::WaylandZAuraShell(zaura_shell* aura_shell,
WaylandConnection* connection)
: … { … }
WaylandZAuraShell::~WaylandZAuraShell() = default;
std::string WaylandZAuraShell::GetDeskName(int index) const { … }
int WaylandZAuraShell::GetNumberOfDesks() { … }
int WaylandZAuraShell::GetActiveDeskIndex() const { … }
gfx::RoundedCornersF WaylandZAuraShell::GetWindowCornersRadii() const { … }
void WaylandZAuraShell::OnLayoutMode(void* data,
struct zaura_shell* zaura_shell,
uint32_t layout_mode) { … }
void WaylandZAuraShell::OnBugFix(void* data,
struct zaura_shell* zaura_shell,
uint32_t id) { … }
void WaylandZAuraShell::OnDesksChanged(void* data,
struct zaura_shell* zaura_shell,
struct wl_array* states) { … }
void WaylandZAuraShell::OnDeskActivationChanged(void* data,
struct zaura_shell* zaura_shell,
int active_desk_index) { … }
void WaylandZAuraShell::OnActivated(void* data,
struct zaura_shell* zaura_shell,
wl_surface* gained_active,
wl_surface* lost_active) { … }
void WaylandZAuraShell::OnSetOverviewMode(void* data,
struct zaura_shell* zaura_shell) { … }
void WaylandZAuraShell::OnUnsetOverviewMode(void* data,
struct zaura_shell* zaura_shell) { … }
void WaylandZAuraShell::OnCompositorVersion(void* data,
struct zaura_shell* zaura_shell,
const char* version_label) { … }
void WaylandZAuraShell::OnAllBugFixesSent(void* data,
struct zaura_shell* zaura_shell) { … }
void WaylandZAuraShell::OnSetWindowCornersRadii(void* data,
struct zaura_shell* zaura_shell,
uint32_t upper_left_radius,
uint32_t upper_right_radius,
uint32_t lower_right_radius,
uint32_t lower_left_radius) { … }
}