/*
 * 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/graphics.h>
        #include <wx/graphics.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_wxGraphicsBrush(void *, const sipTypeDef *);}
static void *cast_wxGraphicsBrush(void *sipCppV, const sipTypeDef *targetType)
{
    ::wxGraphicsBrush *sipCpp = reinterpret_cast< ::wxGraphicsBrush *>(sipCppV);

    if (targetType == sipType_wxGraphicsBrush)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_wxGraphicsObject)->ctd_cast(static_cast< ::wxGraphicsObject *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


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

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

    Py_END_ALLOW_THREADS
}


extern "C" {static void *array_wxGraphicsBrush(Py_ssize_t);}
static void *array_wxGraphicsBrush(Py_ssize_t sipNrElem)
{
    return new ::wxGraphicsBrush[sipNrElem];
}


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::wxGraphicsBrush* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_wxGraphicsBrush[] = {{246, 255, 1}};

PyDoc_STRVAR(doc_wxGraphicsBrush, "A wxGraphicsBrush is a native representation of a brush.");


sipClassTypeDef sipTypeDef__core_wxGraphicsBrush = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxGraphicsBrush,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_GraphicsBrush,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxGraphicsBrush,
    -1,
    -1,
    supers_wxGraphicsBrush,
    SIP_NULLPTR,
    init_type_wxGraphicsBrush,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxGraphicsBrush,
    assign_wxGraphicsBrush,
    array_wxGraphicsBrush,
    copy_wxGraphicsBrush,
    release_wxGraphicsBrush,
    cast_wxGraphicsBrush,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxGraphicsBrush,
    sizeof (::wxGraphicsBrush),
};
