/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.8.5
 *
 *     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>
        #include <wx/window.h>


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::wxAuiNotebookPage* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_wxAuiNotebookPage_active(void *, PyObject *, PyObject *);}
static PyObject *varget_wxAuiNotebookPage_active(void *sipSelf, PyObject *, PyObject *)
{
    bool sipVal;
    ::wxAuiNotebookPage *sipCpp = reinterpret_cast<::wxAuiNotebookPage *>(sipSelf);

    sipVal = sipCpp->active;

    return PyBool_FromLong(sipVal);
}


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

    sipVal = sipConvertToBool(sipPy);

    if (sipVal < 0)
        return -1;

    sipCpp->active = static_cast<bool>(sipVal);

    return 0;
}


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

    sipPy = sipGetReference(sipPySelf, -4);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->bitmap;

    sipPy = sipConvertFromType(sipVal, sipType_wxBitmapBundle, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -24, sipPySelf);
        sipKeepReference(sipPySelf, -4, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_wxAuiNotebookPage_bitmap(void *, PyObject *, PyObject *);}
static int varset_wxAuiNotebookPage_bitmap(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::wxBitmapBundle*sipVal;
    ::wxAuiNotebookPage *sipCpp = reinterpret_cast<::wxAuiNotebookPage *>(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_wxAuiNotebookPage_caption(void *, PyObject *, PyObject *);}
static PyObject *varget_wxAuiNotebookPage_caption(void *sipSelf, PyObject *, PyObject *)
{
    ::wxString*sipVal;
    ::wxAuiNotebookPage *sipCpp = reinterpret_cast<::wxAuiNotebookPage *>(sipSelf);

    sipVal = &sipCpp->caption;

    return sipConvertFromType(sipVal, sipType_wxString, SIP_NULLPTR);
}


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

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

    if (sipIsErr)
        return -1;

    sipCpp->caption = *sipVal;

    sipReleaseType(sipVal, sipType_wxString, sipValState);

    return 0;
}


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

    sipPy = sipGetReference(sipPySelf, -5);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->rect;

    sipPy = sipConvertFromType(sipVal, sipType_wxRect, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -25, sipPySelf);
        sipKeepReference(sipPySelf, -5, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_wxAuiNotebookPage_rect(void *, PyObject *, PyObject *);}
static int varset_wxAuiNotebookPage_rect(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::wxRect*sipVal;
    ::wxAuiNotebookPage *sipCpp = reinterpret_cast<::wxAuiNotebookPage *>(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;
}


extern "C" {static PyObject *varget_wxAuiNotebookPage_tooltip(void *, PyObject *, PyObject *);}
static PyObject *varget_wxAuiNotebookPage_tooltip(void *sipSelf, PyObject *, PyObject *)
{
    ::wxString*sipVal;
    ::wxAuiNotebookPage *sipCpp = reinterpret_cast<::wxAuiNotebookPage *>(sipSelf);

    sipVal = &sipCpp->tooltip;

    return sipConvertFromType(sipVal, sipType_wxString, SIP_NULLPTR);
}


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

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

    if (sipIsErr)
        return -1;

    sipCpp->tooltip = *sipVal;

    sipReleaseType(sipVal, sipType_wxString, sipValState);

    return 0;
}


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

    sipVal = sipCpp->window;

    return sipConvertFromType(sipVal, sipType_wxWindow, SIP_NULLPTR);
}


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

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

    if (sipIsErr)
        return -1;

    sipCpp->window = sipVal;

    return 0;
}

sipVariableDef variables_wxAuiNotebookPage[] = {
    {InstanceVariable, sipName_active, (PyMethodDef *)varget_wxAuiNotebookPage_active, (PyMethodDef *)varset_wxAuiNotebookPage_active, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_bitmap, (PyMethodDef *)varget_wxAuiNotebookPage_bitmap, (PyMethodDef *)varset_wxAuiNotebookPage_bitmap, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_caption, (PyMethodDef *)varget_wxAuiNotebookPage_caption, (PyMethodDef *)varset_wxAuiNotebookPage_caption, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_rect, (PyMethodDef *)varget_wxAuiNotebookPage_rect, (PyMethodDef *)varset_wxAuiNotebookPage_rect, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_tooltip, (PyMethodDef *)varget_wxAuiNotebookPage_tooltip, (PyMethodDef *)varset_wxAuiNotebookPage_tooltip, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_window, (PyMethodDef *)varget_wxAuiNotebookPage_window, (PyMethodDef *)varset_wxAuiNotebookPage_window, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxAuiNotebookPage, "A simple class which holds information about the notebook's pages and\n"
"their state.");


sipClassTypeDef sipTypeDef__aui_wxAuiNotebookPage = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxAuiNotebookPage,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_AuiNotebookPage,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        6, variables_wxAuiNotebookPage,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxAuiNotebookPage,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxAuiNotebookPage,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxAuiNotebookPage,
    assign_wxAuiNotebookPage,
    array_wxAuiNotebookPage,
    copy_wxAuiNotebookPage,
    release_wxAuiNotebookPage,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
};
