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

#include "sipAPI_aui.h"
        #include <wx/aui/auibook.h>
        #include <wx/bmpbndl.h>
        #include <wx/gdicmn.h>


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::wxAuiTabContainerButton* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_wxAuiTabContainerButton_bitmap(void *, PyObject *, PyObject *);}
static PyObject *varget_wxAuiTabContainerButton_bitmap(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    ::wxBitmapBundle*sipVal;
    ::wxAuiTabContainerButton *sipCpp = reinterpret_cast< ::wxAuiTabContainerButton *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -1);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->bitmap;

    sipPy = sipConvertFromType(sipVal, sipType_wxBitmapBundle, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -21, sipPySelf);
        sipKeepReference(sipPySelf, -1, sipPy);
    }

    return sipPy;
}


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

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::wxBitmapBundle *>(sipForceConvertToType(sipPy, sipType_wxBitmapBundle, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->bitmap = *sipVal;

    sipReleaseType(sipVal, sipType_wxBitmapBundle, sipValState);

    return 0;
}


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

    sipVal = sipCpp->curState;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->curState = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxAuiTabContainerButton_disBitmap(void *, PyObject *, PyObject *);}
static PyObject *varget_wxAuiTabContainerButton_disBitmap(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    ::wxBitmapBundle*sipVal;
    ::wxAuiTabContainerButton *sipCpp = reinterpret_cast< ::wxAuiTabContainerButton *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -2);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->disBitmap;

    sipPy = sipConvertFromType(sipVal, sipType_wxBitmapBundle, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -22, sipPySelf);
        sipKeepReference(sipPySelf, -2, sipPy);
    }

    return sipPy;
}


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

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::wxBitmapBundle *>(sipForceConvertToType(sipPy, sipType_wxBitmapBundle, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->disBitmap = *sipVal;

    sipReleaseType(sipVal, sipType_wxBitmapBundle, sipValState);

    return 0;
}


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

    sipVal = sipCpp->id;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->id = sipVal;

    return 0;
}


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

    sipVal = sipCpp->location;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->location = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxAuiTabContainerButton_rect(void *, PyObject *, PyObject *);}
static PyObject *varget_wxAuiTabContainerButton_rect(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    ::wxRect*sipVal;
    ::wxAuiTabContainerButton *sipCpp = reinterpret_cast< ::wxAuiTabContainerButton *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -3);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->rect;

    sipPy = sipConvertFromType(sipVal, sipType_wxRect, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -23, sipPySelf);
        sipKeepReference(sipPySelf, -3, sipPy);
    }

    return sipPy;
}


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

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::wxRect *>(sipForceConvertToType(sipPy, sipType_wxRect, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->rect = *sipVal;

    sipReleaseType(sipVal, sipType_wxRect, sipValState);

    return 0;
}

sipVariableDef variables_wxAuiTabContainerButton[] = {
    {InstanceVariable, sipName_bitmap, (PyMethodDef *)varget_wxAuiTabContainerButton_bitmap, (PyMethodDef *)varset_wxAuiTabContainerButton_bitmap, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_curState, (PyMethodDef *)varget_wxAuiTabContainerButton_curState, (PyMethodDef *)varset_wxAuiTabContainerButton_curState, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_disBitmap, (PyMethodDef *)varget_wxAuiTabContainerButton_disBitmap, (PyMethodDef *)varset_wxAuiTabContainerButton_disBitmap, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_id, (PyMethodDef *)varget_wxAuiTabContainerButton_id, (PyMethodDef *)varset_wxAuiTabContainerButton_id, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_location, (PyMethodDef *)varget_wxAuiTabContainerButton_location, (PyMethodDef *)varset_wxAuiTabContainerButton_location, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_rect, (PyMethodDef *)varget_wxAuiTabContainerButton_rect, (PyMethodDef *)varset_wxAuiTabContainerButton_rect, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxAuiTabContainerButton, "A simple class which holds information about wxAuiNotebook tab buttons\n"
"and their state.");


sipClassTypeDef sipTypeDef__aui_wxAuiTabContainerButton = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxAuiTabContainerButton,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_AuiTabContainerButton,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        6, variables_wxAuiTabContainerButton,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxAuiTabContainerButton,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxAuiTabContainerButton,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxAuiTabContainerButton,
    assign_wxAuiTabContainerButton,
    array_wxAuiTabContainerButton,
    copy_wxAuiTabContainerButton,
    release_wxAuiTabContainerButton,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxAuiTabContainerButton,
    sizeof (::wxAuiTabContainerButton),
};
