/*
 * 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 "sipAPIQtQuick.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsggeometry.sip"
#include <qsggeometry.h>
#line 237 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsggeometry.sip"
#include <qsggeometry.h>
#line 31 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGGeometryPoint2D.cpp"



PyDoc_STRVAR(doc_QSGGeometry_Point2D_set, "set(self, float, float)");

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

    {
        float a0;
        float a1;
         ::QSGGeometry::Point2D *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bff", &sipSelf, sipType_QSGGeometry_Point2D, &sipCpp, &a0, &a1))
        {
            sipCpp->set(a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_Point2D, sipName_set, doc_QSGGeometry_Point2D_set);

    return SIP_NULLPTR;
}


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


extern "C" {static void *array_QSGGeometry_Point2D(Py_ssize_t);}
static void *array_QSGGeometry_Point2D(Py_ssize_t sipNrElem)
{
    return new  ::QSGGeometry::Point2D[sipNrElem];
}


extern "C" {static void array_delete_QSGGeometry_Point2D(void *);}
static void array_delete_QSGGeometry_Point2D(void *sipCpp)
{
    delete[] reinterpret_cast< ::QSGGeometry::Point2D *>(sipCpp);
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QSGGeometry::Point2D* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QSGGeometry_Point2D[] = {
    {sipName_set, meth_QSGGeometry_Point2D_set, METH_VARARGS, doc_QSGGeometry_Point2D_set}
};


extern "C" {static PyObject *varget_QSGGeometry_Point2D_x(void *, PyObject *, PyObject *);}
static PyObject *varget_QSGGeometry_Point2D_x(void *sipSelf, PyObject *, PyObject *)
{
    float sipVal;
     ::QSGGeometry::Point2D *sipCpp = reinterpret_cast< ::QSGGeometry::Point2D *>(sipSelf);

    sipVal = sipCpp->x;

    return PyFloat_FromDouble((double)sipVal);
}


extern "C" {static int varset_QSGGeometry_Point2D_x(void *, PyObject *, PyObject *);}
static int varset_QSGGeometry_Point2D_x(void *sipSelf, PyObject *sipPy, PyObject *)
{
    float sipVal;
     ::QSGGeometry::Point2D *sipCpp = reinterpret_cast< ::QSGGeometry::Point2D *>(sipSelf);

    sipVal = (float)PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->x = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QSGGeometry_Point2D_y(void *, PyObject *, PyObject *);}
static PyObject *varget_QSGGeometry_Point2D_y(void *sipSelf, PyObject *, PyObject *)
{
    float sipVal;
     ::QSGGeometry::Point2D *sipCpp = reinterpret_cast< ::QSGGeometry::Point2D *>(sipSelf);

    sipVal = sipCpp->y;

    return PyFloat_FromDouble((double)sipVal);
}


extern "C" {static int varset_QSGGeometry_Point2D_y(void *, PyObject *, PyObject *);}
static int varset_QSGGeometry_Point2D_y(void *sipSelf, PyObject *sipPy, PyObject *)
{
    float sipVal;
     ::QSGGeometry::Point2D *sipCpp = reinterpret_cast< ::QSGGeometry::Point2D *>(sipSelf);

    sipVal = (float)PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->y = sipVal;

    return 0;
}

sipVariableDef variables_QSGGeometry_Point2D[] = {
    {InstanceVariable, sipName_x, (PyMethodDef *)varget_QSGGeometry_Point2D_x, (PyMethodDef *)varset_QSGGeometry_Point2D_x, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_y, (PyMethodDef *)varget_QSGGeometry_Point2D_y, (PyMethodDef *)varset_QSGGeometry_Point2D_y, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QSGGeometry_Point2D, "\1QSGGeometry.Point2D()\n"
"QSGGeometry.Point2D(QSGGeometry.Point2D)");


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


sipClassTypeDef sipTypeDef_QtQuick_QSGGeometry_Point2D = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSGGeometry__Point2D,
        SIP_NULLPTR,
        &plugin_QSGGeometry_Point2D
    },
    {
        sipNameNr_Point2D,
        {44, 255, 0},
        1, methods_QSGGeometry_Point2D,
        0, SIP_NULLPTR,
        2, variables_QSGGeometry_Point2D,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSGGeometry_Point2D,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QSGGeometry_Point2D,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSGGeometry_Point2D,
    assign_QSGGeometry_Point2D,
    array_QSGGeometry_Point2D,
    copy_QSGGeometry_Point2D,
    release_QSGGeometry_Point2D,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSGGeometry_Point2D,
    sizeof ( ::QSGGeometry::Point2D),
};
