/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.16
 *
 *     Copyright: (c) 2018 by Total Control Software
 *     License:   wxWindows License
 */

#include "sipAPI_propgrid.h"

        #include <wx/propgrid/property.h>

        #include <wx/propgrid/propgrid.h>


/* Call the instance's destructor. */
extern "C" {static void release_wxPGPaintData(void *, int);}
static void release_wxPGPaintData(void *sipCppV, int)
{
    Py_BEGIN_ALLOW_THREADS

    delete reinterpret_cast< ::wxPGPaintData *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void assign_wxPGPaintData(void *, SIP_SSIZE_T, void *);}
static void assign_wxPGPaintData(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxPGPaintData *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxPGPaintData *>(sipSrc);
}


extern "C" {static void *array_wxPGPaintData(SIP_SSIZE_T);}
static void *array_wxPGPaintData(SIP_SSIZE_T sipNrElem)
{
    return new  ::wxPGPaintData[sipNrElem];
}


extern "C" {static void *copy_wxPGPaintData(const void *, SIP_SSIZE_T);}
static void *copy_wxPGPaintData(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new  ::wxPGPaintData(reinterpret_cast<const  ::wxPGPaintData *>(sipSrc)[sipSrcIdx]);
}


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::wxPGPaintData* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxPGPaintData, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxPGPaintData(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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

    sipVal = sipCpp->m_choiceItem;

    return SIPLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->m_choiceItem = sipVal;

    return 0;
}


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

    sipVal = sipCpp->m_drawnHeight;

    return SIPLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->m_drawnHeight = sipVal;

    return 0;
}


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

    sipVal = sipCpp->m_drawnWidth;

    return SIPLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->m_drawnWidth = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxPGPaintData_m_parent(void *, PyObject *, PyObject *);}
static PyObject *varget_wxPGPaintData_m_parent(void *sipSelf, PyObject *, PyObject *)
{
    const  ::wxPropertyGrid*sipVal;
     ::wxPGPaintData *sipCpp = reinterpret_cast< ::wxPGPaintData *>(sipSelf);

    sipVal = sipCpp->m_parent;

    return sipConvertFromType(const_cast< ::wxPropertyGrid *>(sipVal), sipType_wxPropertyGrid, SIP_NULLPTR);
}


extern "C" {static int varset_wxPGPaintData_m_parent(void *, PyObject *, PyObject *);}
static int varset_wxPGPaintData_m_parent(void *sipSelf, PyObject *sipPy, PyObject *)
{
    const  ::wxPropertyGrid*sipVal;
     ::wxPGPaintData *sipCpp = reinterpret_cast< ::wxPGPaintData *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::wxPropertyGrid *>(sipForceConvertToType(sipPy, sipType_wxPropertyGrid, SIP_NULLPTR, 0, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->m_parent = sipVal;

    return 0;
}

sipVariableDef variables_wxPGPaintData[] = {
    {InstanceVariable, sipName_m_choiceItem, (PyMethodDef *)varget_wxPGPaintData_m_choiceItem, (PyMethodDef *)varset_wxPGPaintData_m_choiceItem, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_m_drawnHeight, (PyMethodDef *)varget_wxPGPaintData_m_drawnHeight, (PyMethodDef *)varset_wxPGPaintData_m_drawnHeight, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_m_drawnWidth, (PyMethodDef *)varget_wxPGPaintData_m_drawnWidth, (PyMethodDef *)varset_wxPGPaintData_m_drawnWidth, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_m_parent, (PyMethodDef *)varget_wxPGPaintData_m_parent, (PyMethodDef *)varset_wxPGPaintData_m_parent, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxPGPaintData, "Contains information relayed to property's OnCustomPaint.");


sipClassTypeDef sipTypeDef__propgrid_wxPGPaintData = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxPGPaintData,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_PGPaintData,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        4, variables_wxPGPaintData,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxPGPaintData,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxPGPaintData,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxPGPaintData,
    assign_wxPGPaintData,
    array_wxPGPaintData,
    copy_wxPGPaintData,
    release_wxPGPaintData,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
