/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt for Python.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

//workaround to access protected functions
#define protected public

// default includes
#include <shiboken.h>
#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QDebug>
#include <pysidesignal.h>
#include <pysideproperty.h>
#include <pyside.h>
#include <pysideqenum.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED

#include <typeinfo>
#include <signalmanager.h>
#include <pysidemetafunction.h>
#include <iterator>

// module include
#include "pyside6_qtgui_python.h"

// main header
#include "qinputdevice_wrapper.h"

// inner classes

#include <cctype>
#include <cstring>



template <class T>
static const char *typeNameOf(const T &t)
{
    const char *typeName =  typeid(t).name();
    auto size = std::strlen(typeName);
#if defined(Q_CC_MSVC) // MSVC: "class QPaintDevice * __ptr64"
    if (auto lastStar = strchr(typeName, '*')) {
        // MSVC: "class QPaintDevice * __ptr64"
        while (*--lastStar == ' ') {
        }
        size = lastStar - typeName + 1;
    }
#else // g++, Clang: "QPaintDevice *" -> "P12QPaintDevice"
    if (size > 2 && typeName[0] == 'P' && std::isdigit(typeName[1])) {
        ++typeName;
        --size;
    }
#endif
    char *result = new char[size + 1];
    result[size] = '\0';
    memcpy(result, typeName, size);
    return result;
}

// Native ---------------------------------------------------------

void QInputDeviceWrapper::resetPyMethodCache()
{
    std::fill_n(m_PyMethodCache, sizeof(m_PyMethodCache) / sizeof(m_PyMethodCache[0]), false);
}

QInputDeviceWrapper::QInputDeviceWrapper(QObject * parent) : QInputDevice(parent)
{
    resetPyMethodCache();
    // ... middle
}

QInputDeviceWrapper::QInputDeviceWrapper(const QString & name, qint64 systemId, QInputDevice::DeviceType type, const QString & seatName, QObject * parent) : QInputDevice(name, systemId, type, seatName, parent)
{
    resetPyMethodCache();
    // ... middle
}

void QInputDeviceWrapper::childEvent(QChildEvent * event)
{
    if (m_PyMethodCache[0]) {
        return this->::QObject::childEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "childEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[0] = true;
        return this->::QObject::childEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QCHILDEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QInputDeviceWrapper::connectNotify(const QMetaMethod & signal)
{
    if (m_PyMethodCache[1]) {
        return this->::QObject::connectNotify(signal);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "connectNotify";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[1] = true;
        return this->::QObject::connectNotify(signal);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAMETHOD_IDX], &signal)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QInputDeviceWrapper::customEvent(QEvent * event)
{
    if (m_PyMethodCache[2]) {
        return this->::QObject::customEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "customEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[2] = true;
        return this->::QObject::customEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QInputDeviceWrapper::disconnectNotify(const QMetaMethod & signal)
{
    if (m_PyMethodCache[3]) {
        return this->::QObject::disconnectNotify(signal);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "disconnectNotify";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[3] = true;
        return this->::QObject::disconnectNotify(signal);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAMETHOD_IDX], &signal)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

bool QInputDeviceWrapper::event(QEvent * event)
{
    if (m_PyMethodCache[4])
        return this->::QObject::event(event);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "event";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[4] = true;
        return this->::QObject::event(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QInputDevice.event",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

bool QInputDeviceWrapper::eventFilter(QObject * watched, QEvent * event)
{
    if (m_PyMethodCache[5])
        return this->::QObject::eventFilter(watched, event);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "eventFilter";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[5] = true;
        return this->::QObject::eventFilter(watched, event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(NN)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], watched),
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg2 = PyTuple_GET_ITEM(pyArgs, 1)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg2)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 1));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QInputDevice.eventFilter",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

void QInputDeviceWrapper::timerEvent(QTimerEvent * event)
{
    if (m_PyMethodCache[7]) {
        return this->::QObject::timerEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "timerEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[7] = true;
        return this->::QObject::timerEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QTIMEREVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

const QMetaObject *QInputDeviceWrapper::metaObject() const
{
    if (QObject::d_ptr->metaObject)
        return QObject::d_ptr->dynamicMetaObject();
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf == nullptr)
        return QInputDevice::metaObject();
    return PySide::SignalManager::retrieveMetaObject(reinterpret_cast<PyObject *>(pySelf));
}

int QInputDeviceWrapper::qt_metacall(QMetaObject::Call call, int id, void **args)
{
    int result = QInputDevice::qt_metacall(call, id, args);
    return result < 0 ? result : PySide::SignalManager::qt_metacall(this, call, id, args);
}

void *QInputDeviceWrapper::qt_metacast(const char *_clname)
{
    if (!_clname)
        return {};
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf && PySide::inherits(Py_TYPE(pySelf), _clname))
        return static_cast<void *>(const_cast< QInputDeviceWrapper *>(this));
    return QInputDevice::qt_metacast(_clname);
}

QInputDeviceWrapper::~QInputDeviceWrapper()
{
    SbkObject *wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this);
    Shiboken::Object::destroy(wrapper, this);
}

// Target ---------------------------------------------------------

extern "C" {
static int
Sbk_QInputDevice_Init(PyObject *self, PyObject *args, PyObject *kwds)
{
    const QMetaObject *metaObject;
    SbkObject *sbkSelf = reinterpret_cast<SbkObject *>(self);
    PySide::Feature::Select(self);
    if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::QInputDevice >()))
        return -1;

    ::QInputDeviceWrapper *cptr{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QInputDevice.__init__";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[5];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0, 0, 0, 0};

    // invalid argument lengths
    if (numArgs == 2)
        goto Sbk_QInputDevice_Init_TypeError;

    if (!PyArg_ParseTuple(args, "|OOOOO:QInputDevice", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]), &(pyArgs[4])))
        return -1;


    // Overloaded function decisor
    // 0: QInputDevice::QInputDevice(QObject*)
    // 1: QInputDevice::QInputDevice(QString,qint64,QInputDevice::DeviceType,QString,QObject*)
    if (numArgs == 0) {
        overloadId = 0; // QInputDevice(QObject*)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[0])))) {
        overloadId = 0; // QInputDevice(QObject*)
    } else if (numArgs >= 3
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), (pyArgs[1])))
        && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX]))->converter, (pyArgs[2])))) {
        if (numArgs == 3) {
            overloadId = 1; // QInputDevice(QString,qint64,QInputDevice::DeviceType,QString,QObject*)
        } else if (numArgs >= 4
            && (pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[3])))) {
            if (numArgs == 4) {
                overloadId = 1; // QInputDevice(QString,qint64,QInputDevice::DeviceType,QString,QObject*)
            } else if (numArgs >= 5
                && (pythonToCpp[4] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[4])))) {
                overloadId = 1; // QInputDevice(QString,qint64,QInputDevice::DeviceType,QString,QObject*)
            }
        }
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QInputDevice_Init_TypeError;

    // Call function/method
    switch (overloadId) {
        case 0: // QInputDevice(QObject * parent)
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                PyObject *value{};
                Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
                static PyObject *const key_parent = Shiboken::String::createStaticString("parent");
                if (PyDict_Contains(kwds, key_parent)) {
                    value = PyDict_GetItem(kwds, key_parent);
                    if (value && pyArgs[0]) {
                        errInfo.reset(key_parent);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QInputDevice_Init_TypeError;
                    }
                    if (value) {
                        pyArgs[0] = value;
                        if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[0]))))
                            goto Sbk_QInputDevice_Init_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_parent);
                }
                if (PyDict_Size(kwds_dup) > 0) {
                    errInfo.reset(kwds_dup.release());
                    // fall through to handle extra keyword signals and properties
                }
            }
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::QObject *cppArg0 = nullptr;
            if (pythonToCpp[0])
                pythonToCpp[0](pyArgs[0], &cppArg0);

            if (!PyErr_Occurred()) {
                // QInputDevice(QObject*)
                void *addr = PySide::nextQObjectMemoryAddr();
                if (addr) {
                    cptr = new (addr) ::QInputDeviceWrapper(cppArg0);
                    PySide::setNextQObjectMemoryAddr(0);
                } else {
                    cptr = new ::QInputDeviceWrapper(cppArg0);
                }

                Shiboken::Object::setParent(pyArgs[0], self);
            }
            break;
        }
        case 1: // QInputDevice(const QString & name, qint64 systemId, QInputDevice::DeviceType type, const QString & seatName, QObject * parent)
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                PyObject *value{};
                Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
                static PyObject *const key_seatName = Shiboken::String::createStaticString("seatName");
                if (PyDict_Contains(kwds, key_seatName)) {
                    value = PyDict_GetItem(kwds, key_seatName);
                    if (value && pyArgs[3]) {
                        errInfo.reset(key_seatName);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QInputDevice_Init_TypeError;
                    }
                    if (value) {
                        pyArgs[3] = value;
                        if (!(pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[3]))))
                            goto Sbk_QInputDevice_Init_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_seatName);
                }
                static PyObject *const key_parent = Shiboken::String::createStaticString("parent");
                if (PyDict_Contains(kwds, key_parent)) {
                    value = PyDict_GetItem(kwds, key_parent);
                    if (value && pyArgs[4]) {
                        errInfo.reset(key_parent);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QInputDevice_Init_TypeError;
                    }
                    if (value) {
                        pyArgs[4] = value;
                        if (!(pythonToCpp[4] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[4]))))
                            goto Sbk_QInputDevice_Init_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_parent);
                }
                if (PyDict_Size(kwds_dup) > 0) {
                    errInfo.reset(kwds_dup.release());
                    // fall through to handle extra keyword signals and properties
                }
            }
            ::QString cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);
            qint64 cppArg1;
            pythonToCpp[1](pyArgs[1], &cppArg1);
            ::QInputDevice::DeviceType cppArg2{QInputDevice::DeviceType::Unknown};
            pythonToCpp[2](pyArgs[2], &cppArg2);
            ::QString cppArg3 = QString();
            if (pythonToCpp[3])
                pythonToCpp[3](pyArgs[3], &cppArg3);
            if (!Shiboken::Object::isValid(pyArgs[4]))
                return -1;
            ::QObject *cppArg4 = nullptr;
            if (pythonToCpp[4])
                pythonToCpp[4](pyArgs[4], &cppArg4);

            if (!PyErr_Occurred()) {
                // QInputDevice(QString,qint64,QInputDevice::DeviceType,QString,QObject*)
                void *addr = PySide::nextQObjectMemoryAddr();
                if (addr) {
                    cptr = new (addr) ::QInputDeviceWrapper(cppArg0, cppArg1, cppArg2, cppArg3, cppArg4);
                    PySide::setNextQObjectMemoryAddr(0);
                } else {
                    cptr = new ::QInputDeviceWrapper(cppArg0, cppArg1, cppArg2, cppArg3, cppArg4);
                }

                Shiboken::Object::setParent(pyArgs[4], self);
            }
            break;
        }
    }

    if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::QInputDevice >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (!cptr) goto Sbk_QInputDevice_Init_TypeError;

    Shiboken::Object::setValidCpp(sbkSelf, true);
    Shiboken::Object::setHasCppWrapper(sbkSelf, true);
    if (Shiboken::BindingManager::instance().hasWrapper(cptr)) {
        Shiboken::BindingManager::instance().releaseWrapper(Shiboken::BindingManager::instance().retrieveWrapper(cptr));
    }
    Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);

    // QObject setup
    PySide::Signal::updateSourceObject(self);
    metaObject = cptr->metaObject(); // <- init python qt properties
    if (!errInfo.isNull() && PyDict_Check(errInfo.object())) {
        if (!PySide::fillQtProperties(self, metaObject, errInfo))
            goto Sbk_QInputDevice_Init_TypeError;
    };


    return 1;

    Sbk_QInputDevice_Init_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return -1;
}

static PyObject *Sbk_QInputDeviceFunc_availableVirtualGeometry(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QInputDevice *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QInputDevice.availableVirtualGeometry";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // availableVirtualGeometry()const
            QRect cppResult = const_cast<const ::QInputDevice *>(cppSelf)->availableVirtualGeometry();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QRECT_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QInputDeviceFunc_capabilities(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QInputDevice *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QInputDevice.capabilities";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // capabilities()const
            QFlags<QInputDevice::Capability> cppResult = const_cast<const ::QInputDevice *>(cppSelf)->capabilities();
            pyResult = Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QInputDeviceFunc_devices(PyObject *self)
{
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QInputDevice.devices";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // devices()
            QList<const QInputDevice* > cppResult = ::QInputDevice::devices();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtGuiTypeConverters[SBK_QTGUI_QLIST_CONSTQINPUTDEVICEPTR_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QInputDeviceFunc_hasCapability(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QInputDevice *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QInputDevice.hasCapability";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QInputDevice::hasCapability(QInputDevice::Capability)const->bool
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX]))->converter, (pyArg)))) {
        overloadId = 0; // hasCapability(QInputDevice::Capability)const
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QInputDeviceFunc_hasCapability_TypeError;

    // Call function/method
    {
        ::QInputDevice::Capability cppArg0{QInputDevice::Capability::None};
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // hasCapability(QInputDevice::Capability)const
            bool cppResult = const_cast<const ::QInputDevice *>(cppSelf)->hasCapability(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QInputDeviceFunc_hasCapability_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QInputDeviceFunc_name(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QInputDevice *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QInputDevice.name";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // name()const
            QString cppResult = const_cast<const ::QInputDevice *>(cppSelf)->name();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QInputDeviceFunc_primaryKeyboard(PyObject *self, PyObject *args, PyObject *kwds)
{
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QInputDevice.primaryKeyboard";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths
    if (numArgs > 1) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QInputDeviceFunc_primaryKeyboard_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|O:primaryKeyboard", &(pyArgs[0])))
        return {};


    // Overloaded function decisor
    // 0: static QInputDevice::primaryKeyboard(QString)->const QInputDevice*
    if (numArgs == 0) {
        overloadId = 0; // primaryKeyboard(QString)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) {
        overloadId = 0; // primaryKeyboard(QString)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QInputDeviceFunc_primaryKeyboard_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_seatName = Shiboken::String::createStaticString("seatName");
            if (PyDict_Contains(kwds, key_seatName)) {
                value = PyDict_GetItem(kwds, key_seatName);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_seatName);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QInputDeviceFunc_primaryKeyboard_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))))
                        goto Sbk_QInputDeviceFunc_primaryKeyboard_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_seatName);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QInputDeviceFunc_primaryKeyboard_TypeError;
            }
        }
        ::QString cppArg0 = QString();
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // primaryKeyboard(QString)
            const QInputDevice * cppResult = ::QInputDevice::primaryKeyboard(cppArg0);
            pyResult = Shiboken::Conversions::pointerToPython(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QInputDeviceFunc_primaryKeyboard_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QInputDeviceFunc_seatName(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QInputDevice *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QInputDevice.seatName";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // seatName()const
            QString cppResult = const_cast<const ::QInputDevice *>(cppSelf)->seatName();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QInputDeviceFunc_systemId(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QInputDevice *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QInputDevice.systemId";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // systemId()const
            qint64 cppResult = const_cast<const ::QInputDevice *>(cppSelf)->systemId();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QInputDeviceFunc_type(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QInputDevice *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QInputDevice.type";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // type()const
            QInputDevice::DeviceType cppResult = const_cast<const ::QInputDevice *>(cppSelf)->type();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}


static const char *Sbk_QInputDevice_PropertyStrings[] = {
    "availableVirtualGeometry:",
    "capabilities:",
    "name:",
    "seatName:",
    "systemId:",
    "type:",
    nullptr // Sentinel
};

static PyMethodDef Sbk_QInputDevice_methods[] = {
    {"availableVirtualGeometry", reinterpret_cast<PyCFunction>(Sbk_QInputDeviceFunc_availableVirtualGeometry), METH_NOARGS},
    {"capabilities", reinterpret_cast<PyCFunction>(Sbk_QInputDeviceFunc_capabilities), METH_NOARGS},
    {"devices", reinterpret_cast<PyCFunction>(Sbk_QInputDeviceFunc_devices), METH_NOARGS|METH_STATIC},
    {"hasCapability", reinterpret_cast<PyCFunction>(Sbk_QInputDeviceFunc_hasCapability), METH_O},
    {"name", reinterpret_cast<PyCFunction>(Sbk_QInputDeviceFunc_name), METH_NOARGS},
    {"primaryKeyboard", reinterpret_cast<PyCFunction>(Sbk_QInputDeviceFunc_primaryKeyboard), METH_VARARGS|METH_KEYWORDS|METH_STATIC},
    {"seatName", reinterpret_cast<PyCFunction>(Sbk_QInputDeviceFunc_seatName), METH_NOARGS},
    {"systemId", reinterpret_cast<PyCFunction>(Sbk_QInputDeviceFunc_systemId), METH_NOARGS},
    {"type", reinterpret_cast<PyCFunction>(Sbk_QInputDeviceFunc_type), METH_NOARGS},

    {nullptr, nullptr} // Sentinel
};

static int Sbk_QInputDevice_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value && PyCallable_Check(value)) {
        auto plain_inst = reinterpret_cast< ::QInputDevice *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], reinterpret_cast<SbkObject *>(self)));
        auto inst = dynamic_cast<QInputDeviceWrapper *>(plain_inst);
        if (inst)
            inst->resetPyMethodCache();
    }
    Shiboken::AutoDecRef pp(reinterpret_cast<PyObject *>(PySide::Property::getObject(self, name)));
    if (!pp.isNull())
        return PySide::Property::setValue(reinterpret_cast<PySideProperty *>(pp.object()), self, value);
    return PyObject_GenericSetAttr(self, name, value);
}

// Rich comparison
static PyObject * Sbk_QInputDevice_richcompare(PyObject *self, PyObject *pyArg, int op)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto &cppSelf = *reinterpret_cast< ::QInputDevice *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    switch (op) {
        case Py_EQ:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], (pyArg)))) {
                // operator==(const QInputDevice & other) const
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::QInputDevice *cppArg0;
                pythonToCpp(pyArg, &cppArg0);
                bool cppResult = cppSelf ==(*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            } else {
                pyResult = Py_False;
                Py_INCREF(pyResult);
            }

            break;
        default:
            // PYSIDE-74: By default, we redirect to object's tp_richcompare (which is `==`, `!=`).
            return FallbackRichCompare(self, pyArg, op);
            goto Sbk_QInputDevice_RichComparison_TypeError;
    }

    if (pyResult && !PyErr_Occurred())
        return pyResult;
    Sbk_QInputDevice_RichComparison_TypeError:
    PyErr_SetString(PyExc_NotImplementedError, "operator not implemented.");
    return {};

}

} // extern "C"

static int Sbk_QInputDevice_traverse(PyObject *self, visitproc visit, void *arg)
{
    return SbkObject_TypeF()->tp_traverse(self, visit, arg);
}
static int Sbk_QInputDevice_clear(PyObject *self)
{
    return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
}
extern "C"
{
static PyObject *Sbk_QInputDevice__repr__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QInputDevice *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    QBuffer buffer;
    buffer.open(QBuffer::ReadWrite);
    QDebug dbg(&buffer);
    dbg << cppSelf;
    buffer.close();
    QByteArray str = buffer.data();
    int idx = str.indexOf('(');
    if (idx >= 0)
        str.replace(0, idx, Py_TYPE(self)->tp_name);
    str = str.trimmed();
    PyObject *mod = PyDict_GetItem(Py_TYPE(self)->tp_dict, Shiboken::PyMagicName::module());
    if (mod && !strchr(str, '.'))
        return Shiboken::String::fromFormat("<%s.%s at %p>", Shiboken::String::toCString(mod), str.constData(), self);
    else
        return Shiboken::String::fromFormat("<%s at %p>", str.constData(), self);
}
} // extern C

// Class Definition -----------------------------------------------
extern "C" {
static PyTypeObject *_Sbk_QInputDevice_Type = nullptr;
static PyTypeObject *Sbk_QInputDevice_TypeF(void)
{
    return _Sbk_QInputDevice_Type;
}

static PyType_Slot Sbk_QInputDevice_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        reinterpret_cast<void *>(Sbk_QInputDevice__repr__)},
    {Py_tp_hash,        nullptr},
    {Py_tp_call,        nullptr},
    {Py_tp_str,         nullptr},
    {Py_tp_getattro,    nullptr},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_QInputDevice_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_QInputDevice_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_QInputDevice_clear)},
    {Py_tp_richcompare, reinterpret_cast<void *>(Sbk_QInputDevice_richcompare)},
    {Py_tp_iter,        nullptr},
    {Py_tp_iternext,    nullptr},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_QInputDevice_methods)},
    {Py_tp_getset,      nullptr},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_QInputDevice_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObjectTpNew)},
    {0, nullptr}
};
static PyType_Spec Sbk_QInputDevice_spec = {
    "2:PySide6.QtGui.QInputDevice",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_QInputDevice_slots
};

} //extern "C"

static void *Sbk_QInputDevice_typeDiscovery(void *cptr, PyTypeObject *instanceType)
{
    if (instanceType == Shiboken::SbkType< ::QObject >())
        return dynamic_cast< ::QInputDevice *>(reinterpret_cast< ::QObject *>(cptr));
    return {};
}

PyObject *SbkPySide6_QtGui_QInputDevice_DeviceType___and__(PyObject *self, PyObject *pyArg)
{
    ::QInputDevice::DeviceTypes cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QInputDevice::DeviceTypes>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QInputDevice::DeviceTypes>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf & cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtGui_QInputDevice_DeviceType___or__(PyObject *self, PyObject *pyArg)
{
    ::QInputDevice::DeviceTypes cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QInputDevice::DeviceTypes>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QInputDevice::DeviceTypes>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf | cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtGui_QInputDevice_DeviceType___xor__(PyObject *self, PyObject *pyArg)
{
    ::QInputDevice::DeviceTypes cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QInputDevice::DeviceTypes>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QInputDevice::DeviceTypes>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf ^ cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtGui_QInputDevice_DeviceType___invert__(PyObject *self, PyObject *pyArg)
{
    ::QInputDevice::DeviceTypes cppSelf;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX]))->converter, self, &cppSelf);
    ::QInputDevice::DeviceTypes cppResult = ~cppSelf;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX]))->converter, &cppResult);
}

static PyObject *SbkPySide6_QtGui_QInputDevice_DeviceType_long(PyObject *self)
{
    int val;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX]))->converter, self, &val);
    return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &val);
}
static int SbkPySide6_QtGui_QInputDevice_DeviceType__nonzero(PyObject *self)
{
    int val;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX]))->converter, self, &val);
    return val != 0;
}

static PyType_Slot SbkPySide6_QtGui_QInputDevice_DeviceType_number_slots[] = {
    {Py_nb_bool,    reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_DeviceType__nonzero)},
    {Py_nb_invert,  reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_DeviceType___invert__)},
    {Py_nb_and,     reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_DeviceType___and__)},
    {Py_nb_xor,     reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_DeviceType___xor__)},
    {Py_nb_or,      reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_DeviceType___or__)},
    {Py_nb_int,     reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_DeviceType_long)},
    {Py_nb_index,   reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_DeviceType_long)},
    {0, nullptr} // sentinel
};


PyObject *SbkPySide6_QtGui_QInputDevice_Capability___and__(PyObject *self, PyObject *pyArg)
{
    ::QInputDevice::Capabilities cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QInputDevice::Capabilities>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QInputDevice::Capabilities>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf & cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtGui_QInputDevice_Capability___or__(PyObject *self, PyObject *pyArg)
{
    ::QInputDevice::Capabilities cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QInputDevice::Capabilities>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QInputDevice::Capabilities>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf | cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtGui_QInputDevice_Capability___xor__(PyObject *self, PyObject *pyArg)
{
    ::QInputDevice::Capabilities cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QInputDevice::Capabilities>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QInputDevice::Capabilities>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf ^ cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtGui_QInputDevice_Capability___invert__(PyObject *self, PyObject *pyArg)
{
    ::QInputDevice::Capabilities cppSelf;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]))->converter, self, &cppSelf);
    ::QInputDevice::Capabilities cppResult = ~cppSelf;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]))->converter, &cppResult);
}

static PyObject *SbkPySide6_QtGui_QInputDevice_Capability_long(PyObject *self)
{
    int val;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]))->converter, self, &val);
    return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &val);
}
static int SbkPySide6_QtGui_QInputDevice_Capability__nonzero(PyObject *self)
{
    int val;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]))->converter, self, &val);
    return val != 0;
}

static PyType_Slot SbkPySide6_QtGui_QInputDevice_Capability_number_slots[] = {
    {Py_nb_bool,    reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_Capability__nonzero)},
    {Py_nb_invert,  reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_Capability___invert__)},
    {Py_nb_and,     reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_Capability___and__)},
    {Py_nb_xor,     reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_Capability___xor__)},
    {Py_nb_or,      reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_Capability___or__)},
    {Py_nb_int,     reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_Capability_long)},
    {Py_nb_index,   reinterpret_cast<void *>(SbkPySide6_QtGui_QInputDevice_Capability_long)},
    {0, nullptr} // sentinel
};



// Type conversion functions.

// Python to C++ enum conversion.
static void QInputDevice_DeviceType_PythonToCpp_QInputDevice_DeviceType(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QInputDevice::DeviceType *>(cppOut) =
        static_cast<::QInputDevice::DeviceType>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QInputDevice_DeviceType_PythonToCpp_QInputDevice_DeviceType_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX]))
        return QInputDevice_DeviceType_PythonToCpp_QInputDevice_DeviceType;
    return {};
}
static PyObject *QInputDevice_DeviceType_CppToPython_QInputDevice_DeviceType(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QInputDevice::DeviceType *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], castCppIn);

}

static void QFlags_QInputDevice_DeviceType__PythonToCpp_QFlags_QInputDevice_DeviceType_(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QFlags<QInputDevice::DeviceType> *>(cppOut) =
        ::QFlags<QInputDevice::DeviceType>(QFlag(int(PySide::QFlags::getValue(reinterpret_cast<PySideQFlagsObject *>(pyIn)))));

}
static PythonToCppFunc is_QFlags_QInputDevice_DeviceType__PythonToCpp_QFlags_QInputDevice_DeviceType__Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX]))
        return QFlags_QInputDevice_DeviceType__PythonToCpp_QFlags_QInputDevice_DeviceType_;
    return {};
}
static PyObject *QFlags_QInputDevice_DeviceType__CppToPython_QFlags_QInputDevice_DeviceType_(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QFlags<QInputDevice::DeviceType> *>(cppIn));
    return reinterpret_cast<PyObject *>(PySide::QFlags::newObject(castCppIn, SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX]));

}

static void QInputDevice_DeviceType_PythonToCpp_QFlags_QInputDevice_DeviceType_(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QFlags<QInputDevice::DeviceType> *>(cppOut) =
        ::QFlags<QInputDevice::DeviceType>(QFlag(int(Shiboken::Enum::getValue(pyIn))));

}
static PythonToCppFunc is_QInputDevice_DeviceType_PythonToCpp_QFlags_QInputDevice_DeviceType__Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX]))
        return QInputDevice_DeviceType_PythonToCpp_QFlags_QInputDevice_DeviceType_;
    return {};
}
static void number_PythonToCpp_QFlags_QInputDevice_DeviceType_(PyObject *pyIn, void *cppOut)
{
    Shiboken::AutoDecRef pyLong(PyNumber_Long(pyIn));
    *reinterpret_cast<::QFlags<QInputDevice::DeviceType> *>(cppOut) =
        ::QFlags<QInputDevice::DeviceType>(QFlag(int(PyLong_AsLong(pyLong.object()))));

}
static PythonToCppFunc is_number_PythonToCpp_QFlags_QInputDevice_DeviceType__Convertible(PyObject *pyIn)
{
    if (PyNumber_Check(pyIn) && PyObject_TypeCheck(pyIn, SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX]))
        return number_PythonToCpp_QFlags_QInputDevice_DeviceType_;
    return {};
}
static void QInputDevice_Capability_PythonToCpp_QInputDevice_Capability(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QInputDevice::Capability *>(cppOut) =
        static_cast<::QInputDevice::Capability>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QInputDevice_Capability_PythonToCpp_QInputDevice_Capability_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX]))
        return QInputDevice_Capability_PythonToCpp_QInputDevice_Capability;
    return {};
}
static PyObject *QInputDevice_Capability_CppToPython_QInputDevice_Capability(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QInputDevice::Capability *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], castCppIn);

}

static void QFlags_QInputDevice_Capability__PythonToCpp_QFlags_QInputDevice_Capability_(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QFlags<QInputDevice::Capability> *>(cppOut) =
        ::QFlags<QInputDevice::Capability>(QFlag(int(PySide::QFlags::getValue(reinterpret_cast<PySideQFlagsObject *>(pyIn)))));

}
static PythonToCppFunc is_QFlags_QInputDevice_Capability__PythonToCpp_QFlags_QInputDevice_Capability__Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]))
        return QFlags_QInputDevice_Capability__PythonToCpp_QFlags_QInputDevice_Capability_;
    return {};
}
static PyObject *QFlags_QInputDevice_Capability__CppToPython_QFlags_QInputDevice_Capability_(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QFlags<QInputDevice::Capability> *>(cppIn));
    return reinterpret_cast<PyObject *>(PySide::QFlags::newObject(castCppIn, SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]));

}

static void QInputDevice_Capability_PythonToCpp_QFlags_QInputDevice_Capability_(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QFlags<QInputDevice::Capability> *>(cppOut) =
        ::QFlags<QInputDevice::Capability>(QFlag(int(Shiboken::Enum::getValue(pyIn))));

}
static PythonToCppFunc is_QInputDevice_Capability_PythonToCpp_QFlags_QInputDevice_Capability__Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX]))
        return QInputDevice_Capability_PythonToCpp_QFlags_QInputDevice_Capability_;
    return {};
}
static void number_PythonToCpp_QFlags_QInputDevice_Capability_(PyObject *pyIn, void *cppOut)
{
    Shiboken::AutoDecRef pyLong(PyNumber_Long(pyIn));
    *reinterpret_cast<::QFlags<QInputDevice::Capability> *>(cppOut) =
        ::QFlags<QInputDevice::Capability>(QFlag(int(PyLong_AsLong(pyLong.object()))));

}
static PythonToCppFunc is_number_PythonToCpp_QFlags_QInputDevice_Capability__Convertible(PyObject *pyIn)
{
    if (PyNumber_Check(pyIn) && PyObject_TypeCheck(pyIn, SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX]))
        return number_PythonToCpp_QFlags_QInputDevice_Capability_;
    return {};
}
// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void QInputDevice_PythonToCpp_QInputDevice_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_QInputDevice_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_QInputDevice_PythonToCpp_QInputDevice_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QInputDevice_TypeF())))
        return QInputDevice_PythonToCpp_QInputDevice_PTR;
    return {};
}

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *QInputDevice_PTR_CppToPython_QInputDevice(const void *cppIn)
{
    return PySide::getWrapperForQObject(reinterpret_cast<::QInputDevice *>(const_cast<void *>(cppIn)), Sbk_QInputDevice_TypeF());

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
static const char *QInputDevice_SignatureStrings[] = {
    "1:PySide6.QtGui.QInputDevice(self,parent:PySide6.QtCore.QObject=nullptr)",
    "0:PySide6.QtGui.QInputDevice(self,name:QString,systemId:qint64,type:PySide6.QtGui.QInputDevice.DeviceType,seatName:QString=QString(),parent:PySide6.QtCore.QObject=nullptr)",
    "PySide6.QtGui.QInputDevice.availableVirtualGeometry(self)->PySide6.QtCore.QRect",
    "PySide6.QtGui.QInputDevice.capabilities(self)->PySide6.QtGui.QInputDevice.Capabilities",
    "PySide6.QtGui.QInputDevice.devices()->QList[PySide6.QtGui.QInputDevice]",
    "PySide6.QtGui.QInputDevice.hasCapability(self,cap:PySide6.QtGui.QInputDevice.Capability)->bool",
    "PySide6.QtGui.QInputDevice.name(self)->QString",
    "PySide6.QtGui.QInputDevice.primaryKeyboard(seatName:QString=QString())->PySide6.QtGui.QInputDevice",
    "PySide6.QtGui.QInputDevice.seatName(self)->QString",
    "PySide6.QtGui.QInputDevice.systemId(self)->qint64",
    "PySide6.QtGui.QInputDevice.type(self)->PySide6.QtGui.QInputDevice.DeviceType",
    nullptr}; // Sentinel

void init_QInputDevice(PyObject *module)
{
    _Sbk_QInputDevice_Type = Shiboken::ObjectType::introduceWrapperType(
        module,
        "QInputDevice",
        "QInputDevice*",
        &Sbk_QInputDevice_spec,
        &Shiboken::callCppDestructor< ::QInputDevice >,
        SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX],
        0,
        0);
    auto *pyType = Sbk_QInputDevice_TypeF(); // references _Sbk_QInputDevice_Type
    InitSignatureStrings(pyType, QInputDevice_SignatureStrings);
    SbkObjectType_SetPropertyStrings(reinterpret_cast<PyTypeObject *>(_Sbk_QInputDevice_Type), Sbk_QInputDevice_PropertyStrings);
    SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_IDX]
        = Sbk_QInputDevice_TypeF();

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(Sbk_QInputDevice_TypeF(),
        QInputDevice_PythonToCpp_QInputDevice_PTR,
        is_QInputDevice_PythonToCpp_QInputDevice_PTR_Convertible,
        QInputDevice_PTR_CppToPython_QInputDevice);

    Shiboken::Conversions::registerConverterName(converter, "QInputDevice");
    Shiboken::Conversions::registerConverterName(converter, "QInputDevice*");
    Shiboken::Conversions::registerConverterName(converter, "QInputDevice&");
    Shiboken::Conversions::registerConverterName(converter, typeid(::QInputDevice).name());
    Shiboken::Conversions::registerConverterName(converter, typeid(::QInputDeviceWrapper).name());


    Shiboken::ObjectType::setTypeDiscoveryFunctionV2(Sbk_QInputDevice_TypeF(), &Sbk_QInputDevice_typeDiscovery);

    // Initialization of enums.

    // Initialization of enum 'DeviceType'.
    SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX] = PySide::QFlags::create("2:PySide6.QtGui.QInputDevice.DeviceTypes", SbkPySide6_QtGui_QInputDevice_DeviceType_number_slots);
    SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QInputDevice_TypeF(),
        "DeviceType",
        "2:PySide6.QtGui.QInputDevice.DeviceType",
        "QInputDevice::DeviceType",
        SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX]);
    if (!SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], "Unknown", (long) QInputDevice::DeviceType::Unknown))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], "Mouse", (long) QInputDevice::DeviceType::Mouse))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], "TouchScreen", (long) QInputDevice::DeviceType::TouchScreen))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], "TouchPad", (long) QInputDevice::DeviceType::TouchPad))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], "Puck", (long) QInputDevice::DeviceType::Puck))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], "Stylus", (long) QInputDevice::DeviceType::Stylus))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], "Airbrush", (long) QInputDevice::DeviceType::Airbrush))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], "Keyboard", (long) QInputDevice::DeviceType::Keyboard))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], "AllDevices", (long) QInputDevice::DeviceType::AllDevices))
        return;
    // Register converter for enum 'QInputDevice::DeviceType'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX],
            QInputDevice_DeviceType_CppToPython_QInputDevice_DeviceType);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QInputDevice_DeviceType_PythonToCpp_QInputDevice_DeviceType,
            is_QInputDevice_DeviceType_PythonToCpp_QInputDevice_DeviceType_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_DEVICETYPE_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QInputDevice::DeviceType");
        Shiboken::Conversions::registerConverterName(converter, "DeviceType");
    }
    // Register converter for flag 'QFlags<QInputDevice::DeviceType>'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX],
            QFlags_QInputDevice_DeviceType__CppToPython_QFlags_QInputDevice_DeviceType_);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QInputDevice_DeviceType_PythonToCpp_QFlags_QInputDevice_DeviceType_,
            is_QInputDevice_DeviceType_PythonToCpp_QFlags_QInputDevice_DeviceType__Convertible);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QFlags_QInputDevice_DeviceType__PythonToCpp_QFlags_QInputDevice_DeviceType_,
            is_QFlags_QInputDevice_DeviceType__PythonToCpp_QFlags_QInputDevice_DeviceType__Convertible);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            number_PythonToCpp_QFlags_QInputDevice_DeviceType_,
            is_number_PythonToCpp_QFlags_QInputDevice_DeviceType__Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_DEVICETYPE_IDX], converter, true);
        Shiboken::Conversions::registerConverterName(converter, "QInputDevice::DeviceTypes");
        Shiboken::Conversions::registerConverterName(converter, "DeviceTypes");
        Shiboken::Conversions::registerConverterName(converter, "QFlags<QInputDevice::DeviceType>");
    }
    // End of 'DeviceType' enum/flags.

    // Initialization of enum 'Capability'.
    SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX] = PySide::QFlags::create("2:PySide6.QtGui.QInputDevice.Capabilities", SbkPySide6_QtGui_QInputDevice_Capability_number_slots);
    SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QInputDevice_TypeF(),
        "Capability",
        "2:PySide6.QtGui.QInputDevice.Capability",
        "QInputDevice::Capability",
        SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX]);
    if (!SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "None_", (long) QInputDevice::Capability::None))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "Position", (long) QInputDevice::Capability::Position))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "Area", (long) QInputDevice::Capability::Area))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "Pressure", (long) QInputDevice::Capability::Pressure))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "Velocity", (long) QInputDevice::Capability::Velocity))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "NormalizedPosition", (long) QInputDevice::Capability::NormalizedPosition))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "MouseEmulation", (long) QInputDevice::Capability::MouseEmulation))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "PixelScroll", (long) QInputDevice::Capability::PixelScroll))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "Scroll", (long) QInputDevice::Capability::Scroll))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "Hover", (long) QInputDevice::Capability::Hover))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "Rotation", (long) QInputDevice::Capability::Rotation))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "XTilt", (long) QInputDevice::Capability::XTilt))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "YTilt", (long) QInputDevice::Capability::YTilt))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "TangentialPressure", (long) QInputDevice::Capability::TangentialPressure))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "ZPosition", (long) QInputDevice::Capability::ZPosition))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
        SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], "All", (long) QInputDevice::Capability::All))
        return;
    // Register converter for enum 'QInputDevice::Capability'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX],
            QInputDevice_Capability_CppToPython_QInputDevice_Capability);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QInputDevice_Capability_PythonToCpp_QInputDevice_Capability,
            is_QInputDevice_Capability_PythonToCpp_QInputDevice_Capability_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtGuiTypes[SBK_QINPUTDEVICE_CAPABILITY_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QInputDevice::Capability");
        Shiboken::Conversions::registerConverterName(converter, "Capability");
    }
    // Register converter for flag 'QFlags<QInputDevice::Capability>'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX],
            QFlags_QInputDevice_Capability__CppToPython_QFlags_QInputDevice_Capability_);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QInputDevice_Capability_PythonToCpp_QFlags_QInputDevice_Capability_,
            is_QInputDevice_Capability_PythonToCpp_QFlags_QInputDevice_Capability__Convertible);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QFlags_QInputDevice_Capability__PythonToCpp_QFlags_QInputDevice_Capability_,
            is_QFlags_QInputDevice_Capability__PythonToCpp_QFlags_QInputDevice_Capability__Convertible);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            number_PythonToCpp_QFlags_QInputDevice_Capability_,
            is_number_PythonToCpp_QFlags_QInputDevice_Capability__Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtGuiTypes[SBK_QFLAGS_QINPUTDEVICE_CAPABILITY_IDX], converter, true);
        Shiboken::Conversions::registerConverterName(converter, "QInputDevice::Capabilities");
        Shiboken::Conversions::registerConverterName(converter, "Capabilities");
        Shiboken::Conversions::registerConverterName(converter, "QFlags<QInputDevice::Capability>");
    }
    // End of 'Capability' enum/flags.

    PySide::Signal::registerSignals(Sbk_QInputDevice_TypeF(), &::QInputDevice::staticMetaObject);
    qRegisterMetaType< ::QInputDevice::DeviceType >("QInputDevice::DeviceType");
    qRegisterMetaType< ::QInputDevice::DeviceTypes >("QInputDevice::DeviceTypes");
    qRegisterMetaType< ::QInputDevice::Capability >("QInputDevice::Capability");
    qRegisterMetaType< ::QInputDevice::Capabilities >("QInputDevice::Capabilities");
    Shiboken::ObjectType::setSubTypeInitHook(Sbk_QInputDevice_TypeF(), &PySide::initQObjectSubType);
    PySide::initDynamicMetaObject(Sbk_QInputDevice_TypeF(), &::QInputDevice::staticMetaObject, sizeof(QInputDeviceWrapper));
}
