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/dcclient.h>
13
14 #include <wx/window.h>
15 #include <wx/setup.h>
16 #include <wxPython/wxpy_api.h>
17 #include <wx/gdicmn.h>
18 #include <wx/bitmap.h>
19 #include <wx/gdicmn.h>
20 #include <wx/palette.h>
21 #include <wx/colour.h>
22 #include <wx/gdicmn.h>
23 #include <wx/dc.h>
24 #include <wx/affinematrix2d.h>
25 #include <wx/pen.h>
26 #include "arrayholder.h"
27 #include <wx/brush.h>
28 #include <wx/font.h>
29 #include <wx/dc.h>
30 #include <wx/region.h>
31
32 #include <wx/icon.h>
33 #include <wx/object.h>
34 #include <wx/object.h>
35 #include <wx/object.h>
36
37
38 class sipwxWindowDC : public ::wxWindowDC
39 {
40 public:
41 sipwxWindowDC( ::wxWindow*);
42 ~sipwxWindowDC();
43
44 public:
45 sipSimpleWrapper *sipPySelf;
46
47 private:
48 sipwxWindowDC(const sipwxWindowDC &);
49 sipwxWindowDC &operator = (const sipwxWindowDC &);
50 };
51
sipwxWindowDC(::wxWindow * window)52 sipwxWindowDC::sipwxWindowDC( ::wxWindow*window): ::wxWindowDC(window), sipPySelf(SIP_NULLPTR)
53 {
54 }
55
~sipwxWindowDC()56 sipwxWindowDC::~sipwxWindowDC()
57 {
58 sipInstanceDestroyedEx(&sipPySelf);
59 }
60
61
62 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
63 extern "C" {static void *cast_wxWindowDC(void *, const sipTypeDef *);}
cast_wxWindowDC(void * sipCppV,const sipTypeDef * targetType)64 static void *cast_wxWindowDC(void *sipCppV, const sipTypeDef *targetType)
65 {
66 ::wxWindowDC *sipCpp = reinterpret_cast< ::wxWindowDC *>(sipCppV);
67
68 if (targetType == sipType_wxDC)
69 return static_cast< ::wxDC *>(sipCpp);
70
71 if (targetType == sipType_wxObject)
72 return static_cast< ::wxObject *>(sipCpp);
73
74 return sipCppV;
75 }
76
77
78 /* Call the instance's destructor. */
79 extern "C" {static void release_wxWindowDC(void *, int);}
release_wxWindowDC(void * sipCppV,int sipState)80 static void release_wxWindowDC(void *sipCppV, int sipState)
81 {
82 Py_BEGIN_ALLOW_THREADS
83
84 if (sipState & SIP_DERIVED_CLASS)
85 delete reinterpret_cast<sipwxWindowDC *>(sipCppV);
86 else
87 delete reinterpret_cast< ::wxWindowDC *>(sipCppV);
88
89 Py_END_ALLOW_THREADS
90 }
91
92
93 extern "C" {static void dealloc_wxWindowDC(sipSimpleWrapper *);}
dealloc_wxWindowDC(sipSimpleWrapper * sipSelf)94 static void dealloc_wxWindowDC(sipSimpleWrapper *sipSelf)
95 {
96 if (sipIsDerivedClass(sipSelf))
97 reinterpret_cast<sipwxWindowDC *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
98
99 if (sipIsOwnedByPython(sipSelf))
100 {
101 release_wxWindowDC(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
102 }
103 }
104
105
106 extern "C" {static void *init_type_wxWindowDC(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxWindowDC(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)107 static void *init_type_wxWindowDC(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
108 {
109 sipwxWindowDC *sipCpp = SIP_NULLPTR;
110
111 {
112 ::wxWindow* window;
113
114 static const char *sipKwdList[] = {
115 sipName_window,
116 };
117
118 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J8", sipType_wxWindow, &window))
119 {
120
121 if (!wxPyCheckForApp()) return NULL;
122
123 PyErr_Clear();
124
125 Py_BEGIN_ALLOW_THREADS
126 sipCpp = new sipwxWindowDC(window);
127 Py_END_ALLOW_THREADS
128
129 if (PyErr_Occurred())
130 {
131 delete sipCpp;
132 return SIP_NULLPTR;
133 }
134
135 sipCpp->sipPySelf = sipSelf;
136
137 return sipCpp;
138 }
139 }
140
141 return SIP_NULLPTR;
142 }
143
144
145 /* Define this type's super-types. */
146 static sipEncodedTypeDef supers_wxWindowDC[] = {{93, 255, 1}};
147
148 PyDoc_STRVAR(doc_wxWindowDC, "WindowDC(window)\n"
149 "\n"
150 "A wxWindowDC must be constructed if an application wishes to paint on\n"
151 "the whole area of a window (client and decorations).");
152
153
154 sipClassTypeDef sipTypeDef__core_wxWindowDC = {
155 {
156 -1,
157 SIP_NULLPTR,
158 SIP_NULLPTR,
159 SIP_TYPE_SCC|SIP_TYPE_CLASS,
160 sipNameNr_wxWindowDC,
161 {SIP_NULLPTR},
162 SIP_NULLPTR
163 },
164 {
165 sipNameNr_WindowDC,
166 {0, 0, 1},
167 0, SIP_NULLPTR,
168 0, SIP_NULLPTR,
169 0, SIP_NULLPTR,
170 {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
171 },
172 doc_wxWindowDC,
173 -1,
174 -1,
175 supers_wxWindowDC,
176 SIP_NULLPTR,
177 init_type_wxWindowDC,
178 SIP_NULLPTR,
179 SIP_NULLPTR,
180 #if PY_MAJOR_VERSION >= 3
181 SIP_NULLPTR,
182 SIP_NULLPTR,
183 #else
184 SIP_NULLPTR,
185 SIP_NULLPTR,
186 SIP_NULLPTR,
187 SIP_NULLPTR,
188 #endif
189 dealloc_wxWindowDC,
190 SIP_NULLPTR,
191 SIP_NULLPTR,
192 SIP_NULLPTR,
193 release_wxWindowDC,
194 cast_wxWindowDC,
195 SIP_NULLPTR,
196 SIP_NULLPTR,
197 SIP_NULLPTR,
198 SIP_NULLPTR,
199 SIP_NULLPTR,
200 SIP_NULLPTR
201 };
202