chromium/ui/ozone/platform/wayland/host/org_kde_kwin_idle.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/ozone/platform/wayland/host/org_kde_kwin_idle.h"

#include <idle-client-protocol.h>

#include "base/logging.h"
#include "ui/ozone/platform/wayland/host/wayland_connection.h"
#include "ui/ozone/platform/wayland/host/wayland_seat.h"

namespace ui {

namespace {

constexpr uint32_t kMinVersion =;

// After the system has gone idle, it will wait for this time before notifying
// us.  This reduces "jitter" of the idle/active state, but also adds some lag
// in responsiveness: when we are finally notified that the idle state has come,
// it is already there for kIdleThresholdMs milliseconds.
constexpr uint64_t kIdleThresholdMs =;

}  // namespace

// Wraps the actual handling of system notifications about the idle state.
class OrgKdeKwinIdle::Timeout {};

// static
constexpr char OrgKdeKwinIdle::kInterfaceName[];

// static
void OrgKdeKwinIdle::Instantiate(WaylandConnection* connection,
                                 wl_registry* registry,
                                 uint32_t name,
                                 const std::string& interface,
                                 uint32_t version) {}

OrgKdeKwinIdle::OrgKdeKwinIdle(org_kde_kwin_idle* idle,
                               WaylandConnection* connection)
    :{}

OrgKdeKwinIdle::~OrgKdeKwinIdle() = default;

std::optional<base::TimeDelta> OrgKdeKwinIdle::GetIdleTime() const {}

OrgKdeKwinIdle::Timeout::Timeout(org_kde_kwin_idle_timeout* timeout)
    :{}

OrgKdeKwinIdle::Timeout::~Timeout() = default;

base::TimeDelta OrgKdeKwinIdle::Timeout::GetIdleTime() const {}

// static
void OrgKdeKwinIdle::Timeout::OnIdle(void* data,
                                     org_kde_kwin_idle_timeout* idle_timeout) {}

// static
void OrgKdeKwinIdle::Timeout::OnResumed(
    void* data,
    org_kde_kwin_idle_timeout* idle_timeout) {}

}  // namespace ui