/*
 * 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/dcscreen.h>

        #include <wx/window.h>
        #include <wx/gdicmn.h>
    #include <wx/setup.h>
    #include <wxPython/wxpy_api.h>
        #include <wx/gdicmn.h>
        #include <wx/bitmap.h>
        #include <wx/palette.h>
        #include <wx/colour.h>
        #include <wx/gdicmn.h>
        #include <wx/dc.h>
        #include <wx/affinematrix2d.h>
        #include <wx/pen.h>
        #include "arrayholder.h"
        #include <wx/brush.h>
        #include <wx/font.h>
        #include <wx/dc.h>
        #include <wx/region.h>
        
        #include <wx/icon.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxScreenDC : public  ::wxScreenDC
{
public:
    sipwxScreenDC();
    ~sipwxScreenDC();

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipwxScreenDC(const sipwxScreenDC &);
    sipwxScreenDC &operator = (const sipwxScreenDC &);
};

sipwxScreenDC::sipwxScreenDC():  ::wxScreenDC(), sipPySelf(SIP_NULLPTR)
{
}

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


PyDoc_STRVAR(doc_wxScreenDC_EndDrawingOnTop, "EndDrawingOnTop() -> bool\n"
"\n"
"Use this in conjunction with StartDrawingOnTop().");

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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes =  ::wxScreenDC::EndDrawingOnTop();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxScreenDC_StartDrawingOnTop, "StartDrawingOnTop(window) -> bool\n"
"StartDrawingOnTop(rect=None) -> bool\n"
"\n"
"Use this in conjunction with EndDrawingOnTop() to ensure that drawing\n"
"to the screen occurs on top of existing windows.\n"
"");

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

    {
         ::wxWindow* window;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J8", sipType_wxWindow, &window))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes =  ::wxScreenDC::StartDrawingOnTop(window);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    {
         ::wxRect* rect = 0;
        int rectState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "|J0", sipType_wxRect, &rect, &rectState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes =  ::wxScreenDC::StartDrawingOnTop(rect);
            Py_END_ALLOW_THREADS
            sipReleaseType(rect,sipType_wxRect,rectState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

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

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_wxScreenDC(void *, const sipTypeDef *);}
static void *cast_wxScreenDC(void *sipCppV, const sipTypeDef *targetType)
{
     ::wxScreenDC *sipCpp = reinterpret_cast< ::wxScreenDC *>(sipCppV);

    if (targetType == sipType_wxDC)
        return static_cast< ::wxDC *>(sipCpp);

    if (targetType == sipType_wxObject)
        return static_cast< ::wxObject *>(sipCpp);

    return sipCppV;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxScreenDC *>(sipCppV);
    else
        delete reinterpret_cast< ::wxScreenDC *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

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

        if (!wxPyCheckForApp()) return NULL;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxScreenDC();
            Py_END_ALLOW_THREADS

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_wxScreenDC[] = {{93, 255, 1}};


static PyMethodDef methods_wxScreenDC[] = {
    {SIP_MLNAME_CAST(sipName_EndDrawingOnTop), meth_wxScreenDC_EndDrawingOnTop, METH_VARARGS, SIP_MLDOC_CAST(doc_wxScreenDC_EndDrawingOnTop)},
    {SIP_MLNAME_CAST(sipName_StartDrawingOnTop), SIP_MLMETH_CAST(meth_wxScreenDC_StartDrawingOnTop), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxScreenDC_StartDrawingOnTop)}
};

PyDoc_STRVAR(doc_wxScreenDC, "ScreenDC()\n"
"\n"
"A wxScreenDC can be used to paint on the screen.");


sipClassTypeDef sipTypeDef__core_wxScreenDC = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxScreenDC,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_ScreenDC,
        {0, 0, 1},
        2, methods_wxScreenDC,
        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_wxScreenDC,
    -1,
    -1,
    supers_wxScreenDC,
    SIP_NULLPTR,
    init_type_wxScreenDC,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxScreenDC,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxScreenDC,
    cast_wxScreenDC,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
