/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6-3D.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQt3DExtras.h"

#line 135 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 29 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/build/Qt3DExtras/sipQt3DExtrasQList0101Qt3DExtrasQSpriteSheetItem.cpp"

#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qabstractcameracontroller.sip"
#include <qabstractcameracontroller.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qabstractspritesheet.sip"
#include <qabstractspritesheet.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qconegeometry.sip"
#include <qconegeometry.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qconegeometryview.sip"
#include <qconegeometryview.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qconemesh.sip"
#include <qconemesh.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qcuboidgeometry.sip"
#include <qcuboidgeometry.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qcuboidgeometryview.sip"
#include <qcuboidgeometryview.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qcuboidmesh.sip"
#include <qcuboidmesh.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qcylindergeometry.sip"
#include <qcylindergeometry.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qcylindergeometryview.sip"
#include <qcylindergeometryview.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qcylindermesh.sip"
#include <qcylindermesh.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qdiffusemapmaterial.sip"
#include <qdiffusemapmaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qdiffusespecularmapmaterial.sip"
#include <qdiffusespecularmapmaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qdiffusespecularmaterial.sip"
#include <qdiffusespecularmaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qextrudedtextgeometry.sip"
#include <qextrudedtextgeometry.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qextrudedtextmesh.sip"
#include <qextrudedtextmesh.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qfirstpersoncameracontroller.sip"
#include <qfirstpersoncameracontroller.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qforwardrenderer.sip"
#include <qforwardrenderer.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qgoochmaterial.sip"
#include <qgoochmaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qmetalroughmaterial.sip"
#include <qmetalroughmaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qmorphphongmaterial.sip"
#include <qmorphphongmaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qnormaldiffusemapalphamaterial.sip"
#include <qnormaldiffusemapalphamaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qnormaldiffusemapmaterial.sip"
#include <qnormaldiffusemapmaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qnormaldiffusespecularmapmaterial.sip"
#include <qnormaldiffusespecularmapmaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qorbitcameracontroller.sip"
#include <qorbitcameracontroller.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qpervertexcolormaterial.sip"
#include <qpervertexcolormaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qphongalphamaterial.sip"
#include <qphongalphamaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qphongmaterial.sip"
#include <qphongmaterial.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qplanegeometry.sip"
#include <qplanegeometry.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qplanegeometryview.sip"
#include <qplanegeometryview.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qplanemesh.sip"
#include <qplanemesh.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qskyboxentity.sip"
#include <qskyboxentity.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qspheregeometry.sip"
#include <qspheregeometry.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qspheregeometryview.sip"
#include <qspheregeometryview.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qspheremesh.sip"
#include <qspheremesh.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qspritegrid.sip"
#include <qspritegrid.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qspritesheet.sip"
#include <qspritesheet.h>
#line 26 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qspritesheetitem.sip"
#include <qspritesheetitem.h>
#line 32 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/sip/Qt3DExtras/qspritesheetitem.sip"
#include <qspritesheetitem.h>
#line 109 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/build/Qt3DExtras/sipQt3DExtrasQList0101Qt3DExtrasQSpriteSheetItem.cpp"


extern "C" {static void assign_QList_0101Qt3DExtras_QSpriteSheetItem(void *, Py_ssize_t, void *);}
static void assign_QList_0101Qt3DExtras_QSpriteSheetItem(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast<QList< ::Qt3DExtras::QSpriteSheetItem*> *>(sipDst)[sipDstIdx] = *reinterpret_cast<QList< ::Qt3DExtras::QSpriteSheetItem*> *>(sipSrc);
}


extern "C" {static void *array_QList_0101Qt3DExtras_QSpriteSheetItem(Py_ssize_t);}
static void *array_QList_0101Qt3DExtras_QSpriteSheetItem(Py_ssize_t sipNrElem)
{
    return new QList< ::Qt3DExtras::QSpriteSheetItem*>[sipNrElem];
}


extern "C" {static void *copy_QList_0101Qt3DExtras_QSpriteSheetItem(const void *, Py_ssize_t);}
static void *copy_QList_0101Qt3DExtras_QSpriteSheetItem(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new QList< ::Qt3DExtras::QSpriteSheetItem*>(reinterpret_cast<const QList< ::Qt3DExtras::QSpriteSheetItem*> *>(sipSrc)[sipSrcIdx]);
}


/* Call the mapped type's destructor. */
extern "C" {static void release_QList_0101Qt3DExtras_QSpriteSheetItem(void *, int, void *);}
static void release_QList_0101Qt3DExtras_QSpriteSheetItem(void *sipCppV, int, void *)
{
    QList< ::Qt3DExtras::QSpriteSheetItem*> *sipCpp = reinterpret_cast<QList< ::Qt3DExtras::QSpriteSheetItem*> *>(sipCppV);
    delete sipCpp;
}



extern "C" {static int convertTo_QList_0101Qt3DExtras_QSpriteSheetItem(PyObject *, void **, int *, PyObject *, void **);}
static int convertTo_QList_0101Qt3DExtras_QSpriteSheetItem(PyObject *sipPy, void **sipCppPtrV, int *sipIsErr, PyObject *sipTransferObj, void **)
{
    QList< ::Qt3DExtras::QSpriteSheetItem*> **sipCppPtr = reinterpret_cast<QList< ::Qt3DExtras::QSpriteSheetItem*> **>(sipCppPtrV);

#line 170 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qpycore_qlist.sip"
    PyObject *iter = PyObject_GetIter(sipPy);

    if (!sipIsErr)
    {
        PyErr_Clear();
        Py_XDECREF(iter);

        return (iter && !PyBytes_Check(sipPy) && !PyUnicode_Check(sipPy));
    }

    if (!iter)
    {
        *sipIsErr = 1;

        return 0;
    }

    QList<Qt3DExtras::QSpriteSheetItem *> *ql = new QList<Qt3DExtras::QSpriteSheetItem *>;
 
    for (Py_ssize_t i = 0; ; ++i)
    {
        PyErr_Clear();
        PyObject *itm = PyIter_Next(iter);

        if (!itm)
        {
            if (PyErr_Occurred())
            {
                delete ql;
                Py_DECREF(iter);
                *sipIsErr = 1;

                return 0;
            }

            break;
        }

        Qt3DExtras::QSpriteSheetItem *t = reinterpret_cast<Qt3DExtras::QSpriteSheetItem *>(
                sipForceConvertToType(itm, sipType_Qt3DExtras_QSpriteSheetItem, sipTransferObj, 0,
                        0, sipIsErr));
 
        if (*sipIsErr)
        {
            PyErr_Format(PyExc_TypeError,
                    "index %zd has type '%s' but 'Qt3DExtras::QSpriteSheetItem' is expected", i,
                    sipPyTypeName(Py_TYPE(itm)));

            Py_DECREF(itm);
            delete ql;
            Py_DECREF(iter);

            return 0;
        }

        ql->append(t);

        Py_DECREF(itm);
    }

    Py_DECREF(iter);
 
    *sipCppPtr = ql;
 
    return sipGetState(sipTransferObj);
#line 214 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/build/Qt3DExtras/sipQt3DExtrasQList0101Qt3DExtrasQSpriteSheetItem.cpp"
}


extern "C" {static PyObject *convertFrom_QList_0101Qt3DExtras_QSpriteSheetItem(void *, PyObject *);}
static PyObject *convertFrom_QList_0101Qt3DExtras_QSpriteSheetItem(void *sipCppV, PyObject *sipTransferObj)
{
    QList< ::Qt3DExtras::QSpriteSheetItem*> *sipCpp = reinterpret_cast<QList< ::Qt3DExtras::QSpriteSheetItem*> *>(sipCppV);

#line 139 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qpycore_qlist.sip"
    int gc_enabled = sipEnableGC(0);
    PyObject *l = PyList_New(sipCpp->size());

    if (l)
    {
        for (int i = 0; i < sipCpp->size(); ++i)
        {
            Qt3DExtras::QSpriteSheetItem *t = sipCpp->at(i);

            // The explicit (void *) cast allows Qt3DExtras::QSpriteSheetItem to be const.
            PyObject *tobj = sipConvertFromType((void *)t, sipType_Qt3DExtras_QSpriteSheetItem,
                    sipTransferObj);

            if (!tobj)
            {
                Py_DECREF(l);
                l = 0;

                break;
            }

            PyList_SetItem(l, i, tobj);
        }
    }

    sipEnableGC(gc_enabled);

    return l;
#line 252 "/build/pyqt6-3d/src/pyqt6_3d-6.11.0/build/Qt3DExtras/sipQt3DExtrasQList0101Qt3DExtrasQSpriteSheetItem.cpp"
}


sipMappedTypeDef sipTypeDef_Qt3DExtras_QList_0101Qt3DExtras_QSpriteSheetItem = {
    {
        SIP_NULLPTR,
        SIP_TYPE_MAPPED,
        sipNameNr_246,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        -1,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
    },
    assign_QList_0101Qt3DExtras_QSpriteSheetItem,
    array_QList_0101Qt3DExtras_QSpriteSheetItem,
    copy_QList_0101Qt3DExtras_QSpriteSheetItem,
    release_QList_0101Qt3DExtras_QSpriteSheetItem,
    convertTo_QList_0101Qt3DExtras_QSpriteSheetItem,
    convertFrom_QList_0101Qt3DExtras_QSpriteSheetItem
};
