// This file was generated by qtwaylandscanner
// source file is wlr-output-power-management-unstable-v1.xml

#ifndef QT_WAYLAND_WLR_OUTPUT_POWER_MANAGEMENT_UNSTABLE_V1
#define QT_WAYLAND_WLR_OUTPUT_POWER_MANAGEMENT_UNSTABLE_V1

#include "wayland-wlr-output-power-management-unstable-v1-client-protocol.h"
#include <QByteArray>
#include <QString>

struct wl_registry;

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

namespace QtWayland {
    class  zwlr_output_power_manager_v1
    {
    public:
        zwlr_output_power_manager_v1(struct ::wl_registry *registry, uint32_t id, int version);
        zwlr_output_power_manager_v1(struct ::zwlr_output_power_manager_v1 *object);
        zwlr_output_power_manager_v1();

        virtual ~zwlr_output_power_manager_v1();

        void init(struct ::wl_registry *registry, uint32_t id, int version);
        void init(struct ::zwlr_output_power_manager_v1 *object);

        struct ::zwlr_output_power_manager_v1 *object() { return m_zwlr_output_power_manager_v1; }
        const struct ::zwlr_output_power_manager_v1 *object() const { return m_zwlr_output_power_manager_v1; }
        static zwlr_output_power_manager_v1 *fromObject(struct ::zwlr_output_power_manager_v1 *object);

        bool isInitialized() const;

        uint32_t version() const;
        static const struct ::wl_interface *interface();

        struct ::zwlr_output_power_v1 *get_output_power(struct ::wl_output *output);
        void destroy();

    private:
        struct ::zwlr_output_power_manager_v1 *m_zwlr_output_power_manager_v1;
    };

    class  zwlr_output_power_v1
    {
    public:
        zwlr_output_power_v1(struct ::wl_registry *registry, uint32_t id, int version);
        zwlr_output_power_v1(struct ::zwlr_output_power_v1 *object);
        zwlr_output_power_v1();

        virtual ~zwlr_output_power_v1();

        void init(struct ::wl_registry *registry, uint32_t id, int version);
        void init(struct ::zwlr_output_power_v1 *object);

        struct ::zwlr_output_power_v1 *object() { return m_zwlr_output_power_v1; }
        const struct ::zwlr_output_power_v1 *object() const { return m_zwlr_output_power_v1; }
        static zwlr_output_power_v1 *fromObject(struct ::zwlr_output_power_v1 *object);

        bool isInitialized() const;

        uint32_t version() const;
        static const struct ::wl_interface *interface();

        enum mode {
            mode_off = 0, // Output is turned off.
            mode_on = 1, // Output is turned on, no power saving
        };

        enum error {
            error_invalid_mode = 1, // nonexistent power save mode
        };

        void set_mode(uint32_t mode);
        void destroy();

    protected:
        virtual void zwlr_output_power_v1_mode(uint32_t mode);
        virtual void zwlr_output_power_v1_failed();

    private:
        void init_listener();
        static const struct zwlr_output_power_v1_listener m_zwlr_output_power_v1_listener;
        static void handle_mode(
            void *data,
            struct ::zwlr_output_power_v1 *object,
            uint32_t mode);
        static void handle_failed(
            void *data,
            struct ::zwlr_output_power_v1 *object);
        struct ::zwlr_output_power_v1 *m_zwlr_output_power_v1;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
