/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.16
 *
 *     Copyright: (c) 2018 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 assign_wxHeaderButtonParams(void *, SIP_SSIZE_T, void *);}
static void assign_wxHeaderButtonParams(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxHeaderButtonParams *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxHeaderButtonParams *>(sipSrc);
}


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


extern "C" {static void *copy_wxHeaderButtonParams(const void *, SIP_SSIZE_T);}
static void *copy_wxHeaderButtonParams(const void *sipSrc, SIP_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 *, PyObject *)
{
     ::wxColour*sipVal;
     ::wxHeaderButtonParams *sipCpp = reinterpret_cast< ::wxHeaderButtonParams *>(sipSelf);

    sipVal = &sipCpp->m_arrowColour;

    return sipConvertFromType(sipVal, sipType_wxColour, SIP_NULLPTR);
}


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 sipValState;
    int sipIsErr = 0;

    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 SIPLong_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 *, PyObject *)
{
     ::wxBitmap*sipVal;
     ::wxHeaderButtonParams *sipCpp = reinterpret_cast< ::wxHeaderButtonParams *>(sipSelf);

    sipVal = &sipCpp->m_labelBitmap;

    return sipConvertFromType(sipVal, sipType_wxBitmap, SIP_NULLPTR);
}


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 *, PyObject *)
{
     ::wxColour*sipVal;
     ::wxHeaderButtonParams *sipCpp = reinterpret_cast< ::wxHeaderButtonParams *>(sipSelf);

    sipVal = &sipCpp->m_labelColour;

    return sipConvertFromType(sipVal, sipType_wxColour, SIP_NULLPTR);
}


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 sipValState;
    int sipIsErr = 0;

    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 *, PyObject *)
{
     ::wxFont*sipVal;
     ::wxHeaderButtonParams *sipCpp = reinterpret_cast< ::wxHeaderButtonParams *>(sipSelf);

    sipVal = &sipCpp->m_labelFont;

    return sipConvertFromType(sipVal, sipType_wxFont, SIP_NULLPTR);
}


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 sipValState;
    int sipIsErr = 0;

    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 *, PyObject *)
{
     ::wxColour*sipVal;
     ::wxHeaderButtonParams *sipCpp = reinterpret_cast< ::wxHeaderButtonParams *>(sipSelf);

    sipVal = &sipCpp->m_selectionColour;

    return sipConvertFromType(sipVal, sipType_wxColour, SIP_NULLPTR);
}


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 sipValState;
    int sipIsErr = 0;

    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()\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,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxHeaderButtonParams,
    assign_wxHeaderButtonParams,
    array_wxHeaderButtonParams,
    copy_wxHeaderButtonParams,
    release_wxHeaderButtonParams,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
