/****************************************************************************
** Meta object code from reading C++ file 'wtextinputv2_p.h'
**
** Created by: The Qt Meta Object Compiler version 69 (Qt 6.11.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#include "../../../../../../waylib/src/server/protocols/private/wtextinputv2_p.h"
#include "private/wserver_p.h"
#include "wsurface.h"
#include "winputmethodv2_p.h"
#include <QtCore/qmetatype.h>

#include <QtCore/qtmochelpers.h>

#include <memory>


#include <QtCore/qxptype_traits.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'wtextinputv2_p.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif

#ifndef Q_CONSTINIT
#define Q_CONSTINIT
#endif

QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
QT_WARNING_DISABLE_GCC("-Wuseless-cast")
namespace {
struct qt_meta_tag_ZN6Waylib6Server12WTextInputV2E_t {};
} // unnamed namespace

template <> constexpr inline auto Waylib::Server::WTextInputV2::qt_create_metaobjectdata<qt_meta_tag_ZN6Waylib6Server12WTextInputV2E_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Waylib::Server::WTextInputV2",
        "enableOnSurface",
        "",
        "WSurface*",
        "surface",
        "disableOnSurface",
        "stateUpdated",
        "UpdateReason",
        "reason",
        "sendEnter",
        "sendLeave",
        "sendDone",
        "handleIMCommitted",
        "WInputMethodV2*",
        "im",
        "Change",
        "Full",
        "Reset",
        "Enter",
        "PreeditStyle",
        "PS_Default",
        "PS_None",
        "PS_Active",
        "PS_Inactive",
        "PS_Highlight",
        "PS_Underline",
        "PS_Selection",
        "PS_Incorrect"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'enableOnSurface'
        QtMocHelpers::SignalData<void(WSurface *)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Signal 'disableOnSurface'
        QtMocHelpers::SignalData<void(WSurface *)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Signal 'stateUpdated'
        QtMocHelpers::SignalData<void(enum UpdateReason)>(6, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 7, 8 },
        }}),
        // Slot 'sendEnter'
        QtMocHelpers::SlotData<void(WSurface *)>(9, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Slot 'sendLeave'
        QtMocHelpers::SlotData<void()>(10, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'sendDone'
        QtMocHelpers::SlotData<void()>(11, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'handleIMCommitted'
        QtMocHelpers::SlotData<void(WInputMethodV2 *)>(12, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 13, 14 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'UpdateReason'
        QtMocHelpers::EnumData<enum UpdateReason>(7, 7, QMC::EnumFlags{}).add({
            {   15, UpdateReason::Change },
            {   16, UpdateReason::Full },
            {   17, UpdateReason::Reset },
            {   18, UpdateReason::Enter },
        }),
        // enum 'PreeditStyle'
        QtMocHelpers::EnumData<enum PreeditStyle>(19, 19, QMC::EnumFlags{}).add({
            {   20, PreeditStyle::PS_Default },
            {   21, PreeditStyle::PS_None },
            {   22, PreeditStyle::PS_Active },
            {   23, PreeditStyle::PS_Inactive },
            {   24, PreeditStyle::PS_Highlight },
            {   25, PreeditStyle::PS_Underline },
            {   26, PreeditStyle::PS_Selection },
            {   27, PreeditStyle::PS_Incorrect },
        }),
    };
    return QtMocHelpers::metaObjectData<WTextInputV2, qt_meta_tag_ZN6Waylib6Server12WTextInputV2E_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Waylib::Server::WTextInputV2::staticMetaObject = { {
    QMetaObject::SuperData::link<WTextInput::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6Waylib6Server12WTextInputV2E_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6Waylib6Server12WTextInputV2E_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN6Waylib6Server12WTextInputV2E_t>.metaTypes,
    nullptr
} };

void Waylib::Server::WTextInputV2::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<WTextInputV2 *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->enableOnSurface((*reinterpret_cast<std::add_pointer_t<WSurface*>>(_a[1]))); break;
        case 1: _t->disableOnSurface((*reinterpret_cast<std::add_pointer_t<WSurface*>>(_a[1]))); break;
        case 2: _t->stateUpdated((*reinterpret_cast<std::add_pointer_t<enum UpdateReason>>(_a[1]))); break;
        case 3: _t->sendEnter((*reinterpret_cast<std::add_pointer_t<WSurface*>>(_a[1]))); break;
        case 4: _t->sendLeave(); break;
        case 5: _t->sendDone(); break;
        case 6: _t->handleIMCommitted((*reinterpret_cast<std::add_pointer_t<WInputMethodV2*>>(_a[1]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (WTextInputV2::*)(WSurface * )>(_a, &WTextInputV2::enableOnSurface, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (WTextInputV2::*)(WSurface * )>(_a, &WTextInputV2::disableOnSurface, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (WTextInputV2::*)(UpdateReason )>(_a, &WTextInputV2::stateUpdated, 2))
            return;
    }
}

const QMetaObject *Waylib::Server::WTextInputV2::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}

void *Waylib::Server::WTextInputV2::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6Waylib6Server12WTextInputV2E_t>.strings))
        return static_cast<void*>(this);
    return WTextInput::qt_metacast(_clname);
}

int Waylib::Server::WTextInputV2::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = WTextInput::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 7)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 7;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 7)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 7;
    }
    return _id;
}

// SIGNAL 0
void Waylib::Server::WTextInputV2::enableOnSurface(WSurface * _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void Waylib::Server::WTextInputV2::disableOnSurface(WSurface * _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}

// SIGNAL 2
void Waylib::Server::WTextInputV2::stateUpdated(UpdateReason _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1);
}
namespace {
struct qt_meta_tag_ZN6Waylib6Server19WTextInputManagerV2E_t {};
} // unnamed namespace

template <> constexpr inline auto Waylib::Server::WTextInputManagerV2::qt_create_metaobjectdata<qt_meta_tag_ZN6Waylib6Server19WTextInputManagerV2E_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Waylib::Server::WTextInputManagerV2",
        "newTextInput",
        "",
        "WTextInputV2*",
        "textInput"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'newTextInput'
        QtMocHelpers::SignalData<void(WTextInputV2 *)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<WTextInputManagerV2, qt_meta_tag_ZN6Waylib6Server19WTextInputManagerV2E_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Waylib::Server::WTextInputManagerV2::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6Waylib6Server19WTextInputManagerV2E_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6Waylib6Server19WTextInputManagerV2E_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN6Waylib6Server19WTextInputManagerV2E_t>.metaTypes,
    nullptr
} };

void Waylib::Server::WTextInputManagerV2::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<WTextInputManagerV2 *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->newTextInput((*reinterpret_cast<std::add_pointer_t<WTextInputV2*>>(_a[1]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 0:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< WTextInputV2* >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (WTextInputManagerV2::*)(WTextInputV2 * )>(_a, &WTextInputManagerV2::newTextInput, 0))
            return;
    }
}

const QMetaObject *Waylib::Server::WTextInputManagerV2::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}

void *Waylib::Server::WTextInputManagerV2::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6Waylib6Server19WTextInputManagerV2E_t>.strings))
        return static_cast<void*>(this);
    if (!strcmp(_clname, "WObject"))
        return static_cast< WObject*>(this);
    if (!strcmp(_clname, "WServerInterface"))
        return static_cast< WServerInterface*>(this);
    return QObject::qt_metacast(_clname);
}

int Waylib::Server::WTextInputManagerV2::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 1)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 1;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 1)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 1;
    }
    return _id;
}

// SIGNAL 0
void Waylib::Server::WTextInputManagerV2::newTextInput(WTextInputV2 * _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}
QT_WARNING_POP
