/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.8.6
 *
 * Copyright (c) 2023 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 372 "/usr/src/debug/python3-pyqt5/5.15.10/sip/QtGui/qbrush.sip"
#include <qbrush.h>
#line 29 "/usr/src/debug/python3-pyqt5/5.15.10/QtGui/sipQtGuiQLinearGradient.cpp"

#line 98 "/usr/src/debug/python3-pyqt5/5.15.10/sip/QtCore/qpoint.sip"
#include <qpoint.h>
#line 33 "/usr/src/debug/python3-pyqt5/5.15.10/QtGui/sipQtGuiQLinearGradient.cpp"
#line 123 "/usr/src/debug/python3-pyqt5/5.15.10/sip/QtGui/qbrush.sip"
#include <qbrush.h>
#line 36 "/usr/src/debug/python3-pyqt5/5.15.10/QtGui/sipQtGuiQLinearGradient.cpp"
#line 253 "/usr/src/debug/python3-pyqt5/5.15.10/sip/QtCore/qpycore_qvector.sip"
#include <qvector.h>
#include <qpair.h>
#line 40 "/usr/src/debug/python3-pyqt5/5.15.10/QtGui/sipQtGuiQLinearGradient.cpp"
#line 26 "/usr/src/debug/python3-pyqt5/5.15.10/sip/QtGui/qcolor.sip"
#include <qcolor.h>
#line 43 "/usr/src/debug/python3-pyqt5/5.15.10/QtGui/sipQtGuiQLinearGradient.cpp"


PyDoc_STRVAR(doc_QLinearGradient_start, "start(self) -> QPointF");

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

    {
        const ::QLinearGradient *sipCpp;

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

            sipRes = new ::QPointF(sipCpp->start());

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

    sipNoMethod(sipParseErr, sipName_QLinearGradient, sipName_start, doc_QLinearGradient_start);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QLinearGradient_finalStop, "finalStop(self) -> QPointF");

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

    {
        const ::QLinearGradient *sipCpp;

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

            sipRes = new ::QPointF(sipCpp->finalStop());

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

    sipNoMethod(sipParseErr, sipName_QLinearGradient, sipName_finalStop, doc_QLinearGradient_finalStop);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QLinearGradient_setStart, "setStart(self, start: Union[QPointF, QPoint])\n"
"setStart(self, x: float, y: float)");

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

    {
        const ::QPointF* a0;
        int a0State = 0;
        ::QLinearGradient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QLinearGradient, &sipCpp, sipType_QPointF, &a0, &a0State))
        {
            sipCpp->setStart(*a0);
            sipReleaseType(const_cast<::QPointF *>(a0), sipType_QPointF, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        ::qreal a0;
        ::qreal a1;
        ::QLinearGradient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bdd", &sipSelf, sipType_QLinearGradient, &sipCpp, &a0, &a1))
        {
            sipCpp->setStart(a0, a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QLinearGradient, sipName_setStart, doc_QLinearGradient_setStart);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QLinearGradient_setFinalStop, "setFinalStop(self, stop: Union[QPointF, QPoint])\n"
"setFinalStop(self, x: float, y: float)");

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

    {
        const ::QPointF* a0;
        int a0State = 0;
        ::QLinearGradient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QLinearGradient, &sipCpp, sipType_QPointF, &a0, &a0State))
        {
            sipCpp->setFinalStop(*a0);
            sipReleaseType(const_cast<::QPointF *>(a0), sipType_QPointF, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        ::qreal a0;
        ::qreal a1;
        ::QLinearGradient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bdd", &sipSelf, sipType_QLinearGradient, &sipCpp, &a0, &a1))
        {
            sipCpp->setFinalStop(a0, a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QLinearGradient, sipName_setFinalStop, doc_QLinearGradient_setFinalStop);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QLinearGradient(void *, const sipTypeDef *);}
static void *cast_QLinearGradient(void *sipCppV, const sipTypeDef *targetType)
{
    ::QLinearGradient *sipCpp = reinterpret_cast<::QLinearGradient *>(sipCppV);

    if (targetType == sipType_QLinearGradient)
        return sipCppV;

    if (targetType == sipType_QGradient)
        return static_cast<::QGradient *>(sipCpp);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QPointF* a0;
        int a0State = 0;
        const ::QPointF* a1;
        int a1State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1J1", sipType_QPointF, &a0, &a0State, sipType_QPointF, &a1, &a1State))
        {
            sipCpp = new ::QLinearGradient(*a0, *a1);
            sipReleaseType(const_cast<::QPointF *>(a0), sipType_QPointF, a0State);
            sipReleaseType(const_cast<::QPointF *>(a1), sipType_QPointF, a1State);

            return sipCpp;
        }
    }

    {
        ::qreal a0;
        ::qreal a1;
        ::qreal a2;
        ::qreal a3;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "dddd", &a0, &a1, &a2, &a3))
        {
            sipCpp = new ::QLinearGradient(a0, a1, a2, a3);

            return sipCpp;
        }
    }

    {
        const ::QLinearGradient* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QLinearGradient[] = {{56, 255, 1}};


static PyMethodDef methods_QLinearGradient[] = {
    {sipName_finalStop, meth_QLinearGradient_finalStop, METH_VARARGS, doc_QLinearGradient_finalStop},
    {sipName_setFinalStop, meth_QLinearGradient_setFinalStop, METH_VARARGS, doc_QLinearGradient_setFinalStop},
    {sipName_setStart, meth_QLinearGradient_setStart, METH_VARARGS, doc_QLinearGradient_setStart},
    {sipName_start, meth_QLinearGradient_start, METH_VARARGS, doc_QLinearGradient_start}
};

PyDoc_STRVAR(doc_QLinearGradient, "\1QLinearGradient()\n"
"QLinearGradient(start: Union[QPointF, QPoint], finalStop: Union[QPointF, QPoint])\n"
"QLinearGradient(xStart: float, yStart: float, xFinalStop: float, yFinalStop: float)\n"
"QLinearGradient(a0: QLinearGradient)");


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


sipClassTypeDef sipTypeDef_QtGui_QLinearGradient = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QLinearGradient,
        SIP_NULLPTR,
        &plugin_QLinearGradient,
    },
    {
        sipNameNr_QLinearGradient,
        {0, 0, 1},
        4, methods_QLinearGradient,
        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_QLinearGradient,
    -1,
    -1,
    supers_QLinearGradient,
    SIP_NULLPTR,
    init_type_QLinearGradient,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QLinearGradient,
    assign_QLinearGradient,
    array_QLinearGradient,
    copy_QLinearGradient,
    release_QLinearGradient,
    cast_QLinearGradient,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QLinearGradient,
    sizeof (::QLinearGradient),
};
