/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.6
 */

#include "sipAPIKWidgetsAddons.h"

#include <kpixmapsequence.h>

#include <qpixmap.h>
#include <qsize.h>
#include <qstring.h>


extern "C" {static PyObject *meth_KPixmapSequence_isValid(PyObject *, PyObject *);}
static PyObject *meth_KPixmapSequence_isValid(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const  ::KPixmapSequence *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KPixmapSequence, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KPixmapSequence, sipName_isValid, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KPixmapSequence_isEmpty(PyObject *, PyObject *);}
static PyObject *meth_KPixmapSequence_isEmpty(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const  ::KPixmapSequence *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KPixmapSequence, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isEmpty();

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KPixmapSequence, sipName_isEmpty, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KPixmapSequence_frameSize(PyObject *, PyObject *);}
static PyObject *meth_KPixmapSequence_frameSize(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const  ::KPixmapSequence *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KPixmapSequence, &sipCpp))
        {
             ::QSize*sipRes;

            sipRes = new  ::QSize(sipCpp->frameSize());

            return sipConvertFromNewType(sipRes,sipType_QSize,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KPixmapSequence, sipName_frameSize, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KPixmapSequence_frameCount(PyObject *, PyObject *);}
static PyObject *meth_KPixmapSequence_frameCount(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const  ::KPixmapSequence *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KPixmapSequence, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->frameCount();

            return SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KPixmapSequence, sipName_frameCount, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KPixmapSequence_frameAt(PyObject *, PyObject *);}
static PyObject *meth_KPixmapSequence_frameAt(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        int a0;
        const  ::KPixmapSequence *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_KPixmapSequence, &sipCpp, &a0))
        {
             ::QPixmap*sipRes;

            sipRes = new  ::QPixmap(sipCpp->frameAt(a0));

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KPixmapSequence, sipName_frameAt, NULL);

    return NULL;
}


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


extern "C" {static void assign_KPixmapSequence(void *, SIP_SSIZE_T, void *);}
static void assign_KPixmapSequence(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::KPixmapSequence *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::KPixmapSequence *>(sipSrc);
}


extern "C" {static void *array_KPixmapSequence(SIP_SSIZE_T);}
static void *array_KPixmapSequence(SIP_SSIZE_T sipNrElem)
{
    return new  ::KPixmapSequence[sipNrElem];
}


extern "C" {static void *copy_KPixmapSequence(const void *, SIP_SSIZE_T);}
static void *copy_KPixmapSequence(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new  ::KPixmapSequence(reinterpret_cast<const  ::KPixmapSequence *>(sipSrc)[sipSrcIdx]);
}


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


extern "C" {static void *init_type_KPixmapSequence(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_KPixmapSequence(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::KPixmapSequence *sipCpp = 0;

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

            return sipCpp;
        }
    }

    {
        const  ::KPixmapSequence* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_KPixmapSequence, &a0))
        {
            sipCpp = new  ::KPixmapSequence(*a0);

            return sipCpp;
        }
    }

    {
        const  ::QPixmap* a0;
        const  ::QSize& a1def = QSize();
        const  ::QSize* a1 = &a1def;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9|J9", sipType_QPixmap, &a0, sipType_QSize, &a1))
        {
            sipCpp = new  ::KPixmapSequence(*a0,*a1);

            return sipCpp;
        }
    }

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J1i", sipType_QString,&a0, &a0State, &a1))
        {
            sipCpp = new  ::KPixmapSequence(*a0,a1);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KPixmapSequence[] = {
    {SIP_MLNAME_CAST(sipName_frameAt), meth_KPixmapSequence_frameAt, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_frameCount), meth_KPixmapSequence_frameCount, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_frameSize), meth_KPixmapSequence_frameSize, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_isEmpty), meth_KPixmapSequence_isEmpty, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_isValid), meth_KPixmapSequence_isValid, METH_VARARGS, NULL}
};


static pyqt5ClassPluginDef plugin_KPixmapSequence = {
    0,
    0,
    0,
    0
};


sipClassTypeDef sipTypeDef_KWidgetsAddons_KPixmapSequence = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KPixmapSequence,
        {0},
        &plugin_KPixmapSequence
    },
    {
        sipNameNr_KPixmapSequence,
        {0, 0, 1},
        5, methods_KPixmapSequence,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    0,
    init_type_KPixmapSequence,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KPixmapSequence,
    assign_KPixmapSequence,
    array_KPixmapSequence,
    copy_KPixmapSequence,
    release_KPixmapSequence,
    0,
    0,
    0,
    0,
    0,
    0,
    0
};
