/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * 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 "sipAPIQtGui.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpixmapcache.sip"
#include <qpixmapcache.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPixmapCache.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpixmapcache.sip"
#include <qpixmapcache.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpixmapcache.sip"
#include <qpixmapcache.h>
#line 35 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPixmapCache.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpixmap.sip"
#include <qpixmap.h>
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPixmapCache.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 41 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPixmapCache.cpp"


PyDoc_STRVAR(doc_QPixmapCache_cacheLimit, "cacheLimit() -> int");

extern "C" {static PyObject *meth_QPixmapCache_cacheLimit(PyObject *, PyObject *);}
static PyObject *meth_QPixmapCache_cacheLimit(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            int sipRes;

            sipRes =  ::QPixmapCache::cacheLimit();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPixmapCache, sipName_cacheLimit, doc_QPixmapCache_cacheLimit);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPixmapCache_clear, "clear()");

extern "C" {static PyObject *meth_QPixmapCache_clear(PyObject *, PyObject *);}
static PyObject *meth_QPixmapCache_clear(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
             ::QPixmapCache::clear();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPixmapCache, sipName_clear, doc_QPixmapCache_clear);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPixmapCache_find, "find(str) -> QPixmap\n"
"find(QPixmapCache.Key) -> QPixmap");

extern "C" {static PyObject *meth_QPixmapCache_find(PyObject *, PyObject *);}
static PyObject *meth_QPixmapCache_find(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString, &a0, &a0State))
        {
             ::QPixmap*sipRes = 0;

#line 54 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpixmapcache.sip"
        sipRes = new QPixmap;
        
        if (!QPixmapCache::find(*a0, sipRes))
        {
            delete sipRes;
            sipRes = 0;
        }
#line 119 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPixmapCache.cpp"
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipConvertFromNewType(sipRes,sipType_QPixmap,SIP_NULLPTR);
        }
    }

    {
        const  ::QPixmapCache::Key* a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9", sipType_QPixmapCache_Key, &a0))
        {
             ::QPixmap*sipRes = 0;

#line 65 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpixmapcache.sip"
        sipRes = new QPixmap;
        
        if (!QPixmapCache::find(*a0, sipRes))
        {
            delete sipRes;
            sipRes = 0;
        }
#line 141 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPixmapCache.cpp"

            return sipConvertFromNewType(sipRes,sipType_QPixmap,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPixmapCache, sipName_find, doc_QPixmapCache_find);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPixmapCache_insert, "insert(str, QPixmap) -> bool\n"
"insert(QPixmap) -> QPixmapCache.Key");

extern "C" {static PyObject *meth_QPixmapCache_insert(PyObject *, PyObject *);}
static PyObject *meth_QPixmapCache_insert(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
        const  ::QPixmap* a1;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1J9", sipType_QString, &a0, &a0State, sipType_QPixmap, &a1))
        {
            bool sipRes;

            sipRes =  ::QPixmapCache::insert(*a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    {
        const  ::QPixmap* a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9", sipType_QPixmap, &a0))
        {
             ::QPixmapCache::Key*sipRes;

            sipRes = new  ::QPixmapCache::Key( ::QPixmapCache::insert(*a0));

            return sipConvertFromNewType(sipRes,sipType_QPixmapCache_Key,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPixmapCache, sipName_insert, doc_QPixmapCache_insert);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPixmapCache_remove, "remove(str)\n"
"remove(QPixmapCache.Key)");

extern "C" {static PyObject *meth_QPixmapCache_remove(PyObject *, PyObject *);}
static PyObject *meth_QPixmapCache_remove(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString, &a0, &a0State))
        {
             ::QPixmapCache::remove(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const  ::QPixmapCache::Key* a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9", sipType_QPixmapCache_Key, &a0))
        {
             ::QPixmapCache::remove(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPixmapCache, sipName_remove, doc_QPixmapCache_remove);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPixmapCache_replace, "replace(QPixmapCache.Key, QPixmap) -> bool");

extern "C" {static PyObject *meth_QPixmapCache_replace(PyObject *, PyObject *);}
static PyObject *meth_QPixmapCache_replace(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPixmapCache::Key* a0;
        const  ::QPixmap* a1;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9J9", sipType_QPixmapCache_Key, &a0, sipType_QPixmap, &a1))
        {
            bool sipRes;

            sipRes =  ::QPixmapCache::replace(*a0,*a1);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPixmapCache, sipName_replace, doc_QPixmapCache_replace);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPixmapCache_setCacheLimit, "setCacheLimit(int)");

extern "C" {static PyObject *meth_QPixmapCache_setCacheLimit(PyObject *, PyObject *);}
static PyObject *meth_QPixmapCache_setCacheLimit(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "i", &a0))
        {
             ::QPixmapCache::setCacheLimit(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPixmapCache, sipName_setCacheLimit, doc_QPixmapCache_setCacheLimit);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QPixmapCache(void *, int);}
static void release_QPixmapCache(void *sipCppV, int)
{
    delete reinterpret_cast< ::QPixmapCache *>(sipCppV);
}


extern "C" {static void *array_QPixmapCache(Py_ssize_t);}
static void *array_QPixmapCache(Py_ssize_t sipNrElem)
{
    return new  ::QPixmapCache[sipNrElem];
}


extern "C" {static void array_delete_QPixmapCache(void *);}
static void array_delete_QPixmapCache(void *sipCpp)
{
    delete[] reinterpret_cast< ::QPixmapCache *>(sipCpp);
}


extern "C" {static void assign_QPixmapCache(void *, Py_ssize_t, void *);}
static void assign_QPixmapCache(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QPixmapCache *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QPixmapCache *>(sipSrc);
}


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


extern "C" {static void dealloc_QPixmapCache(sipSimpleWrapper *);}
static void dealloc_QPixmapCache(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QPixmapCache(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QPixmapCache(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QPixmapCache(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::QPixmapCache *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new  ::QPixmapCache();

            return sipCpp;
        }
    }

    {
        const  ::QPixmapCache* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QPixmapCache, &a0))
        {
            sipCpp = new  ::QPixmapCache(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QPixmapCache[] = {
    {sipName_cacheLimit, meth_QPixmapCache_cacheLimit, METH_VARARGS, doc_QPixmapCache_cacheLimit},
    {sipName_clear, meth_QPixmapCache_clear, METH_VARARGS, doc_QPixmapCache_clear},
    {sipName_find, meth_QPixmapCache_find, METH_VARARGS, doc_QPixmapCache_find},
    {sipName_insert, meth_QPixmapCache_insert, METH_VARARGS, doc_QPixmapCache_insert},
    {sipName_remove, meth_QPixmapCache_remove, METH_VARARGS, doc_QPixmapCache_remove},
    {sipName_replace, meth_QPixmapCache_replace, METH_VARARGS, doc_QPixmapCache_replace},
    {sipName_setCacheLimit, meth_QPixmapCache_setCacheLimit, METH_VARARGS, doc_QPixmapCache_setCacheLimit}
};

PyDoc_STRVAR(doc_QPixmapCache, "\1QPixmapCache()\n"
"QPixmapCache(QPixmapCache)");


static pyqt5ClassPluginDef plugin_QPixmapCache = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtGui_QPixmapCache = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPixmapCache,
        SIP_NULLPTR,
        &plugin_QPixmapCache
    },
    {
        sipNameNr_QPixmapCache,
        {0, 0, 1},
        7, methods_QPixmapCache,
        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},
    },
    doc_QPixmapCache,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QPixmapCache,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPixmapCache,
    assign_QPixmapCache,
    array_QPixmapCache,
    copy_QPixmapCache,
    release_QPixmapCache,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QPixmapCache,
    sizeof ( ::QPixmapCache),
};
