// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
{% set header_guard = "COMPONENTS_EXO_WAYLAND_COMPATIBILITY_TEST_" + protocol.name|upper + "_CLIENT_HELPERS_H_" %}
#ifndef {{ header_guard }}
#define {{ header_guard }}
#include <memory>
#include <{{ protocol.filename }}-client-protocol.h>
namespace std {
{% for interface in protocol.interfaces|sort(attribute="name") %}
template <>
struct default_delete<struct {{ interface.name }}> {
void operator()(struct {{ interface.name }}*) noexcept;
};
{% endfor %}
} // namespace std
template <typename T>
struct WaylandGlobalInterfaceDescriptor;
{% for interface in protocol.interfaces|sort(attribute="name") %}
template <>
struct WaylandGlobalInterfaceDescriptor<struct {{ interface.name }}> {
using CType = struct {{ interface.name }};
static const wl_interface* protocol_interface;
static constexpr const char* interface_name = "{{ interface.name }}";
static constexpr uint32_t protocol_version = {{ interface.version }};
};
{% endfor %}
#endif /* {{ header_guard }} */