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

        #include <wx/window.h>


PyDoc_STRVAR(doc_wxPGWindowList_SetSecondary, "SetSecondary(secondary)");

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

    {
         ::wxWindow* secondary;
         ::wxPGWindowList *sipCpp;

        static const char *sipKwdList[] = {
            sipName_secondary,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxPGWindowList, &sipCpp, sipType_wxWindow, &secondary))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetSecondary(secondary);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PGWindowList, sipName_SetSecondary, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxPGWindowList();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            return sipCpp;
        }
    }

    {
         ::wxWindow* a;

        static const char *sipKwdList[] = {
            sipName_a,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J8", sipType_wxWindow, &a))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxPGWindowList(a);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            return sipCpp;
        }
    }

    {
         ::wxWindow* a;
         ::wxWindow* b;

        static const char *sipKwdList[] = {
            sipName_a,
            sipName_b,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J8J8", sipType_wxWindow, &a, sipType_wxWindow, &b))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxPGWindowList(a,b);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            return sipCpp;
        }
    }

    {
        const  ::wxPGWindowList* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxPGWindowList[] = {
    {SIP_MLNAME_CAST(sipName_SetSecondary), SIP_MLMETH_CAST(meth_wxPGWindowList_SetSecondary), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGWindowList_SetSecondary)}
};


extern "C" {static PyObject *varget_wxPGWindowList_m_primary(void *, PyObject *, PyObject *);}
static PyObject *varget_wxPGWindowList_m_primary(void *sipSelf, PyObject *, PyObject *)
{
     ::wxWindow*sipVal;
     ::wxPGWindowList *sipCpp = reinterpret_cast< ::wxPGWindowList *>(sipSelf);

    sipVal = sipCpp->m_primary;

    return sipConvertFromType(sipVal, sipType_wxWindow, SIP_NULLPTR);
}


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

    int sipIsErr = 0;

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

    if (sipIsErr)
        return -1;

    sipCpp->m_primary = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxPGWindowList_m_secondary(void *, PyObject *, PyObject *);}
static PyObject *varget_wxPGWindowList_m_secondary(void *sipSelf, PyObject *, PyObject *)
{
     ::wxWindow*sipVal;
     ::wxPGWindowList *sipCpp = reinterpret_cast< ::wxPGWindowList *>(sipSelf);

    sipVal = sipCpp->m_secondary;

    return sipConvertFromType(sipVal, sipType_wxWindow, SIP_NULLPTR);
}


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

    int sipIsErr = 0;

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

    if (sipIsErr)
        return -1;

    sipCpp->m_secondary = sipVal;

    return 0;
}

sipVariableDef variables_wxPGWindowList[] = {
    {InstanceVariable, sipName_m_primary, (PyMethodDef *)varget_wxPGWindowList_m_primary, (PyMethodDef *)varset_wxPGWindowList_m_primary, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_m_secondary, (PyMethodDef *)varget_wxPGWindowList_m_secondary, (PyMethodDef *)varset_wxPGWindowList_m_secondary, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxPGWindowList, "PGWindowList()\n"
"PGWindowList(a)\n"
"PGWindowList(a, b)\n"
"\n"
"Contains a list of editor windows returned by CreateControls.");


sipClassTypeDef sipTypeDef__propgrid_wxPGWindowList = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxPGWindowList,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_PGWindowList,
        {0, 0, 1},
        1, methods_wxPGWindowList,
        0, SIP_NULLPTR,
        2, variables_wxPGWindowList,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxPGWindowList,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxPGWindowList,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxPGWindowList,
    assign_wxPGWindowList,
    array_wxPGWindowList,
    copy_wxPGWindowList,
    release_wxPGWindowList,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
