/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.1
 *
 *     Copyright: (c) 2020 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 *array_wxVisualAttributes(Py_ssize_t);}
static void *array_wxVisualAttributes(Py_ssize_t sipNrElem)
{
    return new ::wxVisualAttributes[sipNrElem];
}


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


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


extern "C" {static void *copy_wxVisualAttributes(const void *, Py_ssize_t);}
static void *copy_wxVisualAttributes(const void *sipSrc, Py_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 *sipPySelf, 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 *sipPySelf, 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 *sipPySelf, 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,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxVisualAttributes,
    assign_wxVisualAttributes,
    array_wxVisualAttributes,
    copy_wxVisualAttributes,
    release_wxVisualAttributes,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxVisualAttributes,
    sizeof (::wxVisualAttributes),
};
