/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * 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 "sipAPIQtGui.h"

#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtGui/qiconengine.sip"
#include <qiconengine.h>
#line 61 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtGui/qiconengine.sip"
#include <qiconengine.h>
#line 31 "/build/pyqt6/src/PyQt6-6.3.1/build/QtGui/sipQtGuiQIconEngineScaledPixmapArgument.cpp"

#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtGui/qicon.sip"
#include <qicon.h>
#line 35 "/build/pyqt6/src/PyQt6-6.3.1/build/QtGui/sipQtGuiQIconEngineScaledPixmapArgument.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtGui/qpixmap.sip"
#include <qpixmap.h>
#line 38 "/build/pyqt6/src/PyQt6-6.3.1/build/QtGui/sipQtGuiQIconEngineScaledPixmapArgument.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qsize.sip"
#include <qsize.h>
#line 41 "/build/pyqt6/src/PyQt6-6.3.1/build/QtGui/sipQtGuiQIconEngineScaledPixmapArgument.cpp"


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


extern "C" {static void *array_QIconEngine_ScaledPixmapArgument(Py_ssize_t);}
static void *array_QIconEngine_ScaledPixmapArgument(Py_ssize_t sipNrElem)
{
    return new  ::QIconEngine::ScaledPixmapArgument[sipNrElem];
}


extern "C" {static void array_delete_QIconEngine_ScaledPixmapArgument(void *);}
static void array_delete_QIconEngine_ScaledPixmapArgument(void *sipCpp)
{
    delete[] reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipCpp);
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QIconEngine::ScaledPixmapArgument* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_QIconEngine_ScaledPixmapArgument_mode(void *, PyObject *, PyObject *);}
static PyObject *varget_QIconEngine_ScaledPixmapArgument_mode(void *sipSelf, PyObject *, PyObject *)
{
     ::QIcon::Mode sipVal;
     ::QIconEngine::ScaledPixmapArgument *sipCpp = reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipSelf);

    sipVal = sipCpp->mode;

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


extern "C" {static int varset_QIconEngine_ScaledPixmapArgument_mode(void *, PyObject *, PyObject *);}
static int varset_QIconEngine_ScaledPixmapArgument_mode(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QIcon::Mode sipVal;
     ::QIconEngine::ScaledPixmapArgument *sipCpp = reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipSelf);

    sipVal = ( ::QIcon::Mode)sipConvertToEnum(sipPy, sipType_QIcon_Mode);

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

    sipCpp->mode = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QIconEngine_ScaledPixmapArgument_pixmap(void *, PyObject *, PyObject *);}
static PyObject *varget_QIconEngine_ScaledPixmapArgument_pixmap(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QPixmap*sipVal;
     ::QIconEngine::ScaledPixmapArgument *sipCpp = reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -11);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->pixmap;

    sipPy = sipConvertFromType(sipVal, sipType_QPixmap, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -10, sipPySelf);
        sipKeepReference(sipPySelf, -11, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QIconEngine_ScaledPixmapArgument_pixmap(void *, PyObject *, PyObject *);}
static int varset_QIconEngine_ScaledPixmapArgument_pixmap(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QPixmap*sipVal;
     ::QIconEngine::ScaledPixmapArgument *sipCpp = reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipSelf);

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::QPixmap *>(sipForceConvertToType(sipPy, sipType_QPixmap, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->pixmap = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QIconEngine_ScaledPixmapArgument_scale(void *, PyObject *, PyObject *);}
static PyObject *varget_QIconEngine_ScaledPixmapArgument_scale(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QIconEngine::ScaledPixmapArgument *sipCpp = reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipSelf);

    sipVal = sipCpp->scale;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QIconEngine_ScaledPixmapArgument_scale(void *, PyObject *, PyObject *);}
static int varset_QIconEngine_ScaledPixmapArgument_scale(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QIconEngine::ScaledPixmapArgument *sipCpp = reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

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

    sipCpp->scale = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QIconEngine_ScaledPixmapArgument_size(void *, PyObject *, PyObject *);}
static PyObject *varget_QIconEngine_ScaledPixmapArgument_size(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QSize*sipVal;
     ::QIconEngine::ScaledPixmapArgument *sipCpp = reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -12);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->size;

    sipPy = sipConvertFromType(sipVal, sipType_QSize, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -8, sipPySelf);
        sipKeepReference(sipPySelf, -12, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QIconEngine_ScaledPixmapArgument_size(void *, PyObject *, PyObject *);}
static int varset_QIconEngine_ScaledPixmapArgument_size(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QSize*sipVal;
     ::QIconEngine::ScaledPixmapArgument *sipCpp = reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipSelf);

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::QSize *>(sipForceConvertToType(sipPy, sipType_QSize, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->size = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QIconEngine_ScaledPixmapArgument_state(void *, PyObject *, PyObject *);}
static PyObject *varget_QIconEngine_ScaledPixmapArgument_state(void *sipSelf, PyObject *, PyObject *)
{
     ::QIcon::State sipVal;
     ::QIconEngine::ScaledPixmapArgument *sipCpp = reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipSelf);

    sipVal = sipCpp->state;

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


extern "C" {static int varset_QIconEngine_ScaledPixmapArgument_state(void *, PyObject *, PyObject *);}
static int varset_QIconEngine_ScaledPixmapArgument_state(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QIcon::State sipVal;
     ::QIconEngine::ScaledPixmapArgument *sipCpp = reinterpret_cast< ::QIconEngine::ScaledPixmapArgument *>(sipSelf);

    sipVal = ( ::QIcon::State)sipConvertToEnum(sipPy, sipType_QIcon_State);

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

    sipCpp->state = sipVal;

    return 0;
}

sipVariableDef variables_QIconEngine_ScaledPixmapArgument[] = {
    {InstanceVariable, sipName_mode, (PyMethodDef *)varget_QIconEngine_ScaledPixmapArgument_mode, (PyMethodDef *)varset_QIconEngine_ScaledPixmapArgument_mode, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_pixmap, (PyMethodDef *)varget_QIconEngine_ScaledPixmapArgument_pixmap, (PyMethodDef *)varset_QIconEngine_ScaledPixmapArgument_pixmap, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_scale, (PyMethodDef *)varget_QIconEngine_ScaledPixmapArgument_scale, (PyMethodDef *)varset_QIconEngine_ScaledPixmapArgument_scale, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_size, (PyMethodDef *)varget_QIconEngine_ScaledPixmapArgument_size, (PyMethodDef *)varset_QIconEngine_ScaledPixmapArgument_size, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_state, (PyMethodDef *)varget_QIconEngine_ScaledPixmapArgument_state, (PyMethodDef *)varset_QIconEngine_ScaledPixmapArgument_state, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QIconEngine_ScaledPixmapArgument, "\1QIconEngine.ScaledPixmapArgument()\n"
"QIconEngine.ScaledPixmapArgument(QIconEngine.ScaledPixmapArgument)");


sipClassTypeDef sipTypeDef_QtGui_QIconEngine_ScaledPixmapArgument = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QIconEngine__ScaledPixmapArgument,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_ScaledPixmapArgument,
        {99, 255, 0},
        0, SIP_NULLPTR,
        5, variables_QIconEngine_ScaledPixmapArgument,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QIconEngine_ScaledPixmapArgument,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QIconEngine_ScaledPixmapArgument,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QIconEngine_ScaledPixmapArgument,
    assign_QIconEngine_ScaledPixmapArgument,
    array_QIconEngine_ScaledPixmapArgument,
    copy_QIconEngine_ScaledPixmapArgument,
    release_QIconEngine_ScaledPixmapArgument,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QIconEngine_ScaledPixmapArgument,
    sizeof ( ::QIconEngine::ScaledPixmapArgument),
};
