/****************************************************************************
**
** 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 <iterator>

// module include
#include "pyside6_qtopengl_python.h"

// main header
#include "qopenglframebufferobjectformat_wrapper.h"

// inner classes

// Extra includes
#include <QtOpenGL/qopenglframebufferobject.h>


#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;
}


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

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

    ::QOpenGLFramebufferObjectFormat *cptr{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.__init__";
    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 (!PyArg_UnpackTuple(args, "QOpenGLFramebufferObjectFormat", 0, 1, &(pyArgs[0])))
        return -1;


    // Overloaded function decisor
    // 0: QOpenGLFramebufferObjectFormat::QOpenGLFramebufferObjectFormat()
    // 1: QOpenGLFramebufferObjectFormat::QOpenGLFramebufferObjectFormat(QOpenGLFramebufferObjectFormat)
    if (numArgs == 0) {
        overloadId = 0; // QOpenGLFramebufferObjectFormat()
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], (pyArgs[0])))) {
        overloadId = 1; // QOpenGLFramebufferObjectFormat(QOpenGLFramebufferObjectFormat)
    }

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

    // Call function/method
    switch (overloadId) {
        case 0: // QOpenGLFramebufferObjectFormat()
        {

            if (!PyErr_Occurred()) {
                // QOpenGLFramebufferObjectFormat()
                cptr = new ::QOpenGLFramebufferObjectFormat();
            }
            break;
        }
        case 1: // QOpenGLFramebufferObjectFormat(const QOpenGLFramebufferObjectFormat & other)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::QOpenGLFramebufferObjectFormat cppArg0_local;
            ::QOpenGLFramebufferObjectFormat *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);


            if (!PyErr_Occurred()) {
                // QOpenGLFramebufferObjectFormat(QOpenGLFramebufferObjectFormat)
                cptr = new ::QOpenGLFramebufferObjectFormat(*cppArg0);
            }
            break;
        }
    }

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

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


    return 1;

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormatFunc_attachment(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.attachment";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // attachment()const
            QOpenGLFramebufferObject::Attachment cppResult = const_cast<const ::QOpenGLFramebufferObjectFormat *>(cppSelf)->attachment();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECT_ATTACHMENT_IDX]))->converter, &cppResult);
        }
    }

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormatFunc_internalTextureFormat(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.internalTextureFormat";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // internalTextureFormat()const
            unsigned int cppResult = const_cast<const ::QOpenGLFramebufferObjectFormat *>(cppSelf)->internalTextureFormat();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<unsigned int>(), &cppResult);
        }
    }

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormatFunc_mipmap(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.mipmap";
    SBK_UNUSED(fullName)

    // Call function/method
    {

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

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormatFunc_samples(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.samples";
    SBK_UNUSED(fullName)

    // Call function/method
    {

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

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormatFunc_setAttachment(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.setAttachment";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QOpenGLFramebufferObjectFormat::setAttachment(QOpenGLFramebufferObject::Attachment)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECT_ATTACHMENT_IDX]))->converter, (pyArg)))) {
        overloadId = 0; // setAttachment(QOpenGLFramebufferObject::Attachment)
    }

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

    // Call function/method
    {
        ::QOpenGLFramebufferObject::Attachment cppArg0{QOpenGLFramebufferObject::NoAttachment};
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setAttachment(QOpenGLFramebufferObject::Attachment)
            cppSelf->setAttachment(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormatFunc_setInternalTextureFormat(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.setInternalTextureFormat";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QOpenGLFramebufferObjectFormat::setInternalTextureFormat(uint)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<unsigned int>(), (pyArg)))) {
        overloadId = 0; // setInternalTextureFormat(uint)
    }

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

    // Call function/method
    {
        unsigned int cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setInternalTextureFormat(uint)
            cppSelf->setInternalTextureFormat(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormatFunc_setMipmap(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.setMipmap";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QOpenGLFramebufferObjectFormat::setMipmap(bool)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), (pyArg)))) {
        overloadId = 0; // setMipmap(bool)
    }

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

    // Call function/method
    {
        bool cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setMipmap(bool)
            cppSelf->setMipmap(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormatFunc_setSamples(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.setSamples";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QOpenGLFramebufferObjectFormat::setSamples(int)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
        overloadId = 0; // setSamples(int)
    }

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

    // Call function/method
    {
        int cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setSamples(int)
            cppSelf->setSamples(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormatFunc_setTextureTarget(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.setTextureTarget";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QOpenGLFramebufferObjectFormat::setTextureTarget(uint)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<unsigned int>(), (pyArg)))) {
        overloadId = 0; // setTextureTarget(uint)
    }

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

    // Call function/method
    {
        unsigned int cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setTextureTarget(uint)
            cppSelf->setTextureTarget(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormatFunc_textureTarget(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.textureTarget";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // textureTarget()const
            unsigned int cppResult = const_cast<const ::QOpenGLFramebufferObjectFormat *>(cppSelf)->textureTarget();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<unsigned int>(), &cppResult);
        }
    }

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

static PyObject *Sbk_QOpenGLFramebufferObjectFormat___copy__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto &cppSelf = *reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], &cppSelf);
    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}


static const char *Sbk_QOpenGLFramebufferObjectFormat_PropertyStrings[] = {
    nullptr // Sentinel
};

static PyMethodDef Sbk_QOpenGLFramebufferObjectFormat_methods[] = {
    {"attachment", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormatFunc_attachment), METH_NOARGS},
    {"internalTextureFormat", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormatFunc_internalTextureFormat), METH_NOARGS},
    {"mipmap", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormatFunc_mipmap), METH_NOARGS},
    {"samples", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormatFunc_samples), METH_NOARGS},
    {"setAttachment", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormatFunc_setAttachment), METH_O},
    {"setInternalTextureFormat", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormatFunc_setInternalTextureFormat), METH_O},
    {"setMipmap", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormatFunc_setMipmap), METH_O},
    {"setSamples", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormatFunc_setSamples), METH_O},
    {"setTextureTarget", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormatFunc_setTextureTarget), METH_O},
    {"textureTarget", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormatFunc_textureTarget), METH_NOARGS},

    {"__copy__", reinterpret_cast<PyCFunction>(Sbk_QOpenGLFramebufferObjectFormat___copy__), METH_NOARGS},
    {nullptr, nullptr} // Sentinel
};

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

    switch (op) {
        case Py_NE:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], (pyArg)))) {
                // operator!=(const QOpenGLFramebufferObjectFormat & other) const
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::QOpenGLFramebufferObjectFormat cppArg0_local;
                ::QOpenGLFramebufferObjectFormat *cppArg0 = &cppArg0_local;
                if (pythonToCpp.isValue())
                    pythonToCpp(pyArg, &cppArg0_local);
                else
                    pythonToCpp(pyArg, &cppArg0);

                bool cppResult = cppSelf !=(*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            } else {
                pyResult = Py_True;
                Py_INCREF(pyResult);
            }

            break;
        case Py_EQ:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], (pyArg)))) {
                // operator==(const QOpenGLFramebufferObjectFormat & other) const
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::QOpenGLFramebufferObjectFormat cppArg0_local;
                ::QOpenGLFramebufferObjectFormat *cppArg0 = &cppArg0_local;
                if (pythonToCpp.isValue())
                    pythonToCpp(pyArg, &cppArg0_local);
                else
                    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_QOpenGLFramebufferObjectFormat_RichComparison_TypeError;
    }

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

}

} // extern "C"

static int Sbk_QOpenGLFramebufferObjectFormat_traverse(PyObject *self, visitproc visit, void *arg)
{
    return SbkObject_TypeF()->tp_traverse(self, visit, arg);
}
static int Sbk_QOpenGLFramebufferObjectFormat_clear(PyObject *self)
{
    return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
}
// Class Definition -----------------------------------------------
extern "C" {
static PyTypeObject *_Sbk_QOpenGLFramebufferObjectFormat_Type = nullptr;
static PyTypeObject *Sbk_QOpenGLFramebufferObjectFormat_TypeF(void)
{
    return _Sbk_QOpenGLFramebufferObjectFormat_Type;
}

static PyType_Slot Sbk_QOpenGLFramebufferObjectFormat_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        nullptr},
    {Py_tp_hash,        nullptr},
    {Py_tp_call,        nullptr},
    {Py_tp_str,         nullptr},
    {Py_tp_getattro,    nullptr},
    {Py_tp_setattro,    nullptr},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_QOpenGLFramebufferObjectFormat_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_QOpenGLFramebufferObjectFormat_clear)},
    {Py_tp_richcompare, reinterpret_cast<void *>(Sbk_QOpenGLFramebufferObjectFormat_richcompare)},
    {Py_tp_iter,        nullptr},
    {Py_tp_iternext,    nullptr},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_QOpenGLFramebufferObjectFormat_methods)},
    {Py_tp_getset,      nullptr},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_QOpenGLFramebufferObjectFormat_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObjectTpNew)},
    {0, nullptr}
};
static PyType_Spec Sbk_QOpenGLFramebufferObjectFormat_spec = {
    "2:PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_QOpenGLFramebufferObjectFormat_slots
};

} //extern "C"


// Type conversion functions.

// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void QOpenGLFramebufferObjectFormat_PythonToCpp_QOpenGLFramebufferObjectFormat_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_QOpenGLFramebufferObjectFormat_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_QOpenGLFramebufferObjectFormat_PythonToCpp_QOpenGLFramebufferObjectFormat_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QOpenGLFramebufferObjectFormat_TypeF())))
        return QOpenGLFramebufferObjectFormat_PythonToCpp_QOpenGLFramebufferObjectFormat_PTR;
    return {};
}

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *QOpenGLFramebufferObjectFormat_PTR_CppToPython_QOpenGLFramebufferObjectFormat(const void *cppIn)
{
    auto pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppIn));
    if (pyOut) {
        Py_INCREF(pyOut);
        return pyOut;
    }
    bool changedTypeName = false;
    auto tCppIn = reinterpret_cast<const ::QOpenGLFramebufferObjectFormat *>(cppIn);
    const char *typeName = typeid(*tCppIn).name();
    auto sbkType = Shiboken::ObjectType::typeForTypeName(typeName);
    if (sbkType && Shiboken::ObjectType::hasSpecialCastFunction(sbkType)) {
        typeName = typeNameOf(tCppIn);
        changedTypeName = true;
    }
    PyObject *result = Shiboken::Object::newObject(Sbk_QOpenGLFramebufferObjectFormat_TypeF(), const_cast<void *>(cppIn), false, /* exactType */ changedTypeName, typeName);
    if (changedTypeName)
        delete [] typeName;
    return result;
}

// C++ to Python copy conversion.
static PyObject *QOpenGLFramebufferObjectFormat_COPY_CppToPython_QOpenGLFramebufferObjectFormat(const void *cppIn)
{
    return Shiboken::Object::newObject(Sbk_QOpenGLFramebufferObjectFormat_TypeF(), new ::QOpenGLFramebufferObjectFormat(*reinterpret_cast<const ::QOpenGLFramebufferObjectFormat *>(cppIn)), true, true);
}

// Python to C++ copy conversion.
static void QOpenGLFramebufferObjectFormat_PythonToCpp_QOpenGLFramebufferObjectFormat_COPY(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QOpenGLFramebufferObjectFormat *>(cppOut) = *reinterpret_cast< ::QOpenGLFramebufferObjectFormat *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX], reinterpret_cast<SbkObject *>(pyIn)));
}
static PythonToCppFunc is_QOpenGLFramebufferObjectFormat_PythonToCpp_QOpenGLFramebufferObjectFormat_COPY_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QOpenGLFramebufferObjectFormat_TypeF())))
        return QOpenGLFramebufferObjectFormat_PythonToCpp_QOpenGLFramebufferObjectFormat_COPY;
    return {};
}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
static const char *QOpenGLFramebufferObjectFormat_SignatureStrings[] = {
    "1:PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat(self)",
    "0:PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat(self,other:PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat)",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.attachment(self)->PySide6.QtOpenGL.QOpenGLFramebufferObject.Attachment",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.internalTextureFormat(self)->unsigned int",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.mipmap(self)->bool",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.samples(self)->int",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.setAttachment(self,attachment:PySide6.QtOpenGL.QOpenGLFramebufferObject.Attachment)",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.setInternalTextureFormat(self,internalTextureFormat:unsigned int)",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.setMipmap(self,enabled:bool)",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.setSamples(self,samples:int)",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.setTextureTarget(self,target:unsigned int)",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.textureTarget(self)->unsigned int",
    "PySide6.QtOpenGL.QOpenGLFramebufferObjectFormat.__copy__()",
    nullptr}; // Sentinel

void init_QOpenGLFramebufferObjectFormat(PyObject *module)
{
    _Sbk_QOpenGLFramebufferObjectFormat_Type = Shiboken::ObjectType::introduceWrapperType(
        module,
        "QOpenGLFramebufferObjectFormat",
        "QOpenGLFramebufferObjectFormat",
        &Sbk_QOpenGLFramebufferObjectFormat_spec,
        &Shiboken::callCppDestructor< ::QOpenGLFramebufferObjectFormat >,
        0,
        0,
        0);
    auto *pyType = Sbk_QOpenGLFramebufferObjectFormat_TypeF(); // references _Sbk_QOpenGLFramebufferObjectFormat_Type
    InitSignatureStrings(pyType, QOpenGLFramebufferObjectFormat_SignatureStrings);
    SbkObjectType_SetPropertyStrings(reinterpret_cast<PyTypeObject *>(_Sbk_QOpenGLFramebufferObjectFormat_Type), Sbk_QOpenGLFramebufferObjectFormat_PropertyStrings);
    SbkPySide6_QtOpenGLTypes[SBK_QOPENGLFRAMEBUFFEROBJECTFORMAT_IDX]
        = Sbk_QOpenGLFramebufferObjectFormat_TypeF();

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(Sbk_QOpenGLFramebufferObjectFormat_TypeF(),
        QOpenGLFramebufferObjectFormat_PythonToCpp_QOpenGLFramebufferObjectFormat_PTR,
        is_QOpenGLFramebufferObjectFormat_PythonToCpp_QOpenGLFramebufferObjectFormat_PTR_Convertible,
        QOpenGLFramebufferObjectFormat_PTR_CppToPython_QOpenGLFramebufferObjectFormat,
        QOpenGLFramebufferObjectFormat_COPY_CppToPython_QOpenGLFramebufferObjectFormat);

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

    // Add Python to C++ copy (value, not pointer neither reference) conversion to type converter.
    Shiboken::Conversions::addPythonToCppValueConversion(converter,
        QOpenGLFramebufferObjectFormat_PythonToCpp_QOpenGLFramebufferObjectFormat_COPY,
        is_QOpenGLFramebufferObjectFormat_PythonToCpp_QOpenGLFramebufferObjectFormat_COPY_Convertible);

    qRegisterMetaType< ::QOpenGLFramebufferObjectFormat >("QOpenGLFramebufferObjectFormat");
}
