// This file was generated by qtwaylandscanner
// source file is /build/kwin/src/kwin-6.2.3/src/wayland/protocols/xx-color-management-v4.xml

#ifndef QT_WAYLAND_SERVER_XX_COLOR_MANAGEMENT_V4
#define QT_WAYLAND_SERVER_XX_COLOR_MANAGEMENT_V4

#include "wayland-server-core.h"
#include "wayland-xx-color-management-v4-server-protocol.h"
#include <QByteArray>
#include <QMultiMap>
#include <QString>

#include <unistd.h>

#ifndef WAYLAND_VERSION_CHECK
#define WAYLAND_VERSION_CHECK(major, minor, micro) \
    ((WAYLAND_VERSION_MAJOR > (major)) || \
    (WAYLAND_VERSION_MAJOR == (major) && WAYLAND_VERSION_MINOR > (minor)) || \
    (WAYLAND_VERSION_MAJOR == (major) && WAYLAND_VERSION_MINOR == (minor) && WAYLAND_VERSION_MICRO >= (micro)))
#endif

QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
QT_WARNING_DISABLE_CLANG("-Wmissing-field-initializers")

namespace QtWaylandServer {
    class  xx_color_manager_v4
    {
    public:
        xx_color_manager_v4(struct ::wl_client *client, int id, int version);
        xx_color_manager_v4(struct ::wl_display *display, int version);
        xx_color_manager_v4(struct ::wl_resource *resource);
        xx_color_manager_v4();

        virtual ~xx_color_manager_v4();

        class Resource
        {
        public:
            Resource() : xx_color_manager_v4_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            xx_color_manager_v4 *xx_color_manager_v4_object;
            xx_color_manager_v4 *object() { return xx_color_manager_v4_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        enum error {
            error_unsupported_feature = 0, // request not supported
            error_surface_exists = 1, // color management surface exists already
        };

        enum render_intent {
            render_intent_perceptual = 0, // perceptual
            render_intent_relative = 1, // media-relative colorimetric
            render_intent_saturation = 2, // saturation
            render_intent_absolute = 3, // ICC-absolute colorimetric
            render_intent_relative_bpc = 4, // media-relative colorimetric + black point compensation
        };

        enum feature {
            feature_icc_v2_v4 = 0, // new_icc_creator request
            feature_parametric = 1, // new_parametric_creator request
            feature_set_primaries = 2, // parametric set_primaries request
            feature_set_tf_power = 3, // parametric set_tf_power request
            feature_set_luminances = 4, // parametric set_luminances request
            feature_set_mastering_display_primaries = 5,
            feature_extended_target_volume = 6,
        };

        enum primaries {
            primaries_srgb = 0,
            primaries_pal_m = 1,
            primaries_pal = 2,
            primaries_ntsc = 3,
            primaries_generic_film = 4,
            primaries_bt2020 = 5,
            primaries_cie1931_xyz = 6,
            primaries_dci_p3 = 7,
            primaries_display_p3 = 8,
            primaries_adobe_rgb = 9,
        };

        enum transfer_function {
            transfer_function_bt709 = 0,
            transfer_function_gamma22 = 1,
            transfer_function_gamma28 = 2,
            transfer_function_st240 = 3,
            transfer_function_linear = 4,
            transfer_function_log_100 = 5,
            transfer_function_log_316 = 6,
            transfer_function_xvycc = 7,
            transfer_function_bt1361 = 8,
            transfer_function_srgb = 9,
            transfer_function_ext_srgb = 10,
            transfer_function_st2084_pq = 11,
            transfer_function_st428 = 12,
            transfer_function_hlg = 13,
        };

        void send_supported_intent(uint32_t render_intent);
        void send_supported_intent(struct ::wl_resource *resource, uint32_t render_intent);
        void send_supported_feature(uint32_t feature);
        void send_supported_feature(struct ::wl_resource *resource, uint32_t feature);
        void send_supported_tf_named(uint32_t tf);
        void send_supported_tf_named(struct ::wl_resource *resource, uint32_t tf);
        void send_supported_primaries_named(uint32_t primaries);
        void send_supported_primaries_named(struct ::wl_resource *resource, uint32_t primaries);

    protected:
        virtual Resource *xx_color_manager_v4_allocate();

        virtual void xx_color_manager_v4_destroy_global();

        virtual void xx_color_manager_v4_bind_resource(Resource *resource);
        virtual void xx_color_manager_v4_destroy_resource(Resource *resource);

        virtual void xx_color_manager_v4_destroy(Resource *resource);
        virtual void xx_color_manager_v4_get_output(Resource *resource, uint32_t id, struct ::wl_resource *output);
        virtual void xx_color_manager_v4_get_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface);
        virtual void xx_color_manager_v4_get_feedback_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface);
        virtual void xx_color_manager_v4_new_icc_creator(Resource *resource, uint32_t obj);
        virtual void xx_color_manager_v4_new_parametric_creator(Resource *resource, uint32_t obj);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        static const struct ::xx_color_manager_v4_interface m_xx_color_manager_v4_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_get_output(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t id,
            struct ::wl_resource *output);
        static void handle_get_surface(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t id,
            struct ::wl_resource *surface);
        static void handle_get_feedback_surface(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t id,
            struct ::wl_resource *surface);
        static void handle_new_icc_creator(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t obj);
        static void handle_new_parametric_creator(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t obj);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            xx_color_manager_v4 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };

    class  xx_color_management_output_v4
    {
    public:
        xx_color_management_output_v4(struct ::wl_client *client, int id, int version);
        xx_color_management_output_v4(struct ::wl_display *display, int version);
        xx_color_management_output_v4(struct ::wl_resource *resource);
        xx_color_management_output_v4();

        virtual ~xx_color_management_output_v4();

        class Resource
        {
        public:
            Resource() : xx_color_management_output_v4_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            xx_color_management_output_v4 *xx_color_management_output_v4_object;
            xx_color_management_output_v4 *object() { return xx_color_management_output_v4_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        void send_image_description_changed();
        void send_image_description_changed(struct ::wl_resource *resource);

    protected:
        virtual Resource *xx_color_management_output_v4_allocate();

        virtual void xx_color_management_output_v4_destroy_global();

        virtual void xx_color_management_output_v4_bind_resource(Resource *resource);
        virtual void xx_color_management_output_v4_destroy_resource(Resource *resource);

        virtual void xx_color_management_output_v4_destroy(Resource *resource);
        virtual void xx_color_management_output_v4_get_image_description(Resource *resource, uint32_t image_description);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        static const struct ::xx_color_management_output_v4_interface m_xx_color_management_output_v4_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_get_image_description(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t image_description);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            xx_color_management_output_v4 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };

    class  xx_color_management_surface_v4
    {
    public:
        xx_color_management_surface_v4(struct ::wl_client *client, int id, int version);
        xx_color_management_surface_v4(struct ::wl_display *display, int version);
        xx_color_management_surface_v4(struct ::wl_resource *resource);
        xx_color_management_surface_v4();

        virtual ~xx_color_management_surface_v4();

        class Resource
        {
        public:
            Resource() : xx_color_management_surface_v4_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            xx_color_management_surface_v4 *xx_color_management_surface_v4_object;
            xx_color_management_surface_v4 *object() { return xx_color_management_surface_v4_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        enum error {
            error_render_intent = 0, // unsupported rendering intent
            error_image_description = 1, // invalid image description
        };

    protected:
        virtual Resource *xx_color_management_surface_v4_allocate();

        virtual void xx_color_management_surface_v4_destroy_global();

        virtual void xx_color_management_surface_v4_bind_resource(Resource *resource);
        virtual void xx_color_management_surface_v4_destroy_resource(Resource *resource);

        virtual void xx_color_management_surface_v4_destroy(Resource *resource);
        virtual void xx_color_management_surface_v4_set_image_description(Resource *resource, struct ::wl_resource *image_description, uint32_t render_intent);
        virtual void xx_color_management_surface_v4_unset_image_description(Resource *resource);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        static const struct ::xx_color_management_surface_v4_interface m_xx_color_management_surface_v4_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_set_image_description(
            ::wl_client *client,
            struct wl_resource *resource,
            struct ::wl_resource *image_description,
            uint32_t render_intent);
        static void handle_unset_image_description(
            ::wl_client *client,
            struct wl_resource *resource);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            xx_color_management_surface_v4 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };

    class  xx_color_management_feedback_surface_v4
    {
    public:
        xx_color_management_feedback_surface_v4(struct ::wl_client *client, int id, int version);
        xx_color_management_feedback_surface_v4(struct ::wl_display *display, int version);
        xx_color_management_feedback_surface_v4(struct ::wl_resource *resource);
        xx_color_management_feedback_surface_v4();

        virtual ~xx_color_management_feedback_surface_v4();

        class Resource
        {
        public:
            Resource() : xx_color_management_feedback_surface_v4_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            xx_color_management_feedback_surface_v4 *xx_color_management_feedback_surface_v4_object;
            xx_color_management_feedback_surface_v4 *object() { return xx_color_management_feedback_surface_v4_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        enum error {
            error_inert = 0, // forbidden request on inert object
        };

        void send_preferred_changed();
        void send_preferred_changed(struct ::wl_resource *resource);

    protected:
        virtual Resource *xx_color_management_feedback_surface_v4_allocate();

        virtual void xx_color_management_feedback_surface_v4_destroy_global();

        virtual void xx_color_management_feedback_surface_v4_bind_resource(Resource *resource);
        virtual void xx_color_management_feedback_surface_v4_destroy_resource(Resource *resource);

        virtual void xx_color_management_feedback_surface_v4_destroy(Resource *resource);
        virtual void xx_color_management_feedback_surface_v4_get_preferred(Resource *resource, uint32_t image_description);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        static const struct ::xx_color_management_feedback_surface_v4_interface m_xx_color_management_feedback_surface_v4_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_get_preferred(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t image_description);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            xx_color_management_feedback_surface_v4 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };

    class  xx_image_description_creator_icc_v4
    {
    public:
        xx_image_description_creator_icc_v4(struct ::wl_client *client, int id, int version);
        xx_image_description_creator_icc_v4(struct ::wl_display *display, int version);
        xx_image_description_creator_icc_v4(struct ::wl_resource *resource);
        xx_image_description_creator_icc_v4();

        virtual ~xx_image_description_creator_icc_v4();

        class Resource
        {
        public:
            Resource() : xx_image_description_creator_icc_v4_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            xx_image_description_creator_icc_v4 *xx_image_description_creator_icc_v4_object;
            xx_image_description_creator_icc_v4 *object() { return xx_image_description_creator_icc_v4_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        enum error {
            error_incomplete_set = 0, // incomplete parameter set
            error_already_set = 1, // property already set
            error_bad_fd = 2, // fd not seekable and readable
            error_bad_size = 3, // no or too much data
            error_out_of_file = 4, // offset + length exceeds file size
        };

    protected:
        virtual Resource *xx_image_description_creator_icc_v4_allocate();

        virtual void xx_image_description_creator_icc_v4_destroy_global();

        virtual void xx_image_description_creator_icc_v4_bind_resource(Resource *resource);
        virtual void xx_image_description_creator_icc_v4_destroy_resource(Resource *resource);

        virtual void xx_image_description_creator_icc_v4_create(Resource *resource, uint32_t image_description);
        virtual void xx_image_description_creator_icc_v4_set_icc_file(Resource *resource, int32_t icc_profile, uint32_t offset, uint32_t length);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        static const struct ::xx_image_description_creator_icc_v4_interface m_xx_image_description_creator_icc_v4_interface;

        static void handle_create(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t image_description);
        static void handle_set_icc_file(
            ::wl_client *client,
            struct wl_resource *resource,
            int32_t icc_profile,
            uint32_t offset,
            uint32_t length);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            xx_image_description_creator_icc_v4 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };

    class  xx_image_description_creator_params_v4
    {
    public:
        xx_image_description_creator_params_v4(struct ::wl_client *client, int id, int version);
        xx_image_description_creator_params_v4(struct ::wl_display *display, int version);
        xx_image_description_creator_params_v4(struct ::wl_resource *resource);
        xx_image_description_creator_params_v4();

        virtual ~xx_image_description_creator_params_v4();

        class Resource
        {
        public:
            Resource() : xx_image_description_creator_params_v4_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            xx_image_description_creator_params_v4 *xx_image_description_creator_params_v4_object;
            xx_image_description_creator_params_v4 *object() { return xx_image_description_creator_params_v4_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        enum error {
            error_incomplete_set = 0, // incomplete parameter set
            error_inconsistent_set = 1, // invalid combination of parameters
            error_already_set = 2, // property already set
            error_unsupported_feature = 3, // request not supported
            error_invalid_tf = 4, // invalid transfer characteristic
            error_invalid_primaries = 5, // invalid primaries or white point
            error_invalid_luminance = 6, // invalid luminance value or range
            error_invalid_mastering = 7, // invalid mastering information
        };

    protected:
        virtual Resource *xx_image_description_creator_params_v4_allocate();

        virtual void xx_image_description_creator_params_v4_destroy_global();

        virtual void xx_image_description_creator_params_v4_bind_resource(Resource *resource);
        virtual void xx_image_description_creator_params_v4_destroy_resource(Resource *resource);

        virtual void xx_image_description_creator_params_v4_create(Resource *resource, uint32_t image_description);
        virtual void xx_image_description_creator_params_v4_set_tf_named(Resource *resource, uint32_t tf);
        virtual void xx_image_description_creator_params_v4_set_tf_power(Resource *resource, uint32_t eexp);
        virtual void xx_image_description_creator_params_v4_set_primaries_named(Resource *resource, uint32_t primaries);
        virtual void xx_image_description_creator_params_v4_set_primaries(Resource *resource, int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y);
        virtual void xx_image_description_creator_params_v4_set_luminances(Resource *resource, uint32_t min_lum, uint32_t max_lum, uint32_t reference_lum);
        virtual void xx_image_description_creator_params_v4_set_mastering_display_primaries(Resource *resource, int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y);
        virtual void xx_image_description_creator_params_v4_set_mastering_luminance(Resource *resource, uint32_t min_lum, uint32_t max_lum);
        virtual void xx_image_description_creator_params_v4_set_max_cll(Resource *resource, uint32_t max_cll);
        virtual void xx_image_description_creator_params_v4_set_max_fall(Resource *resource, uint32_t max_fall);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        static const struct ::xx_image_description_creator_params_v4_interface m_xx_image_description_creator_params_v4_interface;

        static void handle_create(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t image_description);
        static void handle_set_tf_named(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t tf);
        static void handle_set_tf_power(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t eexp);
        static void handle_set_primaries_named(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t primaries);
        static void handle_set_primaries(
            ::wl_client *client,
            struct wl_resource *resource,
            int32_t r_x,
            int32_t r_y,
            int32_t g_x,
            int32_t g_y,
            int32_t b_x,
            int32_t b_y,
            int32_t w_x,
            int32_t w_y);
        static void handle_set_luminances(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t min_lum,
            uint32_t max_lum,
            uint32_t reference_lum);
        static void handle_set_mastering_display_primaries(
            ::wl_client *client,
            struct wl_resource *resource,
            int32_t r_x,
            int32_t r_y,
            int32_t g_x,
            int32_t g_y,
            int32_t b_x,
            int32_t b_y,
            int32_t w_x,
            int32_t w_y);
        static void handle_set_mastering_luminance(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t min_lum,
            uint32_t max_lum);
        static void handle_set_max_cll(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t max_cll);
        static void handle_set_max_fall(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t max_fall);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            xx_image_description_creator_params_v4 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };

    class  xx_image_description_v4
    {
    public:
        xx_image_description_v4(struct ::wl_client *client, int id, int version);
        xx_image_description_v4(struct ::wl_display *display, int version);
        xx_image_description_v4(struct ::wl_resource *resource);
        xx_image_description_v4();

        virtual ~xx_image_description_v4();

        class Resource
        {
        public:
            Resource() : xx_image_description_v4_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            xx_image_description_v4 *xx_image_description_v4_object;
            xx_image_description_v4 *object() { return xx_image_description_v4_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        enum error {
            error_not_ready = 0, // attempted to use an object which is not ready
            error_no_information = 1, // get_information not allowed
        };

        enum cause {
            cause_low_version = 0, // interface version too low
            cause_unsupported = 1, // unsupported image description data
            cause_operating_system = 2, // error independent of the client
            cause_no_output = 3, // the relevant output no longer exists
        };

        void send_failed(uint32_t cause, const QString &msg);
        void send_failed(struct ::wl_resource *resource, uint32_t cause, const QString &msg);
        void send_ready(uint32_t identity);
        void send_ready(struct ::wl_resource *resource, uint32_t identity);

    protected:
        virtual Resource *xx_image_description_v4_allocate();

        virtual void xx_image_description_v4_destroy_global();

        virtual void xx_image_description_v4_bind_resource(Resource *resource);
        virtual void xx_image_description_v4_destroy_resource(Resource *resource);

        virtual void xx_image_description_v4_destroy(Resource *resource);
        virtual void xx_image_description_v4_get_information(Resource *resource, uint32_t information);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        static const struct ::xx_image_description_v4_interface m_xx_image_description_v4_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_get_information(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t information);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            xx_image_description_v4 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };

    class  xx_image_description_info_v4
    {
    public:
        xx_image_description_info_v4(struct ::wl_client *client, int id, int version);
        xx_image_description_info_v4(struct ::wl_display *display, int version);
        xx_image_description_info_v4(struct ::wl_resource *resource);
        xx_image_description_info_v4();

        virtual ~xx_image_description_info_v4();

        class Resource
        {
        public:
            Resource() : xx_image_description_info_v4_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            xx_image_description_info_v4 *xx_image_description_info_v4_object;
            xx_image_description_info_v4 *object() { return xx_image_description_info_v4_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        void send_done();
        void send_done(struct ::wl_resource *resource);
        void send_icc_file(int32_t icc, uint32_t icc_size);
        void send_icc_file(struct ::wl_resource *resource, int32_t icc, uint32_t icc_size);
        void send_primaries(int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y);
        void send_primaries(struct ::wl_resource *resource, int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y);
        void send_primaries_named(uint32_t primaries);
        void send_primaries_named(struct ::wl_resource *resource, uint32_t primaries);
        void send_tf_power(uint32_t eexp);
        void send_tf_power(struct ::wl_resource *resource, uint32_t eexp);
        void send_tf_named(uint32_t tf);
        void send_tf_named(struct ::wl_resource *resource, uint32_t tf);
        void send_luminances(uint32_t min_lum, uint32_t max_lum, uint32_t reference_lum);
        void send_luminances(struct ::wl_resource *resource, uint32_t min_lum, uint32_t max_lum, uint32_t reference_lum);
        void send_target_primaries(int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y);
        void send_target_primaries(struct ::wl_resource *resource, int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y);
        void send_target_luminance(uint32_t min_lum, uint32_t max_lum);
        void send_target_luminance(struct ::wl_resource *resource, uint32_t min_lum, uint32_t max_lum);
        void send_target_max_cll(uint32_t max_cll);
        void send_target_max_cll(struct ::wl_resource *resource, uint32_t max_cll);
        void send_target_max_fall(uint32_t max_fall);
        void send_target_max_fall(struct ::wl_resource *resource, uint32_t max_fall);

    protected:
        virtual Resource *xx_image_description_info_v4_allocate();

        virtual void xx_image_description_info_v4_destroy_global();

        virtual void xx_image_description_info_v4_bind_resource(Resource *resource);
        virtual void xx_image_description_info_v4_destroy_resource(Resource *resource);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            xx_image_description_info_v4 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
