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

#include "sipAPI_dataview.h"
        #include <wx/dataview.h>



class sipwxDataViewValueAdjuster : public ::wxDataViewValueAdjuster
{
public:
    sipwxDataViewValueAdjuster();
    sipwxDataViewValueAdjuster(const ::wxDataViewValueAdjuster&);
    virtual ~sipwxDataViewValueAdjuster();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    ::wxDVCVariant MakeHighlighted(const ::wxDVCVariant&) const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipwxDataViewValueAdjuster(const sipwxDataViewValueAdjuster &);
    sipwxDataViewValueAdjuster &operator = (const sipwxDataViewValueAdjuster &);

    char sipPyMethods[1];
};

sipwxDataViewValueAdjuster::sipwxDataViewValueAdjuster(): ::wxDataViewValueAdjuster(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxDataViewValueAdjuster::sipwxDataViewValueAdjuster(const ::wxDataViewValueAdjuster& a0): ::wxDataViewValueAdjuster(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxDataViewValueAdjuster::~sipwxDataViewValueAdjuster()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

::wxDVCVariant sipwxDataViewValueAdjuster::MakeHighlighted(const ::wxDVCVariant& value) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[0]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_MakeHighlighted);

    if (!sipMeth)
        return ::wxDataViewValueAdjuster::MakeHighlighted(value);

    extern ::wxDVCVariant sipVH__dataview_61(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxDVCVariant&);

    return sipVH__dataview_61(sipGILState, 0, sipPySelf, sipMeth, value);
}


PyDoc_STRVAR(doc_wxDataViewValueAdjuster_MakeHighlighted, "MakeHighlighted(value) -> DVCVariant\n"
"\n"
"Change value for rendering when highlighted.");

extern "C" {static PyObject *meth_wxDataViewValueAdjuster_MakeHighlighted(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxDataViewValueAdjuster_MakeHighlighted(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::wxDVCVariant* value;
        int valueState = 0;
        const ::wxDataViewValueAdjuster *sipCpp;

        static const char *sipKwdList[] = {
            sipName_value,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxDataViewValueAdjuster, &sipCpp, sipType_wxDVCVariant, &value, &valueState))
        {
            ::wxDVCVariant*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxDVCVariant((sipSelfWasArg ? sipCpp->::wxDataViewValueAdjuster::MakeHighlighted(*value) : sipCpp->MakeHighlighted(*value)));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxDVCVariant *>(value), sipType_wxDVCVariant, valueState);

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromNewType(sipRes, sipType_wxDVCVariant, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewValueAdjuster, sipName_MakeHighlighted, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxDataViewValueAdjuster *>(sipCppV);
    else
        delete reinterpret_cast< ::wxDataViewValueAdjuster *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


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


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


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


extern "C" {static void dealloc_wxDataViewValueAdjuster(sipSimpleWrapper *);}
static void dealloc_wxDataViewValueAdjuster(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipwxDataViewValueAdjuster *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_wxDataViewValueAdjuster(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_wxDataViewValueAdjuster(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_wxDataViewValueAdjuster(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipwxDataViewValueAdjuster *sipCpp = SIP_NULLPTR;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::wxDataViewValueAdjuster* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxDataViewValueAdjuster[] = {
    {sipName_MakeHighlighted, SIP_MLMETH_CAST(meth_wxDataViewValueAdjuster_MakeHighlighted), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewValueAdjuster_MakeHighlighted}
};

PyDoc_STRVAR(doc_wxDataViewValueAdjuster, "This class can be used with wxDataViewRenderer::SetValueAdjuster() to\n"
"customize rendering of model values with standard renderers.");


sipClassTypeDef sipTypeDef__dataview_wxDataViewValueAdjuster = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxDataViewValueAdjuster,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_DataViewValueAdjuster,
        {0, 0, 1},
        1, methods_wxDataViewValueAdjuster,
        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_wxDataViewValueAdjuster,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxDataViewValueAdjuster,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxDataViewValueAdjuster,
    assign_wxDataViewValueAdjuster,
    array_wxDataViewValueAdjuster,
    copy_wxDataViewValueAdjuster,
    release_wxDataViewValueAdjuster,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxDataViewValueAdjuster,
    sizeof (::wxDataViewValueAdjuster),
};
