/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.23
 *
 * Copyright (c) 2020 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 28 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qcolortransform.sip"
#include <qcolortransform.h>
#line 29 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQColorTransform.cpp"

#line 34 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qrgba64.sip"
#include <qrgba64.h>
#line 33 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQColorTransform.cpp"
#line 26 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qcolor.sip"
#include <qcolor.h>
#line 36 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQColorTransform.cpp"


PyDoc_STRVAR(doc_QColorTransform_swap, "swap(self, QColorTransform)");

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

    {
         ::QColorTransform* a0;
         ::QColorTransform *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QColorTransform, &sipCpp, sipType_QColorTransform, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QColorTransform, sipName_swap, doc_QColorTransform_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QColorTransform_map, "map(self, int) -> int\n"
"map(self, QRgba64) -> QRgba64\n"
"map(self, Union[QColor, Qt.GlobalColor, QGradient]) -> QColor");

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

    {
         ::QRgb a0;
        const  ::QColorTransform *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bu", &sipSelf, sipType_QColorTransform, &sipCpp, &a0))
        {
             ::QRgb sipRes;

            sipRes = sipCpp->map(a0);

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    {
         ::QRgba64* a0;
        const  ::QColorTransform *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QColorTransform, &sipCpp, sipType_QRgba64, &a0))
        {
             ::QRgba64*sipRes;

            sipRes = new  ::QRgba64(sipCpp->map(*a0));

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

    {
        const  ::QColor* a0;
        int a0State = 0;
        const  ::QColorTransform *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QColorTransform, &sipCpp, sipType_QColor, &a0, &a0State))
        {
             ::QColor*sipRes;

            sipRes = new  ::QColor(sipCpp->map(*a0));
            sipReleaseType(const_cast< ::QColor *>(a0),sipType_QColor,a0State);

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

    sipNoMethod(sipParseErr, sipName_QColorTransform, sipName_map, doc_QColorTransform_map);

    return SIP_NULLPTR;
}


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QColorTransform* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QColorTransform[] = {
    {SIP_MLNAME_CAST(sipName_map), meth_QColorTransform_map, METH_VARARGS, SIP_MLDOC_CAST(doc_QColorTransform_map)},
    {SIP_MLNAME_CAST(sipName_swap), meth_QColorTransform_swap, METH_VARARGS, SIP_MLDOC_CAST(doc_QColorTransform_swap)}
};

PyDoc_STRVAR(doc_QColorTransform, "\1QColorTransform()\n"
"QColorTransform(QColorTransform)");


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


sipClassTypeDef sipTypeDef_QtGui_QColorTransform = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QColorTransform,
        {SIP_NULLPTR},
        &plugin_QColorTransform
    },
    {
        sipNameNr_QColorTransform,
        {0, 0, 1},
        2, methods_QColorTransform,
        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_QColorTransform,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QColorTransform,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_QColorTransform,
    assign_QColorTransform,
    array_QColorTransform,
    copy_QColorTransform,
    release_QColorTransform,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
