# This file has been autogenerated by the pywayland scanner

# Copyright 2019 Sebastian Wick
# Copyright 2019 Erwin Burema
# Copyright 2020 AMD
# Copyright 2020-2024 Collabora, Ltd.
# Copyright 2024 Xaver Hugl
# Copyright 2022-2025 Red Hat, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

from __future__ import annotations

from pywayland.protocol_core import Global, Interface, Proxy, Resource


class WpImageDescriptionReferenceV1(Interface):
    """Reference to an image description

    This object is a reference to an image description. This interface is
    frozen at version 1 to allow other protocols to create
    :class:`~pywayland.protocol.color_management_v1.WpImageDescriptionV1`
    objects.

    The :func:`WpColorManagerV1.get_image_description()
    <pywayland.protocol.color_management_v1.WpColorManagerV1.get_image_description>`
    request can be used to retrieve the underlying image description.
    """

    name = "wp_image_description_reference_v1"
    version = 1


class WpImageDescriptionReferenceV1Proxy(Proxy[WpImageDescriptionReferenceV1]):
    interface = WpImageDescriptionReferenceV1

    @WpImageDescriptionReferenceV1.request()
    def destroy(self) -> None:
        """Destroy the reference

        Destroy this object. This has no effect on the referenced image
        description.
        """
        self._marshal(0)
        self._destroy()


class WpImageDescriptionReferenceV1Resource(Resource):
    interface = WpImageDescriptionReferenceV1


class WpImageDescriptionReferenceV1Global(Global):
    interface = WpImageDescriptionReferenceV1


WpImageDescriptionReferenceV1._gen_c()
WpImageDescriptionReferenceV1.proxy_class = WpImageDescriptionReferenceV1Proxy
WpImageDescriptionReferenceV1.resource_class = WpImageDescriptionReferenceV1Resource
WpImageDescriptionReferenceV1.global_class = WpImageDescriptionReferenceV1Global
