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

#include "sipAPI_core.h"

        #include <wx/window.h>

        #include <wx/colour.h>
        #include <wx/font.h>


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::wxVisualAttributes* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_wxVisualAttributes_colBg(void *, PyObject *, PyObject *);}
static PyObject *varget_wxVisualAttributes_colBg(void *sipSelf, PyObject *, PyObject *)
{
    PyObject *sipPy;
     ::wxVisualAttributes *sipCpp = reinterpret_cast< ::wxVisualAttributes *>(sipSelf);

        wxColour* clr = new wxColour(sipCpp->colBg);
        sipPy = wxPyConstructObject((void*)clr, "wxColour", true);

    return sipPy;
}


extern "C" {static PyObject *varget_wxVisualAttributes_colFg(void *, PyObject *, PyObject *);}
static PyObject *varget_wxVisualAttributes_colFg(void *sipSelf, PyObject *, PyObject *)
{
    PyObject *sipPy;
     ::wxVisualAttributes *sipCpp = reinterpret_cast< ::wxVisualAttributes *>(sipSelf);

        wxColour* clr = new wxColour(sipCpp->colFg);
        sipPy = wxPyConstructObject((void*)clr, "wxColour", true);

    return sipPy;
}


extern "C" {static PyObject *varget_wxVisualAttributes_font(void *, PyObject *, PyObject *);}
static PyObject *varget_wxVisualAttributes_font(void *sipSelf, PyObject *, PyObject *)
{
    PyObject *sipPy;
     ::wxVisualAttributes *sipCpp = reinterpret_cast< ::wxVisualAttributes *>(sipSelf);

        wxFont* font = new wxFont(sipCpp->font);
        sipPy = wxPyConstructObject((void*)font, "wxFont", true);

    return sipPy;
}

sipVariableDef variables_wxVisualAttributes[] = {
    {InstanceVariable, sipName_colBg, (PyMethodDef *)varget_wxVisualAttributes_colBg, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_colFg, (PyMethodDef *)varget_wxVisualAttributes_colFg, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_font, (PyMethodDef *)varget_wxVisualAttributes_font, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxVisualAttributes, "Struct containing all the visual attributes of a control.");


sipClassTypeDef sipTypeDef__core_wxVisualAttributes = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxVisualAttributes,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_VisualAttributes,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        3, variables_wxVisualAttributes,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxVisualAttributes,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxVisualAttributes,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxVisualAttributes,
    assign_wxVisualAttributes,
    array_wxVisualAttributes,
    copy_wxVisualAttributes,
    release_wxVisualAttributes,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
