/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.7.0
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * 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 "sipAPIQtWidgets.h"

#line 689 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtWidgets/qstyleoption.sip"
#include <qstyleoption.h>
#line 29 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWidgets/sipQtWidgetsQStyleOptionRubberBand.cpp"

#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtWidgets/qrubberband.sip"
#include <qrubberband.h>
#line 33 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWidgets/sipQtWidgetsQStyleOptionRubberBand.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtWidgets/qwidget.sip"
#include <qwidget.h>
#line 36 "/build/pyqt6/src/PyQt6-6.4.0/build/QtWidgets/sipQtWidgetsQStyleOptionRubberBand.cpp"


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

    if (targetType == sipType_QStyleOptionRubberBand)
        return sipCppV;

    if (targetType == sipType_QStyleOption)
        return static_cast< ::QStyleOption *>(sipCpp);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QStyleOptionRubberBand* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


extern "C" {static PyObject *varget_QStyleOptionRubberBand_opaque(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionRubberBand_opaque(void *sipSelf, PyObject *, PyObject *)
{
    bool sipVal;
     ::QStyleOptionRubberBand *sipCpp = reinterpret_cast< ::QStyleOptionRubberBand *>(sipSelf);

    sipVal = sipCpp->opaque;

    return PyBool_FromLong(sipVal);
}


extern "C" {static int varset_QStyleOptionRubberBand_opaque(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionRubberBand_opaque(void *sipSelf, PyObject *sipPy, PyObject *)
{
    int sipVal;
     ::QStyleOptionRubberBand *sipCpp = reinterpret_cast< ::QStyleOptionRubberBand *>(sipSelf);

    sipVal = sipConvertToBool(sipPy);

    if (sipVal < 0)
        return -1;

    sipCpp->opaque = static_cast<bool>(sipVal);

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionRubberBand_shape(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionRubberBand_shape(void *sipSelf, PyObject *, PyObject *)
{
     ::QRubberBand::Shape sipVal;
     ::QStyleOptionRubberBand *sipCpp = reinterpret_cast< ::QStyleOptionRubberBand *>(sipSelf);

    sipVal = sipCpp->shape;

    return sipConvertFromEnum(static_cast<int>(sipVal), sipType_QRubberBand_Shape);
}


extern "C" {static int varset_QStyleOptionRubberBand_shape(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionRubberBand_shape(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QRubberBand::Shape sipVal;
     ::QStyleOptionRubberBand *sipCpp = reinterpret_cast< ::QStyleOptionRubberBand *>(sipSelf);

    sipVal = ( ::QRubberBand::Shape)sipConvertToEnum(sipPy, sipType_QRubberBand_Shape);

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

    sipCpp->shape = sipVal;

    return 0;
}

sipVariableDef variables_QStyleOptionRubberBand[] = {
    {InstanceVariable, sipName_opaque, (PyMethodDef *)varget_QStyleOptionRubberBand_opaque, (PyMethodDef *)varset_QStyleOptionRubberBand_opaque, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_shape, (PyMethodDef *)varget_QStyleOptionRubberBand_shape, (PyMethodDef *)varset_QStyleOptionRubberBand_shape, SIP_NULLPTR, SIP_NULLPTR},
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QStyleOptionRubberBand[] = {
    {sipName_Type, static_cast<int>( ::QStyleOptionRubberBand::Type)},
    {sipName_Version, static_cast<int>( ::QStyleOptionRubberBand::Version)},
    {0, 0}
};

PyDoc_STRVAR(doc_QStyleOptionRubberBand, "\1QStyleOptionRubberBand()\n"
"QStyleOptionRubberBand(QStyleOptionRubberBand)");


sipClassTypeDef sipTypeDef_QtWidgets_QStyleOptionRubberBand = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QStyleOptionRubberBand,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_QStyleOptionRubberBand,
        {0, 0, 1},
        0, SIP_NULLPTR,
        2, variables_QStyleOptionRubberBand,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QStyleOptionRubberBand, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QStyleOptionRubberBand,
    -1,
    -1,
    supers_QStyleOptionRubberBand,
    SIP_NULLPTR,
    init_type_QStyleOptionRubberBand,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QStyleOptionRubberBand,
    assign_QStyleOptionRubberBand,
    array_QStyleOptionRubberBand,
    copy_QStyleOptionRubberBand,
    release_QStyleOptionRubberBand,
    cast_QStyleOptionRubberBand,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QStyleOptionRubberBand,
    sizeof ( ::QStyleOptionRubberBand),
};
