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_aui.h"
11
12
13 #include <wx/aui/framemanager.h>
14
15
16 PyDoc_STRVAR(doc_wxAuiDockInfoArray_append, "append(self, obj: AuiDockInfo)");
17
18 extern "C" {static PyObject *meth_wxAuiDockInfoArray_append(PyObject *, PyObject *, PyObject *);}
meth_wxAuiDockInfoArray_append(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)19 static PyObject *meth_wxAuiDockInfoArray_append(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
20 {
21 PyObject *sipParseErr = SIP_NULLPTR;
22
23 {
24 ::wxAuiDockInfo* obj;
25 ::wxAuiDockInfoArray *sipCpp;
26
27 static const char *sipKwdList[] = {
28 sipName_obj,
29 };
30
31 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxAuiDockInfoArray, &sipCpp, sipType_wxAuiDockInfo, &obj))
32 {
33 sipCpp->Add(*obj);
34
35 Py_INCREF(Py_None);
36 return Py_None;
37 }
38 }
39
40 /* Raise an exception if the arguments couldn't be parsed. */
41 sipNoMethod(sipParseErr, sipName_AuiDockInfoArray, sipName_append, doc_wxAuiDockInfoArray_append);
42
43 return SIP_NULLPTR;
44 }
45
46
47 PyDoc_STRVAR(doc_wxAuiDockInfoArray_index, "index(self, obj: AuiDockInfo) -> int");
48
49 extern "C" {static PyObject *meth_wxAuiDockInfoArray_index(PyObject *, PyObject *, PyObject *);}
meth_wxAuiDockInfoArray_index(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)50 static PyObject *meth_wxAuiDockInfoArray_index(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
51 {
52 PyObject *sipParseErr = SIP_NULLPTR;
53
54 {
55 ::wxAuiDockInfo* obj;
56 ::wxAuiDockInfoArray *sipCpp;
57
58 static const char *sipKwdList[] = {
59 sipName_obj,
60 };
61
62 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxAuiDockInfoArray, &sipCpp, sipType_wxAuiDockInfo, &obj))
63 {
64 int sipRes = 0;
65 sipErrorState sipError = sipErrorNone;
66
67 int idx = sipCpp->Index(*obj, false);
68 if (idx == wxNOT_FOUND) {
69 sipError = sipErrorFail;
70 wxPyErr_SetString(PyExc_ValueError,
71 "sequence.index(x): x not in sequence");
72 }
73 sipRes = idx;
74
75 if (sipError == sipErrorFail)
76 return 0;
77
78 if (sipError == sipErrorNone)
79 {
80 return SIPLong_FromLong(sipRes);
81 }
82
83 sipAddException(sipError, &sipParseErr);
84 }
85 }
86
87 /* Raise an exception if the arguments couldn't be parsed. */
88 sipNoMethod(sipParseErr, sipName_AuiDockInfoArray, sipName_index, doc_wxAuiDockInfoArray_index);
89
90 return SIP_NULLPTR;
91 }
92
93
94 extern "C" {static int slot_wxAuiDockInfoArray___contains__(PyObject *,PyObject *);}
slot_wxAuiDockInfoArray___contains__(PyObject * sipSelf,PyObject * sipArg)95 static int slot_wxAuiDockInfoArray___contains__(PyObject *sipSelf,PyObject *sipArg)
96 {
97 ::wxAuiDockInfoArray *sipCpp = reinterpret_cast< ::wxAuiDockInfoArray *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxAuiDockInfoArray));
98
99 if (!sipCpp)
100 return -1;
101
102 PyObject *sipParseErr = SIP_NULLPTR;
103
104 {
105 ::wxAuiDockInfo* obj;
106
107 if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxAuiDockInfo, &obj))
108 {
109 int sipRes = 0;
110
111 int idx = sipCpp->Index(*obj, false);
112 sipRes = idx != wxNOT_FOUND;
113
114 return sipRes;
115 }
116 }
117
118 /* Raise an exception if the arguments couldn't be parsed. */
119 sipNoMethod(sipParseErr, sipName_AuiDockInfoArray, sipName___contains__, SIP_NULLPTR);
120
121 return -1;
122 }
123
124
125 extern "C" {static PyObject *slot_wxAuiDockInfoArray___getitem__(PyObject *,PyObject *);}
slot_wxAuiDockInfoArray___getitem__(PyObject * sipSelf,PyObject * sipArg)126 static PyObject *slot_wxAuiDockInfoArray___getitem__(PyObject *sipSelf,PyObject *sipArg)
127 {
128 ::wxAuiDockInfoArray *sipCpp = reinterpret_cast< ::wxAuiDockInfoArray *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxAuiDockInfoArray));
129
130 if (!sipCpp)
131 return SIP_NULLPTR;
132
133 PyObject *sipParseErr = SIP_NULLPTR;
134
135 {
136 long index;
137
138 if (sipParseArgs(&sipParseErr, sipArg, "1l", &index))
139 {
140 ::wxAuiDockInfo*sipRes = 0;
141 sipErrorState sipError = sipErrorNone;
142
143 if (0 > index)
144 index += sipCpp->GetCount();
145
146 if ((index < sipCpp->GetCount()) && (0 <= index)) {
147 sipRes = &sipCpp->Item(index);
148 }
149 else {
150 wxPyErr_SetString(PyExc_IndexError, "sequence index out of range");
151 sipError = sipErrorFail;
152 }
153
154 if (sipError == sipErrorFail)
155 return 0;
156
157 if (sipError == sipErrorNone)
158 {
159 return sipConvertFromType(sipRes,sipType_wxAuiDockInfo,SIP_NULLPTR);
160 }
161
162 sipAddException(sipError, &sipParseErr);
163 }
164 }
165
166 /* Raise an exception if the arguments couldn't be parsed. */
167 sipNoMethod(sipParseErr, sipName_AuiDockInfoArray, sipName___getitem__, SIP_NULLPTR);
168
169 return SIP_NULLPTR;
170 }
171
172
173 extern "C" {static SIP_SSIZE_T slot_wxAuiDockInfoArray___len__(PyObject *);}
slot_wxAuiDockInfoArray___len__(PyObject * sipSelf)174 static SIP_SSIZE_T slot_wxAuiDockInfoArray___len__(PyObject *sipSelf)
175 {
176 ::wxAuiDockInfoArray *sipCpp = reinterpret_cast< ::wxAuiDockInfoArray *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxAuiDockInfoArray));
177
178 if (!sipCpp)
179 return 0;
180
181
182 {
183 {
184 SIP_SSIZE_T sipRes = 0;
185
186 sipRes = sipCpp->GetCount();
187
188 return sipRes;
189 }
190 }
191
192 return 0;
193 }
194
195
196 /* Call the instance's destructor. */
197 extern "C" {static void release_wxAuiDockInfoArray(void *, int);}
release_wxAuiDockInfoArray(void * sipCppV,int)198 static void release_wxAuiDockInfoArray(void *sipCppV, int)
199 {
200 Py_BEGIN_ALLOW_THREADS
201
202 delete reinterpret_cast< ::wxAuiDockInfoArray *>(sipCppV);
203
204 Py_END_ALLOW_THREADS
205 }
206
207
208 extern "C" {static void assign_wxAuiDockInfoArray(void *, SIP_SSIZE_T, void *);}
assign_wxAuiDockInfoArray(void * sipDst,SIP_SSIZE_T sipDstIdx,void * sipSrc)209 static void assign_wxAuiDockInfoArray(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
210 {
211 reinterpret_cast< ::wxAuiDockInfoArray *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxAuiDockInfoArray *>(sipSrc);
212 }
213
214
215 extern "C" {static void *array_wxAuiDockInfoArray(SIP_SSIZE_T);}
array_wxAuiDockInfoArray(SIP_SSIZE_T sipNrElem)216 static void *array_wxAuiDockInfoArray(SIP_SSIZE_T sipNrElem)
217 {
218 return new ::wxAuiDockInfoArray[sipNrElem];
219 }
220
221
222 extern "C" {static void *copy_wxAuiDockInfoArray(const void *, SIP_SSIZE_T);}
copy_wxAuiDockInfoArray(const void * sipSrc,SIP_SSIZE_T sipSrcIdx)223 static void *copy_wxAuiDockInfoArray(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
224 {
225 return new ::wxAuiDockInfoArray(reinterpret_cast<const ::wxAuiDockInfoArray *>(sipSrc)[sipSrcIdx]);
226 }
227
228
229 extern "C" {static void dealloc_wxAuiDockInfoArray(sipSimpleWrapper *);}
dealloc_wxAuiDockInfoArray(sipSimpleWrapper * sipSelf)230 static void dealloc_wxAuiDockInfoArray(sipSimpleWrapper *sipSelf)
231 {
232 if (sipIsOwnedByPython(sipSelf))
233 {
234 release_wxAuiDockInfoArray(sipGetAddress(sipSelf), 0);
235 }
236 }
237
238
239 extern "C" {static void *init_type_wxAuiDockInfoArray(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxAuiDockInfoArray(sipSimpleWrapper *,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)240 static void *init_type_wxAuiDockInfoArray(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
241 {
242 ::wxAuiDockInfoArray *sipCpp = SIP_NULLPTR;
243
244 {
245 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
246 {
247 Py_BEGIN_ALLOW_THREADS
248 sipCpp = new ::wxAuiDockInfoArray();
249 Py_END_ALLOW_THREADS
250
251 return sipCpp;
252 }
253 }
254
255 {
256 const ::wxAuiDockInfoArray* a0;
257
258 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxAuiDockInfoArray, &a0))
259 {
260 Py_BEGIN_ALLOW_THREADS
261 sipCpp = new ::wxAuiDockInfoArray(*a0);
262 Py_END_ALLOW_THREADS
263
264 return sipCpp;
265 }
266 }
267
268 return SIP_NULLPTR;
269 }
270
271
272 /* Define this type's Python slots. */
273 static sipPySlotDef slots_wxAuiDockInfoArray[] = {
274 {(void *)slot_wxAuiDockInfoArray___contains__, contains_slot},
275 {(void *)slot_wxAuiDockInfoArray___getitem__, getitem_slot},
276 {(void *)slot_wxAuiDockInfoArray___len__, len_slot},
277 {0, (sipPySlotType)0}
278 };
279
280
281 static PyMethodDef methods_wxAuiDockInfoArray[] = {
282 {SIP_MLNAME_CAST(sipName_append), SIP_MLMETH_CAST(meth_wxAuiDockInfoArray_append), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAuiDockInfoArray_append)},
283 {SIP_MLNAME_CAST(sipName_index), SIP_MLMETH_CAST(meth_wxAuiDockInfoArray_index), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAuiDockInfoArray_index)}
284 };
285
286 PyDoc_STRVAR(doc_wxAuiDockInfoArray, "\1AuiDockInfoArray()\n"
287 "AuiDockInfoArray(AuiDockInfoArray)");
288
289
290 sipClassTypeDef sipTypeDef__aui_wxAuiDockInfoArray = {
291 {
292 -1,
293 SIP_NULLPTR,
294 SIP_NULLPTR,
295 SIP_TYPE_CLASS,
296 sipNameNr_wxAuiDockInfoArray,
297 {SIP_NULLPTR},
298 SIP_NULLPTR
299 },
300 {
301 sipNameNr_AuiDockInfoArray,
302 {0, 0, 1},
303 2, methods_wxAuiDockInfoArray,
304 0, SIP_NULLPTR,
305 0, SIP_NULLPTR,
306 {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
307 },
308 doc_wxAuiDockInfoArray,
309 -1,
310 -1,
311 SIP_NULLPTR,
312 slots_wxAuiDockInfoArray,
313 init_type_wxAuiDockInfoArray,
314 SIP_NULLPTR,
315 SIP_NULLPTR,
316 #if PY_MAJOR_VERSION >= 3
317 SIP_NULLPTR,
318 SIP_NULLPTR,
319 #else
320 SIP_NULLPTR,
321 SIP_NULLPTR,
322 SIP_NULLPTR,
323 SIP_NULLPTR,
324 #endif
325 dealloc_wxAuiDockInfoArray,
326 assign_wxAuiDockInfoArray,
327 array_wxAuiDockInfoArray,
328 copy_wxAuiDockInfoArray,
329 release_wxAuiDockInfoArray,
330 SIP_NULLPTR,
331 SIP_NULLPTR,
332 SIP_NULLPTR,
333 SIP_NULLPTR,
334 SIP_NULLPTR,
335 SIP_NULLPTR,
336 SIP_NULLPTR
337 };
338