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_propgrid.h"
11
12 #include <wx/propgrid/property.h>
13
14 #include <wx/propgrid/property.h>
15
16
17 class sipwxPGChoicesData : public ::wxPGChoicesData
18 {
19 public:
20 sipwxPGChoicesData();
21 ~sipwxPGChoicesData();
22
23 public:
24 sipSimpleWrapper *sipPySelf;
25
26 private:
27 sipwxPGChoicesData(const sipwxPGChoicesData &);
28 sipwxPGChoicesData &operator = (const sipwxPGChoicesData &);
29 };
30
sipwxPGChoicesData()31 sipwxPGChoicesData::sipwxPGChoicesData(): ::wxPGChoicesData(), sipPySelf(SIP_NULLPTR)
32 {
33 }
34
~sipwxPGChoicesData()35 sipwxPGChoicesData::~sipwxPGChoicesData()
36 {
37 sipInstanceDestroyedEx(&sipPySelf);
38 }
39
40
41 PyDoc_STRVAR(doc_wxPGChoicesData_CopyDataFrom, "CopyDataFrom(data)");
42
43 extern "C" {static PyObject *meth_wxPGChoicesData_CopyDataFrom(PyObject *, PyObject *, PyObject *);}
meth_wxPGChoicesData_CopyDataFrom(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)44 static PyObject *meth_wxPGChoicesData_CopyDataFrom(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
45 {
46 PyObject *sipParseErr = SIP_NULLPTR;
47
48 {
49 ::wxPGChoicesData* data;
50 ::wxPGChoicesData *sipCpp;
51
52 static const char *sipKwdList[] = {
53 sipName_data,
54 };
55
56 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxPGChoicesData, &sipCpp, sipType_wxPGChoicesData, &data))
57 {
58 PyErr_Clear();
59
60 Py_BEGIN_ALLOW_THREADS
61 sipCpp->CopyDataFrom(data);
62 Py_END_ALLOW_THREADS
63
64 if (PyErr_Occurred())
65 return 0;
66
67 Py_INCREF(Py_None);
68 return Py_None;
69 }
70 }
71
72 /* Raise an exception if the arguments couldn't be parsed. */
73 sipNoMethod(sipParseErr, sipName_PGChoicesData, sipName_CopyDataFrom, SIP_NULLPTR);
74
75 return SIP_NULLPTR;
76 }
77
78
79 PyDoc_STRVAR(doc_wxPGChoicesData_Insert, "Insert(index, item) -> PGChoiceEntry");
80
81 extern "C" {static PyObject *meth_wxPGChoicesData_Insert(PyObject *, PyObject *, PyObject *);}
meth_wxPGChoicesData_Insert(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)82 static PyObject *meth_wxPGChoicesData_Insert(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
83 {
84 PyObject *sipParseErr = SIP_NULLPTR;
85
86 {
87 int index;
88 const ::wxPGChoiceEntry* item;
89 ::wxPGChoicesData *sipCpp;
90
91 static const char *sipKwdList[] = {
92 sipName_index,
93 sipName_item,
94 };
95
96 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiJ9", &sipSelf, sipType_wxPGChoicesData, &sipCpp, &index, sipType_wxPGChoiceEntry, &item))
97 {
98 ::wxPGChoiceEntry*sipRes;
99
100 PyErr_Clear();
101
102 Py_BEGIN_ALLOW_THREADS
103 sipRes = &sipCpp->Insert(index,*item);
104 Py_END_ALLOW_THREADS
105
106 if (PyErr_Occurred())
107 return 0;
108
109 return sipConvertFromType(sipRes,sipType_wxPGChoiceEntry,SIP_NULLPTR);
110 }
111 }
112
113 /* Raise an exception if the arguments couldn't be parsed. */
114 sipNoMethod(sipParseErr, sipName_PGChoicesData, sipName_Insert, SIP_NULLPTR);
115
116 return SIP_NULLPTR;
117 }
118
119
120 PyDoc_STRVAR(doc_wxPGChoicesData_Clear, "Clear()");
121
122 extern "C" {static PyObject *meth_wxPGChoicesData_Clear(PyObject *, PyObject *);}
meth_wxPGChoicesData_Clear(PyObject * sipSelf,PyObject * sipArgs)123 static PyObject *meth_wxPGChoicesData_Clear(PyObject *sipSelf, PyObject *sipArgs)
124 {
125 PyObject *sipParseErr = SIP_NULLPTR;
126
127 {
128 ::wxPGChoicesData *sipCpp;
129
130 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPGChoicesData, &sipCpp))
131 {
132 PyErr_Clear();
133
134 Py_BEGIN_ALLOW_THREADS
135 sipCpp->Clear();
136 Py_END_ALLOW_THREADS
137
138 if (PyErr_Occurred())
139 return 0;
140
141 Py_INCREF(Py_None);
142 return Py_None;
143 }
144 }
145
146 /* Raise an exception if the arguments couldn't be parsed. */
147 sipNoMethod(sipParseErr, sipName_PGChoicesData, sipName_Clear, SIP_NULLPTR);
148
149 return SIP_NULLPTR;
150 }
151
152
153 PyDoc_STRVAR(doc_wxPGChoicesData_GetCount, "GetCount() -> unsignedint");
154
155 extern "C" {static PyObject *meth_wxPGChoicesData_GetCount(PyObject *, PyObject *);}
meth_wxPGChoicesData_GetCount(PyObject * sipSelf,PyObject * sipArgs)156 static PyObject *meth_wxPGChoicesData_GetCount(PyObject *sipSelf, PyObject *sipArgs)
157 {
158 PyObject *sipParseErr = SIP_NULLPTR;
159
160 {
161 const ::wxPGChoicesData *sipCpp;
162
163 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPGChoicesData, &sipCpp))
164 {
165 uint sipRes;
166
167 PyErr_Clear();
168
169 Py_BEGIN_ALLOW_THREADS
170 sipRes = sipCpp->GetCount();
171 Py_END_ALLOW_THREADS
172
173 if (PyErr_Occurred())
174 return 0;
175
176 return PyLong_FromUnsignedLong(sipRes);
177 }
178 }
179
180 /* Raise an exception if the arguments couldn't be parsed. */
181 sipNoMethod(sipParseErr, sipName_PGChoicesData, sipName_GetCount, SIP_NULLPTR);
182
183 return SIP_NULLPTR;
184 }
185
186
187 PyDoc_STRVAR(doc_wxPGChoicesData_Item, "Item(i) -> PGChoiceEntry");
188
189 extern "C" {static PyObject *meth_wxPGChoicesData_Item(PyObject *, PyObject *, PyObject *);}
meth_wxPGChoicesData_Item(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)190 static PyObject *meth_wxPGChoicesData_Item(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
191 {
192 PyObject *sipParseErr = SIP_NULLPTR;
193
194 {
195 uint i;
196 ::wxPGChoicesData *sipCpp;
197
198 static const char *sipKwdList[] = {
199 sipName_i,
200 };
201
202 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bu", &sipSelf, sipType_wxPGChoicesData, &sipCpp, &i))
203 {
204 ::wxPGChoiceEntry*sipRes;
205
206 PyErr_Clear();
207
208 Py_BEGIN_ALLOW_THREADS
209 sipRes = &sipCpp->Item(i);
210 Py_END_ALLOW_THREADS
211
212 if (PyErr_Occurred())
213 return 0;
214
215 return sipConvertFromType(sipRes,sipType_wxPGChoiceEntry,SIP_NULLPTR);
216 }
217 }
218
219 /* Raise an exception if the arguments couldn't be parsed. */
220 sipNoMethod(sipParseErr, sipName_PGChoicesData, sipName_Item, SIP_NULLPTR);
221
222 return SIP_NULLPTR;
223 }
224
225
226 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
227 extern "C" {static void *cast_wxPGChoicesData(void *, const sipTypeDef *);}
cast_wxPGChoicesData(void * sipCppV,const sipTypeDef * targetType)228 static void *cast_wxPGChoicesData(void *sipCppV, const sipTypeDef *targetType)
229 {
230 ::wxPGChoicesData *sipCpp = reinterpret_cast< ::wxPGChoicesData *>(sipCppV);
231
232 if (targetType == sipType_wxRefCounter)
233 return static_cast< ::wxRefCounter *>(sipCpp);
234
235 return sipCppV;
236 }
237
238
239 /* Call the instance's destructor. */
240 extern "C" {static void release_wxPGChoicesData(void *, int);}
release_wxPGChoicesData(void * sipCppV,int sipState)241 static void release_wxPGChoicesData(void *sipCppV, int sipState)
242 {
243 Py_BEGIN_ALLOW_THREADS
244
245 if (sipState & SIP_DERIVED_CLASS)
246 delete reinterpret_cast<sipwxPGChoicesData *>(sipCppV);
247
248 Py_END_ALLOW_THREADS
249 }
250
251
252 extern "C" {static void dealloc_wxPGChoicesData(sipSimpleWrapper *);}
dealloc_wxPGChoicesData(sipSimpleWrapper * sipSelf)253 static void dealloc_wxPGChoicesData(sipSimpleWrapper *sipSelf)
254 {
255 if (sipIsDerivedClass(sipSelf))
256 reinterpret_cast<sipwxPGChoicesData *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
257
258 if (sipIsOwnedByPython(sipSelf))
259 {
260 release_wxPGChoicesData(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
261 }
262 }
263
264
265 extern "C" {static void *init_type_wxPGChoicesData(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxPGChoicesData(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)266 static void *init_type_wxPGChoicesData(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
267 {
268 sipwxPGChoicesData *sipCpp = SIP_NULLPTR;
269
270 {
271 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
272 {
273 PyErr_Clear();
274
275 Py_BEGIN_ALLOW_THREADS
276 sipCpp = new sipwxPGChoicesData();
277 Py_END_ALLOW_THREADS
278
279 if (PyErr_Occurred())
280 {
281 delete sipCpp;
282 return SIP_NULLPTR;
283 }
284
285 sipCpp->sipPySelf = sipSelf;
286
287 return sipCpp;
288 }
289 }
290
291 return SIP_NULLPTR;
292 }
293
294
295 /* Define this type's super-types. */
296 static sipEncodedTypeDef supers_wxPGChoicesData[] = {{23, 0, 1}};
297
298
299 static PyMethodDef methods_wxPGChoicesData[] = {
300 {SIP_MLNAME_CAST(sipName_Clear), meth_wxPGChoicesData_Clear, METH_VARARGS, SIP_MLDOC_CAST(doc_wxPGChoicesData_Clear)},
301 {SIP_MLNAME_CAST(sipName_CopyDataFrom), SIP_MLMETH_CAST(meth_wxPGChoicesData_CopyDataFrom), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGChoicesData_CopyDataFrom)},
302 {SIP_MLNAME_CAST(sipName_GetCount), meth_wxPGChoicesData_GetCount, METH_VARARGS, SIP_MLDOC_CAST(doc_wxPGChoicesData_GetCount)},
303 {SIP_MLNAME_CAST(sipName_Insert), SIP_MLMETH_CAST(meth_wxPGChoicesData_Insert), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGChoicesData_Insert)},
304 {SIP_MLNAME_CAST(sipName_Item), SIP_MLMETH_CAST(meth_wxPGChoicesData_Item), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGChoicesData_Item)}
305 };
306
307 sipVariableDef variables_wxPGChoicesData[] = {
308 {PropertyVariable, sipName_Count, &methods_wxPGChoicesData[2], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
309 };
310
311 PyDoc_STRVAR(doc_wxPGChoicesData, "PGChoicesData()");
312
313
314 sipClassTypeDef sipTypeDef__propgrid_wxPGChoicesData = {
315 {
316 -1,
317 SIP_NULLPTR,
318 SIP_NULLPTR,
319 SIP_TYPE_CLASS,
320 sipNameNr_wxPGChoicesData,
321 {SIP_NULLPTR},
322 SIP_NULLPTR
323 },
324 {
325 sipNameNr_PGChoicesData,
326 {0, 0, 1},
327 5, methods_wxPGChoicesData,
328 0, SIP_NULLPTR,
329 1, variables_wxPGChoicesData,
330 {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
331 },
332 doc_wxPGChoicesData,
333 -1,
334 -1,
335 supers_wxPGChoicesData,
336 SIP_NULLPTR,
337 init_type_wxPGChoicesData,
338 SIP_NULLPTR,
339 SIP_NULLPTR,
340 #if PY_MAJOR_VERSION >= 3
341 SIP_NULLPTR,
342 SIP_NULLPTR,
343 #else
344 SIP_NULLPTR,
345 SIP_NULLPTR,
346 SIP_NULLPTR,
347 SIP_NULLPTR,
348 #endif
349 dealloc_wxPGChoicesData,
350 SIP_NULLPTR,
351 SIP_NULLPTR,
352 SIP_NULLPTR,
353 release_wxPGChoicesData,
354 cast_wxPGChoicesData,
355 SIP_NULLPTR,
356 SIP_NULLPTR,
357 SIP_NULLPTR,
358 SIP_NULLPTR,
359 SIP_NULLPTR,
360 SIP_NULLPTR
361 };
362