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


PyDoc_STRVAR(doc_wxSystemSettings_GetColour, "GetColour(index) -> Colour\n"
"\n"
"Returns a system colour.");

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

    {
        ::wxSystemColour index;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "E", sipType_wxSystemColour, &index))
        {
            ::wxColour*sipRes;
        if (!wxPyCheckForApp()) return NULL;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxColour(::wxSystemSettings::GetColour(index));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_SystemSettings, sipName_GetColour, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxSystemSettings_GetFont, "GetFont(index) -> Font\n"
"\n"
"Returns a system font.");

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

    {
        ::wxSystemFont index;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "E", sipType_wxSystemFont, &index))
        {
            ::wxFont*sipRes;
        if (!wxPyCheckForApp()) return NULL;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxFont(::wxSystemSettings::GetFont(index));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_SystemSettings, sipName_GetFont, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxSystemSettings_GetMetric, "GetMetric(index, win=None) -> int\n"
"\n"
"Returns the value of a system metric, or -1 if the metric is not\n"
"supported on the current system.");

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

    {
        ::wxSystemMetric index;
        ::wxWindow* win = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "E|J8", sipType_wxSystemMetric, &index, sipType_wxWindow, &win))
        {
            int sipRes;
        if (!wxPyCheckForApp()) return NULL;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = ::wxSystemSettings::GetMetric(index, win);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_SystemSettings, sipName_GetMetric, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxSystemSettings_GetScreenType, "GetScreenType() -> SystemScreenType\n"
"\n"
"Returns the screen type.");

extern "C" {static PyObject *meth_wxSystemSettings_GetScreenType(PyObject *, PyObject *);}
static PyObject *meth_wxSystemSettings_GetScreenType(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            ::wxSystemScreenType sipRes;
        if (!wxPyCheckForApp()) return NULL;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = ::wxSystemSettings::GetScreenType();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxSystemScreenType);
        }
    }

    sipNoMethod(sipParseErr, sipName_SystemSettings, sipName_GetScreenType, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxSystemSettings_GetAppearance, "GetAppearance() -> SystemAppearance\n"
"\n"
"Returns the object describing the current system appearance.");

extern "C" {static PyObject *meth_wxSystemSettings_GetAppearance(PyObject *, PyObject *);}
static PyObject *meth_wxSystemSettings_GetAppearance(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            ::wxSystemAppearance*sipRes;
        if (!wxPyCheckForApp()) return NULL;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxSystemAppearance(::wxSystemSettings::GetAppearance());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_SystemSettings, sipName_GetAppearance, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxSystemSettings_HasFeature, "HasFeature(index) -> bool\n"
"\n"
"Returns true if the port has certain feature.");

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

    {
        ::wxSystemFeature index;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "E", sipType_wxSystemFeature, &index))
        {
            bool sipRes;
        if (!wxPyCheckForApp()) return NULL;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = ::wxSystemSettings::HasFeature(index);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_SystemSettings, sipName_HasFeature, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxSystemSettings_SelectLightDark, "SelectLightDark(colForLight, colForDark) -> Colour\n"
"\n"
"Select one of the two colours depending on whether light or dark mode\n"
"is used.");

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

    {
        ::wxColour* colForLight;
        int colForLightState = 0;
        ::wxColour* colForDark;
        int colForDarkState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1J1", sipType_wxColour, &colForLight, &colForLightState, sipType_wxColour, &colForDark, &colForDarkState))
        {
            ::wxColour*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxColour(::wxSystemSettings::SelectLightDark(*colForLight, *colForDark));
            Py_END_ALLOW_THREADS
            sipReleaseType(colForLight, sipType_wxColour, colForLightState);
            sipReleaseType(colForDark, sipType_wxColour, colForDarkState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_SystemSettings, sipName_SelectLightDark, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
        if (!wxPyCheckForApp()) return NULL;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxSystemSettings();
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    {
        const ::wxSystemSettings* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxSystemSettings[] = {
    {sipName_GetAppearance, meth_wxSystemSettings_GetAppearance, METH_VARARGS, doc_wxSystemSettings_GetAppearance},
    {sipName_GetColour, SIP_MLMETH_CAST(meth_wxSystemSettings_GetColour), METH_VARARGS|METH_KEYWORDS, doc_wxSystemSettings_GetColour},
    {sipName_GetFont, SIP_MLMETH_CAST(meth_wxSystemSettings_GetFont), METH_VARARGS|METH_KEYWORDS, doc_wxSystemSettings_GetFont},
    {sipName_GetMetric, SIP_MLMETH_CAST(meth_wxSystemSettings_GetMetric), METH_VARARGS|METH_KEYWORDS, doc_wxSystemSettings_GetMetric},
    {sipName_GetScreenType, meth_wxSystemSettings_GetScreenType, METH_VARARGS, doc_wxSystemSettings_GetScreenType},
    {sipName_HasFeature, SIP_MLMETH_CAST(meth_wxSystemSettings_HasFeature), METH_VARARGS|METH_KEYWORDS, doc_wxSystemSettings_HasFeature},
    {sipName_SelectLightDark, SIP_MLMETH_CAST(meth_wxSystemSettings_SelectLightDark), METH_VARARGS|METH_KEYWORDS, doc_wxSystemSettings_SelectLightDark}
};

PyDoc_STRVAR(doc_wxSystemSettings, "SystemSettings() -> None\n"
"\n"
"wxSystemSettings allows the application to ask for details about the\n"
"system.");


sipClassTypeDef sipTypeDef__core_wxSystemSettings = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxSystemSettings,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_SystemSettings,
        {0, 0, 1},
        7, methods_wxSystemSettings,
        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_wxSystemSettings,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxSystemSettings,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxSystemSettings,
    assign_wxSystemSettings,
    array_wxSystemSettings,
    copy_wxSystemSettings,
    release_wxSystemSettings,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxSystemSettings,
    sizeof (::wxSystemSettings),
};
