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/mousestate.h>
13
14 #include <wx/gdicmn.h>
15
16
17 PyDoc_STRVAR(doc_wxMouseState_GetPosition, "GetPosition() -> Point\n"
18 "\n"
19 "Returns the physical mouse position.");
20
21 extern "C" {static PyObject *meth_wxMouseState_GetPosition(PyObject *, PyObject *);}
meth_wxMouseState_GetPosition(PyObject * sipSelf,PyObject * sipArgs)22 static PyObject *meth_wxMouseState_GetPosition(PyObject *sipSelf, PyObject *sipArgs)
23 {
24 PyObject *sipParseErr = SIP_NULLPTR;
25
26 {
27 const ::wxMouseState *sipCpp;
28
29 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMouseState, &sipCpp))
30 {
31 ::wxPoint*sipRes;
32
33 PyErr_Clear();
34
35 Py_BEGIN_ALLOW_THREADS
36 sipRes = new ::wxPoint(sipCpp->GetPosition());
37 Py_END_ALLOW_THREADS
38
39 if (PyErr_Occurred())
40 return 0;
41
42 return sipConvertFromNewType(sipRes,sipType_wxPoint,SIP_NULLPTR);
43 }
44 }
45
46 /* Raise an exception if the arguments couldn't be parsed. */
47 sipNoMethod(sipParseErr, sipName_MouseState, sipName_GetPosition, SIP_NULLPTR);
48
49 return SIP_NULLPTR;
50 }
51
52
53 PyDoc_STRVAR(doc_wxMouseState_GetX, "GetX() -> Coord\n"
54 "\n"
55 "Returns X coordinate of the physical mouse event position.");
56
57 extern "C" {static PyObject *meth_wxMouseState_GetX(PyObject *, PyObject *);}
meth_wxMouseState_GetX(PyObject * sipSelf,PyObject * sipArgs)58 static PyObject *meth_wxMouseState_GetX(PyObject *sipSelf, PyObject *sipArgs)
59 {
60 PyObject *sipParseErr = SIP_NULLPTR;
61
62 {
63 const ::wxMouseState *sipCpp;
64
65 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMouseState, &sipCpp))
66 {
67 ::wxCoord sipRes;
68
69 PyErr_Clear();
70
71 Py_BEGIN_ALLOW_THREADS
72 sipRes = sipCpp->GetX();
73 Py_END_ALLOW_THREADS
74
75 if (PyErr_Occurred())
76 return 0;
77
78 return SIPLong_FromLong(sipRes);
79 }
80 }
81
82 /* Raise an exception if the arguments couldn't be parsed. */
83 sipNoMethod(sipParseErr, sipName_MouseState, sipName_GetX, SIP_NULLPTR);
84
85 return SIP_NULLPTR;
86 }
87
88
89 PyDoc_STRVAR(doc_wxMouseState_GetY, "GetY() -> Coord\n"
90 "\n"
91 "Returns Y coordinate of the physical mouse event position.");
92
93 extern "C" {static PyObject *meth_wxMouseState_GetY(PyObject *, PyObject *);}
meth_wxMouseState_GetY(PyObject * sipSelf,PyObject * sipArgs)94 static PyObject *meth_wxMouseState_GetY(PyObject *sipSelf, PyObject *sipArgs)
95 {
96 PyObject *sipParseErr = SIP_NULLPTR;
97
98 {
99 const ::wxMouseState *sipCpp;
100
101 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMouseState, &sipCpp))
102 {
103 ::wxCoord sipRes;
104
105 PyErr_Clear();
106
107 Py_BEGIN_ALLOW_THREADS
108 sipRes = sipCpp->GetY();
109 Py_END_ALLOW_THREADS
110
111 if (PyErr_Occurred())
112 return 0;
113
114 return SIPLong_FromLong(sipRes);
115 }
116 }
117
118 /* Raise an exception if the arguments couldn't be parsed. */
119 sipNoMethod(sipParseErr, sipName_MouseState, sipName_GetY, SIP_NULLPTR);
120
121 return SIP_NULLPTR;
122 }
123
124
125 PyDoc_STRVAR(doc_wxMouseState_LeftIsDown, "LeftIsDown() -> bool\n"
126 "\n"
127 "Returns true if the left mouse button is currently down.");
128
129 extern "C" {static PyObject *meth_wxMouseState_LeftIsDown(PyObject *, PyObject *);}
meth_wxMouseState_LeftIsDown(PyObject * sipSelf,PyObject * sipArgs)130 static PyObject *meth_wxMouseState_LeftIsDown(PyObject *sipSelf, PyObject *sipArgs)
131 {
132 PyObject *sipParseErr = SIP_NULLPTR;
133
134 {
135 const ::wxMouseState *sipCpp;
136
137 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMouseState, &sipCpp))
138 {
139 bool sipRes;
140
141 PyErr_Clear();
142
143 Py_BEGIN_ALLOW_THREADS
144 sipRes = sipCpp->LeftIsDown();
145 Py_END_ALLOW_THREADS
146
147 if (PyErr_Occurred())
148 return 0;
149
150 return PyBool_FromLong(sipRes);
151 }
152 }
153
154 /* Raise an exception if the arguments couldn't be parsed. */
155 sipNoMethod(sipParseErr, sipName_MouseState, sipName_LeftIsDown, SIP_NULLPTR);
156
157 return SIP_NULLPTR;
158 }
159
160
161 PyDoc_STRVAR(doc_wxMouseState_MiddleIsDown, "MiddleIsDown() -> bool\n"
162 "\n"
163 "Returns true if the middle mouse button is currently down.");
164
165 extern "C" {static PyObject *meth_wxMouseState_MiddleIsDown(PyObject *, PyObject *);}
meth_wxMouseState_MiddleIsDown(PyObject * sipSelf,PyObject * sipArgs)166 static PyObject *meth_wxMouseState_MiddleIsDown(PyObject *sipSelf, PyObject *sipArgs)
167 {
168 PyObject *sipParseErr = SIP_NULLPTR;
169
170 {
171 const ::wxMouseState *sipCpp;
172
173 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMouseState, &sipCpp))
174 {
175 bool sipRes;
176
177 PyErr_Clear();
178
179 Py_BEGIN_ALLOW_THREADS
180 sipRes = sipCpp->MiddleIsDown();
181 Py_END_ALLOW_THREADS
182
183 if (PyErr_Occurred())
184 return 0;
185
186 return PyBool_FromLong(sipRes);
187 }
188 }
189
190 /* Raise an exception if the arguments couldn't be parsed. */
191 sipNoMethod(sipParseErr, sipName_MouseState, sipName_MiddleIsDown, SIP_NULLPTR);
192
193 return SIP_NULLPTR;
194 }
195
196
197 PyDoc_STRVAR(doc_wxMouseState_RightIsDown, "RightIsDown() -> bool\n"
198 "\n"
199 "Returns true if the right mouse button is currently down.");
200
201 extern "C" {static PyObject *meth_wxMouseState_RightIsDown(PyObject *, PyObject *);}
meth_wxMouseState_RightIsDown(PyObject * sipSelf,PyObject * sipArgs)202 static PyObject *meth_wxMouseState_RightIsDown(PyObject *sipSelf, PyObject *sipArgs)
203 {
204 PyObject *sipParseErr = SIP_NULLPTR;
205
206 {
207 const ::wxMouseState *sipCpp;
208
209 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMouseState, &sipCpp))
210 {
211 bool sipRes;
212
213 PyErr_Clear();
214
215 Py_BEGIN_ALLOW_THREADS
216 sipRes = sipCpp->RightIsDown();
217 Py_END_ALLOW_THREADS
218
219 if (PyErr_Occurred())
220 return 0;
221
222 return PyBool_FromLong(sipRes);
223 }
224 }
225
226 /* Raise an exception if the arguments couldn't be parsed. */
227 sipNoMethod(sipParseErr, sipName_MouseState, sipName_RightIsDown, SIP_NULLPTR);
228
229 return SIP_NULLPTR;
230 }
231
232
233 PyDoc_STRVAR(doc_wxMouseState_Aux1IsDown, "Aux1IsDown() -> bool\n"
234 "\n"
235 "Returns true if the first extra button mouse button is currently down.");
236
237 extern "C" {static PyObject *meth_wxMouseState_Aux1IsDown(PyObject *, PyObject *);}
meth_wxMouseState_Aux1IsDown(PyObject * sipSelf,PyObject * sipArgs)238 static PyObject *meth_wxMouseState_Aux1IsDown(PyObject *sipSelf, PyObject *sipArgs)
239 {
240 PyObject *sipParseErr = SIP_NULLPTR;
241
242 {
243 const ::wxMouseState *sipCpp;
244
245 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMouseState, &sipCpp))
246 {
247 bool sipRes;
248
249 PyErr_Clear();
250
251 Py_BEGIN_ALLOW_THREADS
252 sipRes = sipCpp->Aux1IsDown();
253 Py_END_ALLOW_THREADS
254
255 if (PyErr_Occurred())
256 return 0;
257
258 return PyBool_FromLong(sipRes);
259 }
260 }
261
262 /* Raise an exception if the arguments couldn't be parsed. */
263 sipNoMethod(sipParseErr, sipName_MouseState, sipName_Aux1IsDown, SIP_NULLPTR);
264
265 return SIP_NULLPTR;
266 }
267
268
269 PyDoc_STRVAR(doc_wxMouseState_Aux2IsDown, "Aux2IsDown() -> bool\n"
270 "\n"
271 "Returns true if the second extra button mouse button is currently\n"
272 "down.");
273
274 extern "C" {static PyObject *meth_wxMouseState_Aux2IsDown(PyObject *, PyObject *);}
meth_wxMouseState_Aux2IsDown(PyObject * sipSelf,PyObject * sipArgs)275 static PyObject *meth_wxMouseState_Aux2IsDown(PyObject *sipSelf, PyObject *sipArgs)
276 {
277 PyObject *sipParseErr = SIP_NULLPTR;
278
279 {
280 const ::wxMouseState *sipCpp;
281
282 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMouseState, &sipCpp))
283 {
284 bool sipRes;
285
286 PyErr_Clear();
287
288 Py_BEGIN_ALLOW_THREADS
289 sipRes = sipCpp->Aux2IsDown();
290 Py_END_ALLOW_THREADS
291
292 if (PyErr_Occurred())
293 return 0;
294
295 return PyBool_FromLong(sipRes);
296 }
297 }
298
299 /* Raise an exception if the arguments couldn't be parsed. */
300 sipNoMethod(sipParseErr, sipName_MouseState, sipName_Aux2IsDown, SIP_NULLPTR);
301
302 return SIP_NULLPTR;
303 }
304
305
306 PyDoc_STRVAR(doc_wxMouseState_SetX, "SetX(x)");
307
308 extern "C" {static PyObject *meth_wxMouseState_SetX(PyObject *, PyObject *, PyObject *);}
meth_wxMouseState_SetX(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)309 static PyObject *meth_wxMouseState_SetX(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
310 {
311 PyObject *sipParseErr = SIP_NULLPTR;
312
313 {
314 ::wxCoord x;
315 ::wxMouseState *sipCpp;
316
317 static const char *sipKwdList[] = {
318 sipName_x,
319 };
320
321 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxMouseState, &sipCpp, &x))
322 {
323 PyErr_Clear();
324
325 Py_BEGIN_ALLOW_THREADS
326 sipCpp->SetX(x);
327 Py_END_ALLOW_THREADS
328
329 if (PyErr_Occurred())
330 return 0;
331
332 Py_INCREF(Py_None);
333 return Py_None;
334 }
335 }
336
337 /* Raise an exception if the arguments couldn't be parsed. */
338 sipNoMethod(sipParseErr, sipName_MouseState, sipName_SetX, SIP_NULLPTR);
339
340 return SIP_NULLPTR;
341 }
342
343
344 PyDoc_STRVAR(doc_wxMouseState_SetY, "SetY(y)");
345
346 extern "C" {static PyObject *meth_wxMouseState_SetY(PyObject *, PyObject *, PyObject *);}
meth_wxMouseState_SetY(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)347 static PyObject *meth_wxMouseState_SetY(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
348 {
349 PyObject *sipParseErr = SIP_NULLPTR;
350
351 {
352 ::wxCoord y;
353 ::wxMouseState *sipCpp;
354
355 static const char *sipKwdList[] = {
356 sipName_y,
357 };
358
359 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxMouseState, &sipCpp, &y))
360 {
361 PyErr_Clear();
362
363 Py_BEGIN_ALLOW_THREADS
364 sipCpp->SetY(y);
365 Py_END_ALLOW_THREADS
366
367 if (PyErr_Occurred())
368 return 0;
369
370 Py_INCREF(Py_None);
371 return Py_None;
372 }
373 }
374
375 /* Raise an exception if the arguments couldn't be parsed. */
376 sipNoMethod(sipParseErr, sipName_MouseState, sipName_SetY, SIP_NULLPTR);
377
378 return SIP_NULLPTR;
379 }
380
381
382 PyDoc_STRVAR(doc_wxMouseState_SetPosition, "SetPosition(pos)");
383
384 extern "C" {static PyObject *meth_wxMouseState_SetPosition(PyObject *, PyObject *, PyObject *);}
meth_wxMouseState_SetPosition(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)385 static PyObject *meth_wxMouseState_SetPosition(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
386 {
387 PyObject *sipParseErr = SIP_NULLPTR;
388
389 {
390 ::wxPoint* pos;
391 int posState = 0;
392 ::wxMouseState *sipCpp;
393
394 static const char *sipKwdList[] = {
395 sipName_pos,
396 };
397
398 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxMouseState, &sipCpp, sipType_wxPoint, &pos, &posState))
399 {
400 PyErr_Clear();
401
402 Py_BEGIN_ALLOW_THREADS
403 sipCpp->SetPosition(*pos);
404 Py_END_ALLOW_THREADS
405 sipReleaseType(pos,sipType_wxPoint,posState);
406
407 if (PyErr_Occurred())
408 return 0;
409
410 Py_INCREF(Py_None);
411 return Py_None;
412 }
413 }
414
415 /* Raise an exception if the arguments couldn't be parsed. */
416 sipNoMethod(sipParseErr, sipName_MouseState, sipName_SetPosition, SIP_NULLPTR);
417
418 return SIP_NULLPTR;
419 }
420
421
422 PyDoc_STRVAR(doc_wxMouseState_SetLeftDown, "SetLeftDown(down)");
423
424 extern "C" {static PyObject *meth_wxMouseState_SetLeftDown(PyObject *, PyObject *, PyObject *);}
meth_wxMouseState_SetLeftDown(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)425 static PyObject *meth_wxMouseState_SetLeftDown(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
426 {
427 PyObject *sipParseErr = SIP_NULLPTR;
428
429 {
430 bool down;
431 ::wxMouseState *sipCpp;
432
433 static const char *sipKwdList[] = {
434 sipName_down,
435 };
436
437 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bb", &sipSelf, sipType_wxMouseState, &sipCpp, &down))
438 {
439 PyErr_Clear();
440
441 Py_BEGIN_ALLOW_THREADS
442 sipCpp->SetLeftDown(down);
443 Py_END_ALLOW_THREADS
444
445 if (PyErr_Occurred())
446 return 0;
447
448 Py_INCREF(Py_None);
449 return Py_None;
450 }
451 }
452
453 /* Raise an exception if the arguments couldn't be parsed. */
454 sipNoMethod(sipParseErr, sipName_MouseState, sipName_SetLeftDown, SIP_NULLPTR);
455
456 return SIP_NULLPTR;
457 }
458
459
460 PyDoc_STRVAR(doc_wxMouseState_SetMiddleDown, "SetMiddleDown(down)");
461
462 extern "C" {static PyObject *meth_wxMouseState_SetMiddleDown(PyObject *, PyObject *, PyObject *);}
meth_wxMouseState_SetMiddleDown(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)463 static PyObject *meth_wxMouseState_SetMiddleDown(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
464 {
465 PyObject *sipParseErr = SIP_NULLPTR;
466
467 {
468 bool down;
469 ::wxMouseState *sipCpp;
470
471 static const char *sipKwdList[] = {
472 sipName_down,
473 };
474
475 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bb", &sipSelf, sipType_wxMouseState, &sipCpp, &down))
476 {
477 PyErr_Clear();
478
479 Py_BEGIN_ALLOW_THREADS
480 sipCpp->SetMiddleDown(down);
481 Py_END_ALLOW_THREADS
482
483 if (PyErr_Occurred())
484 return 0;
485
486 Py_INCREF(Py_None);
487 return Py_None;
488 }
489 }
490
491 /* Raise an exception if the arguments couldn't be parsed. */
492 sipNoMethod(sipParseErr, sipName_MouseState, sipName_SetMiddleDown, SIP_NULLPTR);
493
494 return SIP_NULLPTR;
495 }
496
497
498 PyDoc_STRVAR(doc_wxMouseState_SetRightDown, "SetRightDown(down)");
499
500 extern "C" {static PyObject *meth_wxMouseState_SetRightDown(PyObject *, PyObject *, PyObject *);}
meth_wxMouseState_SetRightDown(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)501 static PyObject *meth_wxMouseState_SetRightDown(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
502 {
503 PyObject *sipParseErr = SIP_NULLPTR;
504
505 {
506 bool down;
507 ::wxMouseState *sipCpp;
508
509 static const char *sipKwdList[] = {
510 sipName_down,
511 };
512
513 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bb", &sipSelf, sipType_wxMouseState, &sipCpp, &down))
514 {
515 PyErr_Clear();
516
517 Py_BEGIN_ALLOW_THREADS
518 sipCpp->SetRightDown(down);
519 Py_END_ALLOW_THREADS
520
521 if (PyErr_Occurred())
522 return 0;
523
524 Py_INCREF(Py_None);
525 return Py_None;
526 }
527 }
528
529 /* Raise an exception if the arguments couldn't be parsed. */
530 sipNoMethod(sipParseErr, sipName_MouseState, sipName_SetRightDown, SIP_NULLPTR);
531
532 return SIP_NULLPTR;
533 }
534
535
536 PyDoc_STRVAR(doc_wxMouseState_SetAux1Down, "SetAux1Down(down)");
537
538 extern "C" {static PyObject *meth_wxMouseState_SetAux1Down(PyObject *, PyObject *, PyObject *);}
meth_wxMouseState_SetAux1Down(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)539 static PyObject *meth_wxMouseState_SetAux1Down(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
540 {
541 PyObject *sipParseErr = SIP_NULLPTR;
542
543 {
544 bool down;
545 ::wxMouseState *sipCpp;
546
547 static const char *sipKwdList[] = {
548 sipName_down,
549 };
550
551 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bb", &sipSelf, sipType_wxMouseState, &sipCpp, &down))
552 {
553 PyErr_Clear();
554
555 Py_BEGIN_ALLOW_THREADS
556 sipCpp->SetAux1Down(down);
557 Py_END_ALLOW_THREADS
558
559 if (PyErr_Occurred())
560 return 0;
561
562 Py_INCREF(Py_None);
563 return Py_None;
564 }
565 }
566
567 /* Raise an exception if the arguments couldn't be parsed. */
568 sipNoMethod(sipParseErr, sipName_MouseState, sipName_SetAux1Down, SIP_NULLPTR);
569
570 return SIP_NULLPTR;
571 }
572
573
574 PyDoc_STRVAR(doc_wxMouseState_SetAux2Down, "SetAux2Down(down)");
575
576 extern "C" {static PyObject *meth_wxMouseState_SetAux2Down(PyObject *, PyObject *, PyObject *);}
meth_wxMouseState_SetAux2Down(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)577 static PyObject *meth_wxMouseState_SetAux2Down(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
578 {
579 PyObject *sipParseErr = SIP_NULLPTR;
580
581 {
582 bool down;
583 ::wxMouseState *sipCpp;
584
585 static const char *sipKwdList[] = {
586 sipName_down,
587 };
588
589 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bb", &sipSelf, sipType_wxMouseState, &sipCpp, &down))
590 {
591 PyErr_Clear();
592
593 Py_BEGIN_ALLOW_THREADS
594 sipCpp->SetAux2Down(down);
595 Py_END_ALLOW_THREADS
596
597 if (PyErr_Occurred())
598 return 0;
599
600 Py_INCREF(Py_None);
601 return Py_None;
602 }
603 }
604
605 /* Raise an exception if the arguments couldn't be parsed. */
606 sipNoMethod(sipParseErr, sipName_MouseState, sipName_SetAux2Down, SIP_NULLPTR);
607
608 return SIP_NULLPTR;
609 }
610
611
612 PyDoc_STRVAR(doc_wxMouseState_SetState, "SetState(state)");
613
614 extern "C" {static PyObject *meth_wxMouseState_SetState(PyObject *, PyObject *, PyObject *);}
meth_wxMouseState_SetState(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)615 static PyObject *meth_wxMouseState_SetState(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
616 {
617 PyObject *sipParseErr = SIP_NULLPTR;
618
619 {
620 const ::wxMouseState* state;
621 ::wxMouseState *sipCpp;
622
623 static const char *sipKwdList[] = {
624 sipName_state,
625 };
626
627 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxMouseState, &sipCpp, sipType_wxMouseState, &state))
628 {
629 PyErr_Clear();
630
631 Py_BEGIN_ALLOW_THREADS
632 sipCpp->SetState(*state);
633 Py_END_ALLOW_THREADS
634
635 if (PyErr_Occurred())
636 return 0;
637
638 Py_INCREF(Py_None);
639 return Py_None;
640 }
641 }
642
643 /* Raise an exception if the arguments couldn't be parsed. */
644 sipNoMethod(sipParseErr, sipName_MouseState, sipName_SetState, SIP_NULLPTR);
645
646 return SIP_NULLPTR;
647 }
648
649
650 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
651 extern "C" {static void *cast_wxMouseState(void *, const sipTypeDef *);}
cast_wxMouseState(void * sipCppV,const sipTypeDef * targetType)652 static void *cast_wxMouseState(void *sipCppV, const sipTypeDef *targetType)
653 {
654 ::wxMouseState *sipCpp = reinterpret_cast< ::wxMouseState *>(sipCppV);
655
656 if (targetType == sipType_wxKeyboardState)
657 return static_cast< ::wxKeyboardState *>(sipCpp);
658
659 return sipCppV;
660 }
661
662
663 /* Call the instance's destructor. */
664 extern "C" {static void release_wxMouseState(void *, int);}
release_wxMouseState(void * sipCppV,int)665 static void release_wxMouseState(void *sipCppV, int)
666 {
667 Py_BEGIN_ALLOW_THREADS
668
669 delete reinterpret_cast< ::wxMouseState *>(sipCppV);
670
671 Py_END_ALLOW_THREADS
672 }
673
674
675 extern "C" {static void assign_wxMouseState(void *, SIP_SSIZE_T, void *);}
assign_wxMouseState(void * sipDst,SIP_SSIZE_T sipDstIdx,void * sipSrc)676 static void assign_wxMouseState(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
677 {
678 reinterpret_cast< ::wxMouseState *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxMouseState *>(sipSrc);
679 }
680
681
682 extern "C" {static void *array_wxMouseState(SIP_SSIZE_T);}
array_wxMouseState(SIP_SSIZE_T sipNrElem)683 static void *array_wxMouseState(SIP_SSIZE_T sipNrElem)
684 {
685 return new ::wxMouseState[sipNrElem];
686 }
687
688
689 extern "C" {static void *copy_wxMouseState(const void *, SIP_SSIZE_T);}
copy_wxMouseState(const void * sipSrc,SIP_SSIZE_T sipSrcIdx)690 static void *copy_wxMouseState(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
691 {
692 return new ::wxMouseState(reinterpret_cast<const ::wxMouseState *>(sipSrc)[sipSrcIdx]);
693 }
694
695
696 extern "C" {static void dealloc_wxMouseState(sipSimpleWrapper *);}
dealloc_wxMouseState(sipSimpleWrapper * sipSelf)697 static void dealloc_wxMouseState(sipSimpleWrapper *sipSelf)
698 {
699 if (sipIsOwnedByPython(sipSelf))
700 {
701 release_wxMouseState(sipGetAddress(sipSelf), 0);
702 }
703 }
704
705
706 extern "C" {static void *init_type_wxMouseState(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxMouseState(sipSimpleWrapper *,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)707 static void *init_type_wxMouseState(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
708 {
709 ::wxMouseState *sipCpp = SIP_NULLPTR;
710
711 {
712 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
713 {
714 PyErr_Clear();
715
716 Py_BEGIN_ALLOW_THREADS
717 sipCpp = new ::wxMouseState();
718 Py_END_ALLOW_THREADS
719
720 if (PyErr_Occurred())
721 {
722 delete sipCpp;
723 return SIP_NULLPTR;
724 }
725
726 return sipCpp;
727 }
728 }
729
730 {
731 const ::wxMouseState* a0;
732
733 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxMouseState, &a0))
734 {
735 Py_BEGIN_ALLOW_THREADS
736 sipCpp = new ::wxMouseState(*a0);
737 Py_END_ALLOW_THREADS
738
739 return sipCpp;
740 }
741 }
742
743 return SIP_NULLPTR;
744 }
745
746
747 /* Define this type's super-types. */
748 static sipEncodedTypeDef supers_wxMouseState[] = {{278, 255, 1}};
749
750
751 static PyMethodDef methods_wxMouseState[] = {
752 {SIP_MLNAME_CAST(sipName_Aux1IsDown), meth_wxMouseState_Aux1IsDown, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMouseState_Aux1IsDown)},
753 {SIP_MLNAME_CAST(sipName_Aux2IsDown), meth_wxMouseState_Aux2IsDown, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMouseState_Aux2IsDown)},
754 {SIP_MLNAME_CAST(sipName_GetPosition), meth_wxMouseState_GetPosition, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMouseState_GetPosition)},
755 {SIP_MLNAME_CAST(sipName_GetX), meth_wxMouseState_GetX, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMouseState_GetX)},
756 {SIP_MLNAME_CAST(sipName_GetY), meth_wxMouseState_GetY, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMouseState_GetY)},
757 {SIP_MLNAME_CAST(sipName_LeftIsDown), meth_wxMouseState_LeftIsDown, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMouseState_LeftIsDown)},
758 {SIP_MLNAME_CAST(sipName_MiddleIsDown), meth_wxMouseState_MiddleIsDown, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMouseState_MiddleIsDown)},
759 {SIP_MLNAME_CAST(sipName_RightIsDown), meth_wxMouseState_RightIsDown, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMouseState_RightIsDown)},
760 {SIP_MLNAME_CAST(sipName_SetAux1Down), SIP_MLMETH_CAST(meth_wxMouseState_SetAux1Down), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseState_SetAux1Down)},
761 {SIP_MLNAME_CAST(sipName_SetAux2Down), SIP_MLMETH_CAST(meth_wxMouseState_SetAux2Down), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseState_SetAux2Down)},
762 {SIP_MLNAME_CAST(sipName_SetLeftDown), SIP_MLMETH_CAST(meth_wxMouseState_SetLeftDown), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseState_SetLeftDown)},
763 {SIP_MLNAME_CAST(sipName_SetMiddleDown), SIP_MLMETH_CAST(meth_wxMouseState_SetMiddleDown), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseState_SetMiddleDown)},
764 {SIP_MLNAME_CAST(sipName_SetPosition), SIP_MLMETH_CAST(meth_wxMouseState_SetPosition), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseState_SetPosition)},
765 {SIP_MLNAME_CAST(sipName_SetRightDown), SIP_MLMETH_CAST(meth_wxMouseState_SetRightDown), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseState_SetRightDown)},
766 {SIP_MLNAME_CAST(sipName_SetState), SIP_MLMETH_CAST(meth_wxMouseState_SetState), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseState_SetState)},
767 {SIP_MLNAME_CAST(sipName_SetX), SIP_MLMETH_CAST(meth_wxMouseState_SetX), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseState_SetX)},
768 {SIP_MLNAME_CAST(sipName_SetY), SIP_MLMETH_CAST(meth_wxMouseState_SetY), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseState_SetY)}
769 };
770
771 sipVariableDef variables_wxMouseState[] = {
772 {PropertyVariable, sipName_Position, &methods_wxMouseState[2], &methods_wxMouseState[12], SIP_NULLPTR, SIP_NULLPTR},
773 {PropertyVariable, sipName_aux2IsDown, &methods_wxMouseState[1], &methods_wxMouseState[9], SIP_NULLPTR, SIP_NULLPTR},
774 {PropertyVariable, sipName_aux1IsDown, &methods_wxMouseState[0], &methods_wxMouseState[8], SIP_NULLPTR, SIP_NULLPTR},
775 {PropertyVariable, sipName_rightIsDown, &methods_wxMouseState[7], &methods_wxMouseState[13], SIP_NULLPTR, SIP_NULLPTR},
776 {PropertyVariable, sipName_middleIsDown, &methods_wxMouseState[6], &methods_wxMouseState[11], SIP_NULLPTR, SIP_NULLPTR},
777 {PropertyVariable, sipName_leftIsDown, &methods_wxMouseState[5], &methods_wxMouseState[10], SIP_NULLPTR, SIP_NULLPTR},
778 {PropertyVariable, sipName_Y, &methods_wxMouseState[4], &methods_wxMouseState[16], SIP_NULLPTR, SIP_NULLPTR},
779 {PropertyVariable, sipName_X, &methods_wxMouseState[3], &methods_wxMouseState[15], SIP_NULLPTR, SIP_NULLPTR},
780 {PropertyVariable, sipName_y, &methods_wxMouseState[4], &methods_wxMouseState[16], SIP_NULLPTR, SIP_NULLPTR},
781 {PropertyVariable, sipName_x, &methods_wxMouseState[3], &methods_wxMouseState[15], SIP_NULLPTR, SIP_NULLPTR},
782 };
783
784 PyDoc_STRVAR(doc_wxMouseState, "MouseState()\n"
785 "\n"
786 "Represents the mouse state.");
787
788
789 sipClassTypeDef sipTypeDef__core_wxMouseState = {
790 {
791 -1,
792 SIP_NULLPTR,
793 SIP_NULLPTR,
794 SIP_TYPE_CLASS,
795 sipNameNr_wxMouseState,
796 {SIP_NULLPTR},
797 SIP_NULLPTR
798 },
799 {
800 sipNameNr_MouseState,
801 {0, 0, 1},
802 17, methods_wxMouseState,
803 0, SIP_NULLPTR,
804 10, variables_wxMouseState,
805 {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
806 },
807 doc_wxMouseState,
808 -1,
809 -1,
810 supers_wxMouseState,
811 SIP_NULLPTR,
812 init_type_wxMouseState,
813 SIP_NULLPTR,
814 SIP_NULLPTR,
815 #if PY_MAJOR_VERSION >= 3
816 SIP_NULLPTR,
817 SIP_NULLPTR,
818 #else
819 SIP_NULLPTR,
820 SIP_NULLPTR,
821 SIP_NULLPTR,
822 SIP_NULLPTR,
823 #endif
824 dealloc_wxMouseState,
825 assign_wxMouseState,
826 array_wxMouseState,
827 copy_wxMouseState,
828 release_wxMouseState,
829 cast_wxMouseState,
830 SIP_NULLPTR,
831 SIP_NULLPTR,
832 SIP_NULLPTR,
833 SIP_NULLPTR,
834 SIP_NULLPTR,
835 SIP_NULLPTR
836 };
837