1 /*
2 * Interface wrapper code.
3 *
4 * Generated by SIP 4.19.16
5 *
6 * Copyright: (c) 2018 by Total Control Software
7 * License: wxWindows License
8 */
9
10 #include "sipAPI_core.h"
11
12 #include <wx/dc.h>
13
14 #include <wx/dc.h>
15 #include <wx/brush.h>
16
17
18 /* Call the instance's destructor. */
19 extern "C" {static void release_wxDCBrushChanger(void *, int);}
release_wxDCBrushChanger(void * sipCppV,int)20 static void release_wxDCBrushChanger(void *sipCppV, int)
21 {
22 Py_BEGIN_ALLOW_THREADS
23
24 delete reinterpret_cast< ::wxDCBrushChanger *>(sipCppV);
25
26 Py_END_ALLOW_THREADS
27 }
28
29
30 extern "C" {static void dealloc_wxDCBrushChanger(sipSimpleWrapper *);}
dealloc_wxDCBrushChanger(sipSimpleWrapper * sipSelf)31 static void dealloc_wxDCBrushChanger(sipSimpleWrapper *sipSelf)
32 {
33 if (sipIsOwnedByPython(sipSelf))
34 {
35 release_wxDCBrushChanger(sipGetAddress(sipSelf), 0);
36 }
37 }
38
39
40 extern "C" {static void *init_type_wxDCBrushChanger(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxDCBrushChanger(sipSimpleWrapper *,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)41 static void *init_type_wxDCBrushChanger(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
42 {
43 ::wxDCBrushChanger *sipCpp = SIP_NULLPTR;
44
45 {
46 ::wxDC* dc;
47 const ::wxBrush* brush;
48
49 static const char *sipKwdList[] = {
50 sipName_dc,
51 sipName_brush,
52 };
53
54 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9J9", sipType_wxDC, &dc, sipType_wxBrush, &brush))
55 {
56 PyErr_Clear();
57
58 Py_BEGIN_ALLOW_THREADS
59 sipCpp = new ::wxDCBrushChanger(*dc,*brush);
60 Py_END_ALLOW_THREADS
61
62 if (PyErr_Occurred())
63 {
64 delete sipCpp;
65 return SIP_NULLPTR;
66 }
67
68 return sipCpp;
69 }
70 }
71
72 return SIP_NULLPTR;
73 }
74
75 PyDoc_STRVAR(doc_wxDCBrushChanger, "DCBrushChanger(dc, brush)\n"
76 "\n"
77 "wxDCBrushChanger is a small helper class for setting a brush on a wxDC\n"
78 "and unsetting it automatically in the destructor, restoring the\n"
79 "previous one.");
80
81
82 sipClassTypeDef sipTypeDef__core_wxDCBrushChanger = {
83 {
84 -1,
85 SIP_NULLPTR,
86 SIP_NULLPTR,
87 SIP_TYPE_CLASS,
88 sipNameNr_wxDCBrushChanger,
89 {SIP_NULLPTR},
90 SIP_NULLPTR
91 },
92 {
93 sipNameNr_DCBrushChanger,
94 {0, 0, 1},
95 0, SIP_NULLPTR,
96 0, SIP_NULLPTR,
97 0, SIP_NULLPTR,
98 {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
99 },
100 doc_wxDCBrushChanger,
101 -1,
102 -1,
103 SIP_NULLPTR,
104 SIP_NULLPTR,
105 init_type_wxDCBrushChanger,
106 SIP_NULLPTR,
107 SIP_NULLPTR,
108 #if PY_MAJOR_VERSION >= 3
109 SIP_NULLPTR,
110 SIP_NULLPTR,
111 #else
112 SIP_NULLPTR,
113 SIP_NULLPTR,
114 SIP_NULLPTR,
115 SIP_NULLPTR,
116 #endif
117 dealloc_wxDCBrushChanger,
118 SIP_NULLPTR,
119 SIP_NULLPTR,
120 SIP_NULLPTR,
121 release_wxDCBrushChanger,
122 SIP_NULLPTR,
123 SIP_NULLPTR,
124 SIP_NULLPTR,
125 SIP_NULLPTR,
126 SIP_NULLPTR,
127 SIP_NULLPTR,
128 SIP_NULLPTR
129 };
130