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

#include "sipAPI_html.h"

        #include <wx/html/htmlcell.h>

        #include <wx/colour.h>


class sipwxHtmlRenderingStyle : public  ::wxHtmlRenderingStyle
{
public:
    sipwxHtmlRenderingStyle();
    sipwxHtmlRenderingStyle(const  ::wxHtmlRenderingStyle&);
    virtual ~sipwxHtmlRenderingStyle();

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

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipwxHtmlRenderingStyle::sipwxHtmlRenderingStyle():  ::wxHtmlRenderingStyle(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

 ::wxColour sipwxHtmlRenderingStyle::GetSelectedTextBgColour(const  ::wxColour& clr)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,sipName_HtmlRenderingStyle,sipName_GetSelectedTextBgColour);

    if (!sipMeth)
        return  ::wxColour();

    extern  ::wxColour sipVH__html_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxColour&);

    return sipVH__html_0(sipGILState, 0, sipPySelf, sipMeth, clr);
}

 ::wxColour sipwxHtmlRenderingStyle::GetSelectedTextColour(const  ::wxColour& clr)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,sipName_HtmlRenderingStyle,sipName_GetSelectedTextColour);

    if (!sipMeth)
        return  ::wxColour();

    extern  ::wxColour sipVH__html_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxColour&);

    return sipVH__html_0(sipGILState, 0, sipPySelf, sipMeth, clr);
}


PyDoc_STRVAR(doc_wxHtmlRenderingStyle_GetSelectedTextColour, "GetSelectedTextColour(clr) -> wx.Colour\n"
"\n"
"Returns the colour to use for the selected text.");

extern "C" {static PyObject *meth_wxHtmlRenderingStyle_GetSelectedTextColour(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxHtmlRenderingStyle_GetSelectedTextColour(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    PyObject *sipOrigSelf = sipSelf;

    {
        const  ::wxColour* clr;
        int clrState = 0;
         ::wxHtmlRenderingStyle *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxHtmlRenderingStyle, &sipCpp, sipType_wxColour, &clr, &clrState))
        {
             ::wxColour*sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_HtmlRenderingStyle, sipName_GetSelectedTextColour);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxColour(sipCpp->GetSelectedTextColour(*clr));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxColour *>(clr),sipType_wxColour,clrState);

            if (PyErr_Occurred())
                return 0;

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_HtmlRenderingStyle, sipName_GetSelectedTextColour, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlRenderingStyle_GetSelectedTextBgColour, "GetSelectedTextBgColour(clr) -> wx.Colour\n"
"\n"
"Returns the colour to use for the selected text's background.");

extern "C" {static PyObject *meth_wxHtmlRenderingStyle_GetSelectedTextBgColour(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxHtmlRenderingStyle_GetSelectedTextBgColour(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    PyObject *sipOrigSelf = sipSelf;

    {
        const  ::wxColour* clr;
        int clrState = 0;
         ::wxHtmlRenderingStyle *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxHtmlRenderingStyle, &sipCpp, sipType_wxColour, &clr, &clrState))
        {
             ::wxColour*sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_HtmlRenderingStyle, sipName_GetSelectedTextBgColour);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxColour(sipCpp->GetSelectedTextBgColour(*clr));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxColour *>(clr),sipType_wxColour,clrState);

            if (PyErr_Occurred())
                return 0;

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_HtmlRenderingStyle, sipName_GetSelectedTextBgColour, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxHtmlRenderingStyle *>(sipCppV);
    else
        delete reinterpret_cast< ::wxHtmlRenderingStyle *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::wxHtmlRenderingStyle* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxHtmlRenderingStyle[] = {
    {SIP_MLNAME_CAST(sipName_GetSelectedTextBgColour), SIP_MLMETH_CAST(meth_wxHtmlRenderingStyle_GetSelectedTextBgColour), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlRenderingStyle_GetSelectedTextBgColour)},
    {SIP_MLNAME_CAST(sipName_GetSelectedTextColour), SIP_MLMETH_CAST(meth_wxHtmlRenderingStyle_GetSelectedTextColour), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlRenderingStyle_GetSelectedTextColour)}
};

PyDoc_STRVAR(doc_wxHtmlRenderingStyle, "wxHtmlSelection is data holder with information about text selection.");


sipClassTypeDef sipTypeDef__html_wxHtmlRenderingStyle = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
        sipNameNr_wxHtmlRenderingStyle,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_HtmlRenderingStyle,
        {0, 0, 1},
        2, methods_wxHtmlRenderingStyle,
        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_wxHtmlRenderingStyle,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxHtmlRenderingStyle,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxHtmlRenderingStyle,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxHtmlRenderingStyle,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
