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

#include "sipAPIKGuiAddons.h"

#include <kcolormimedata.h>

#include <qmimedata.h>
#include <qcolor.h>
#include <qdrag.h>
#include <qobject.h>


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

    {
        const  ::QColor* a0;
        int a0State = 0;
         ::QObject* a1;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1J8", sipType_QColor, &a0, &a0State, sipType_QObject, &a1))
        {
             ::QDrag*sipRes;

            sipRes =  ::KColorMimeData::createDrag(*a0,a1);
            sipReleaseType(const_cast< ::QColor *>(a0),sipType_QColor,a0State);

            return sipConvertFromType(sipRes,sipType_QDrag,NULL);
        }
    }

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

    return NULL;
}


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

    {
        const  ::QMimeData* a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J8", sipType_QMimeData, &a0))
        {
             ::QColor*sipRes;

            sipRes = new  ::QColor( ::KColorMimeData::fromMimeData(a0));

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

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

    return NULL;
}


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

    {
        const  ::QMimeData* a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J8", sipType_QMimeData, &a0))
        {
            bool sipRes;

            sipRes =  ::KColorMimeData::canDecode(a0);

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
         ::QMimeData* a0;
        const  ::QColor* a1;
        int a1State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J8J1", sipType_QMimeData, &a0, sipType_QColor, &a1, &a1State))
        {
             ::KColorMimeData::populateMimeData(a0,*a1);
            sipReleaseType(const_cast< ::QColor *>(a1),sipType_QColor,a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


static PyMethodDef methods_KColorMimeData[] = {
    {SIP_MLNAME_CAST(sipName_canDecode), meth_KColorMimeData_canDecode, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_createDrag), meth_KColorMimeData_createDrag, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_fromMimeData), meth_KColorMimeData_fromMimeData, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_populateMimeData), meth_KColorMimeData_populateMimeData, METH_VARARGS, NULL}
};


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


sipClassTypeDef sipTypeDef_KGuiAddons_KColorMimeData = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_NAMESPACE,
        sipNameNr_KColorMimeData,
        {0},
        &plugin_KColorMimeData
    },
    {
        sipNameNr_KColorMimeData,
        {0, 0, 1},
        4, methods_KColorMimeData,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    0,
    0,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0
};
