/*
 * 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/renderer.h>
        #include <wx/colour.h>
        #include <wx/bitmap.h>
        #include <wx/font.h>


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxHeaderButtonParams();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            return sipCpp;
        }
    }

    {
        const ::wxHeaderButtonParams* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_wxHeaderButtonParams_m_arrowColour(void *, PyObject *, PyObject *);}
static PyObject *varget_wxHeaderButtonParams_m_arrowColour(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    ::wxColour*sipVal;
    ::wxHeaderButtonParams *sipCpp = reinterpret_cast< ::wxHeaderButtonParams *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -46);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->m_arrowColour;

    sipPy = sipConvertFromType(sipVal, sipType_wxColour, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -45, sipPySelf);
        sipKeepReference(sipPySelf, -46, sipPy);
    }

    return sipPy;
}


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

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

    if (sipIsErr)
        return -1;

    sipCpp->m_arrowColour = *sipVal;

    sipReleaseType(sipVal, sipType_wxColour, sipValState);

    return 0;
}


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

    sipVal = sipCpp->m_labelAlignment;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->m_labelAlignment = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxHeaderButtonParams_m_labelBitmap(void *, PyObject *, PyObject *);}
static PyObject *varget_wxHeaderButtonParams_m_labelBitmap(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    ::wxBitmap*sipVal;
    ::wxHeaderButtonParams *sipCpp = reinterpret_cast< ::wxHeaderButtonParams *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -48);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->m_labelBitmap;

    sipPy = sipConvertFromType(sipVal, sipType_wxBitmap, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -47, sipPySelf);
        sipKeepReference(sipPySelf, -48, sipPy);
    }

    return sipPy;
}


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

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::wxBitmap *>(sipForceConvertToType(sipPy, sipType_wxBitmap, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->m_labelBitmap = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxHeaderButtonParams_m_labelColour(void *, PyObject *, PyObject *);}
static PyObject *varget_wxHeaderButtonParams_m_labelColour(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    ::wxColour*sipVal;
    ::wxHeaderButtonParams *sipCpp = reinterpret_cast< ::wxHeaderButtonParams *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -50);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->m_labelColour;

    sipPy = sipConvertFromType(sipVal, sipType_wxColour, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -49, sipPySelf);
        sipKeepReference(sipPySelf, -50, sipPy);
    }

    return sipPy;
}


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

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

    if (sipIsErr)
        return -1;

    sipCpp->m_labelColour = *sipVal;

    sipReleaseType(sipVal, sipType_wxColour, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_wxHeaderButtonParams_m_labelFont(void *, PyObject *, PyObject *);}
static PyObject *varget_wxHeaderButtonParams_m_labelFont(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    ::wxFont*sipVal;
    ::wxHeaderButtonParams *sipCpp = reinterpret_cast< ::wxHeaderButtonParams *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -52);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->m_labelFont;

    sipPy = sipConvertFromType(sipVal, sipType_wxFont, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -51, sipPySelf);
        sipKeepReference(sipPySelf, -52, sipPy);
    }

    return sipPy;
}


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

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::wxFont *>(sipForceConvertToType(sipPy, sipType_wxFont, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->m_labelFont = *sipVal;

    return 0;
}


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

    sipVal = &sipCpp->m_labelText;

    return sipConvertFromType(sipVal, sipType_wxString, SIP_NULLPTR);
}


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

    sipReleaseType(sipVal, sipType_wxString, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_wxHeaderButtonParams_m_selectionColour(void *, PyObject *, PyObject *);}
static PyObject *varget_wxHeaderButtonParams_m_selectionColour(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    ::wxColour*sipVal;
    ::wxHeaderButtonParams *sipCpp = reinterpret_cast< ::wxHeaderButtonParams *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -54);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->m_selectionColour;

    sipPy = sipConvertFromType(sipVal, sipType_wxColour, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -53, sipPySelf);
        sipKeepReference(sipPySelf, -54, sipPy);
    }

    return sipPy;
}


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

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

    if (sipIsErr)
        return -1;

    sipCpp->m_selectionColour = *sipVal;

    sipReleaseType(sipVal, sipType_wxColour, sipValState);

    return 0;
}

sipVariableDef variables_wxHeaderButtonParams[] = {
    {InstanceVariable, sipName_m_arrowColour, (PyMethodDef *)varget_wxHeaderButtonParams_m_arrowColour, (PyMethodDef *)varset_wxHeaderButtonParams_m_arrowColour, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_m_labelAlignment, (PyMethodDef *)varget_wxHeaderButtonParams_m_labelAlignment, (PyMethodDef *)varset_wxHeaderButtonParams_m_labelAlignment, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_m_labelBitmap, (PyMethodDef *)varget_wxHeaderButtonParams_m_labelBitmap, (PyMethodDef *)varset_wxHeaderButtonParams_m_labelBitmap, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_m_labelColour, (PyMethodDef *)varget_wxHeaderButtonParams_m_labelColour, (PyMethodDef *)varset_wxHeaderButtonParams_m_labelColour, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_m_labelFont, (PyMethodDef *)varget_wxHeaderButtonParams_m_labelFont, (PyMethodDef *)varset_wxHeaderButtonParams_m_labelFont, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_m_labelText, (PyMethodDef *)varget_wxHeaderButtonParams_m_labelText, (PyMethodDef *)varset_wxHeaderButtonParams_m_labelText, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_m_selectionColour, (PyMethodDef *)varget_wxHeaderButtonParams_m_selectionColour, (PyMethodDef *)varset_wxHeaderButtonParams_m_selectionColour, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxHeaderButtonParams, "HeaderButtonParams() -> None\n"
"\n"
"This struct can optionally be used with\n"
"wxRendererNative::DrawHeaderButton() to specify custom values used to\n"
"draw the text or bitmap label.");


sipClassTypeDef sipTypeDef__core_wxHeaderButtonParams = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxHeaderButtonParams,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_HeaderButtonParams,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        7, variables_wxHeaderButtonParams,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxHeaderButtonParams,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxHeaderButtonParams,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxHeaderButtonParams,
    assign_wxHeaderButtonParams,
    array_wxHeaderButtonParams,
    copy_wxHeaderButtonParams,
    release_wxHeaderButtonParams,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxHeaderButtonParams,
    sizeof (::wxHeaderButtonParams),
};
