/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 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 567 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtWidgets/qstyleoption.sip"
#include <qstyleoption.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtWidgets/sipQtWidgetsQStyleOptionMenuItemV2.cpp"

#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtWidgets/qwidget.sip"
#include <qwidget.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtWidgets/sipQtWidgetsQStyleOptionMenuItemV2.cpp"


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

    if (targetType == sipType_QStyleOptionMenuItemV2)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QStyleOptionMenuItem)->ctd_cast(static_cast< ::QStyleOptionMenuItem *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QStyleOptionMenuItemV2* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


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

    sipVal = sipCpp->mouseDown;

    return PyBool_FromLong(sipVal);
}


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

    sipVal = sipConvertToBool(sipPy);

    if (sipVal < 0)
        return -1;

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

    return 0;
}

sipVariableDef variables_QStyleOptionMenuItemV2[] = {
    {InstanceVariable, sipName_mouseDown, (PyMethodDef *)varget_QStyleOptionMenuItemV2_mouseDown, (PyMethodDef *)varset_QStyleOptionMenuItemV2_mouseDown, SIP_NULLPTR, SIP_NULLPTR},
};


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

PyDoc_STRVAR(doc_QStyleOptionMenuItemV2, "\1QStyleOptionMenuItemV2()\n"
"QStyleOptionMenuItemV2(other: QStyleOptionMenuItemV2)");


sipClassTypeDef sipTypeDef_QtWidgets_QStyleOptionMenuItemV2 = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QStyleOptionMenuItemV2,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QStyleOptionMenuItemV2,
        {0, 0, 1},
        0, SIP_NULLPTR,
        1, variables_QStyleOptionMenuItemV2,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QStyleOptionMenuItemV2, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QStyleOptionMenuItemV2,
    -1,
    -1,
    supers_QStyleOptionMenuItemV2,
    SIP_NULLPTR,
    init_type_QStyleOptionMenuItemV2,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QStyleOptionMenuItemV2,
    assign_QStyleOptionMenuItemV2,
    array_QStyleOptionMenuItemV2,
    copy_QStyleOptionMenuItemV2,
    release_QStyleOptionMenuItemV2,
    cast_QStyleOptionMenuItemV2,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QStyleOptionMenuItemV2,
    sizeof (::QStyleOptionMenuItemV2),
};
