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/dnd.h>
13 
14         #include <wx/dataobj.h>
15 
16 
17 class sipwxDropTarget : public  ::wxDropTarget
18 {
19 public:
20     sipwxDropTarget( ::wxDataObject*);
21     virtual ~sipwxDropTarget();
22 
23     /*
24      * There is a protected method for every virtual method visible from
25      * this class.
26      */
27 protected:
28     void OnLeave() SIP_OVERRIDE;
29      ::wxDragResult OnEnter( ::wxCoord, ::wxCoord, ::wxDragResult) SIP_OVERRIDE;
30     bool OnDrop( ::wxCoord, ::wxCoord) SIP_OVERRIDE;
31      ::wxDragResult OnDragOver( ::wxCoord, ::wxCoord, ::wxDragResult) SIP_OVERRIDE;
32      ::wxDragResult OnData( ::wxCoord, ::wxCoord, ::wxDragResult) SIP_OVERRIDE;
33     bool GetData() SIP_OVERRIDE;
34 
35 public:
36     sipSimpleWrapper *sipPySelf;
37 
38 private:
39     sipwxDropTarget(const sipwxDropTarget &);
40     sipwxDropTarget &operator = (const sipwxDropTarget &);
41 
42     char sipPyMethods[6];
43 };
44 
sipwxDropTarget(::wxDataObject * data)45 sipwxDropTarget::sipwxDropTarget( ::wxDataObject*data):  ::wxDropTarget(data), sipPySelf(SIP_NULLPTR)
46 {
47     memset(sipPyMethods, 0, sizeof (sipPyMethods));
48 }
49 
~sipwxDropTarget()50 sipwxDropTarget::~sipwxDropTarget()
51 {
52     sipInstanceDestroyedEx(&sipPySelf);
53 }
54 
OnLeave()55 void sipwxDropTarget::OnLeave()
56 {
57     sip_gilstate_t sipGILState;
58     PyObject *sipMeth;
59 
60     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,SIP_NULLPTR,sipName_OnLeave);
61 
62     if (!sipMeth)
63     {
64          ::wxDropTarget::OnLeave();
65         return;
66     }
67 
68     extern void sipVH__core_45(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
69 
70     sipVH__core_45(sipGILState, 0, sipPySelf, sipMeth);
71 }
72 
OnEnter(::wxCoord x,::wxCoord y,::wxDragResult defResult)73  ::wxDragResult sipwxDropTarget::OnEnter( ::wxCoord x, ::wxCoord y, ::wxDragResult defResult)
74 {
75     sip_gilstate_t sipGILState;
76     PyObject *sipMeth;
77 
78     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,SIP_NULLPTR,sipName_OnEnter);
79 
80     if (!sipMeth)
81         return  ::wxDropTarget::OnEnter(x,y,defResult);
82 
83     extern  ::wxDragResult sipVH__core_77(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxCoord, ::wxCoord, ::wxDragResult);
84 
85     return sipVH__core_77(sipGILState, 0, sipPySelf, sipMeth, x, y, defResult);
86 }
87 
OnDrop(::wxCoord x,::wxCoord y)88 bool sipwxDropTarget::OnDrop( ::wxCoord x, ::wxCoord y)
89 {
90     sip_gilstate_t sipGILState;
91     PyObject *sipMeth;
92 
93     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,SIP_NULLPTR,sipName_OnDrop);
94 
95     if (!sipMeth)
96         return  ::wxDropTarget::OnDrop(x,y);
97 
98     extern bool sipVH__core_78(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxCoord, ::wxCoord);
99 
100     return sipVH__core_78(sipGILState, 0, sipPySelf, sipMeth, x, y);
101 }
102 
OnDragOver(::wxCoord x,::wxCoord y,::wxDragResult defResult)103  ::wxDragResult sipwxDropTarget::OnDragOver( ::wxCoord x, ::wxCoord y, ::wxDragResult defResult)
104 {
105     sip_gilstate_t sipGILState;
106     PyObject *sipMeth;
107 
108     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,SIP_NULLPTR,sipName_OnDragOver);
109 
110     if (!sipMeth)
111         return  ::wxDropTarget::OnDragOver(x,y,defResult);
112 
113     extern  ::wxDragResult sipVH__core_77(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxCoord, ::wxCoord, ::wxDragResult);
114 
115     return sipVH__core_77(sipGILState, 0, sipPySelf, sipMeth, x, y, defResult);
116 }
117 
OnData(::wxCoord x,::wxCoord y,::wxDragResult defResult)118  ::wxDragResult sipwxDropTarget::OnData( ::wxCoord x, ::wxCoord y, ::wxDragResult defResult)
119 {
120     sip_gilstate_t sipGILState;
121     PyObject *sipMeth;
122 
123     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[4],sipPySelf,sipName_DropTarget,sipName_OnData);
124 
125     if (!sipMeth)
126         return ::wxDragError;
127 
128     extern  ::wxDragResult sipVH__core_77(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxCoord, ::wxCoord, ::wxDragResult);
129 
130     return sipVH__core_77(sipGILState, 0, sipPySelf, sipMeth, x, y, defResult);
131 }
132 
GetData()133 bool sipwxDropTarget::GetData()
134 {
135     sip_gilstate_t sipGILState;
136     PyObject *sipMeth;
137 
138     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[5],sipPySelf,SIP_NULLPTR,sipName_GetData);
139 
140     if (!sipMeth)
141         return  ::wxDropTarget::GetData();
142 
143     extern bool sipVH__core_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
144 
145     return sipVH__core_6(sipGILState, 0, sipPySelf, sipMeth);
146 }
147 
148 
149 PyDoc_STRVAR(doc_wxDropTarget_GetData, "GetData() -> bool\n"
150 "\n"
151 "This method may only be called from within OnData().");
152 
153 extern "C" {static PyObject *meth_wxDropTarget_GetData(PyObject *, PyObject *);}
meth_wxDropTarget_GetData(PyObject * sipSelf,PyObject * sipArgs)154 static PyObject *meth_wxDropTarget_GetData(PyObject *sipSelf, PyObject *sipArgs)
155 {
156     PyObject *sipParseErr = SIP_NULLPTR;
157     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
158 
159     {
160          ::wxDropTarget *sipCpp;
161 
162         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDropTarget, &sipCpp))
163         {
164             bool sipRes;
165 
166             PyErr_Clear();
167 
168             Py_BEGIN_ALLOW_THREADS
169             sipRes = (sipSelfWasArg ? sipCpp-> ::wxDropTarget::GetData() : sipCpp->GetData());
170             Py_END_ALLOW_THREADS
171 
172             if (PyErr_Occurred())
173                 return 0;
174 
175             return PyBool_FromLong(sipRes);
176         }
177     }
178 
179     /* Raise an exception if the arguments couldn't be parsed. */
180     sipNoMethod(sipParseErr, sipName_DropTarget, sipName_GetData, SIP_NULLPTR);
181 
182     return SIP_NULLPTR;
183 }
184 
185 
186 PyDoc_STRVAR(doc_wxDropTarget_OnData, "OnData(x, y, defResult) -> DragResult\n"
187 "\n"
188 "Called after OnDrop() returns true.");
189 
190 extern "C" {static PyObject *meth_wxDropTarget_OnData(PyObject *, PyObject *, PyObject *);}
meth_wxDropTarget_OnData(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)191 static PyObject *meth_wxDropTarget_OnData(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
192 {
193     PyObject *sipParseErr = SIP_NULLPTR;
194     PyObject *sipOrigSelf = sipSelf;
195 
196     {
197          ::wxCoord x;
198          ::wxCoord y;
199          ::wxDragResult defResult;
200          ::wxDropTarget *sipCpp;
201 
202         static const char *sipKwdList[] = {
203             sipName_x,
204             sipName_y,
205             sipName_defResult,
206         };
207 
208         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiE", &sipSelf, sipType_wxDropTarget, &sipCpp, &x, &y, sipType_wxDragResult, &defResult))
209         {
210              ::wxDragResult sipRes;
211 
212             if (!sipOrigSelf)
213             {
214                 sipAbstractMethod(sipName_DropTarget, sipName_OnData);
215                 return SIP_NULLPTR;
216             }
217 
218             PyErr_Clear();
219 
220             Py_BEGIN_ALLOW_THREADS
221             sipRes = sipCpp->OnData(x,y,defResult);
222             Py_END_ALLOW_THREADS
223 
224             if (PyErr_Occurred())
225                 return 0;
226 
227             return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxDragResult);
228         }
229     }
230 
231     /* Raise an exception if the arguments couldn't be parsed. */
232     sipNoMethod(sipParseErr, sipName_DropTarget, sipName_OnData, SIP_NULLPTR);
233 
234     return SIP_NULLPTR;
235 }
236 
237 
238 PyDoc_STRVAR(doc_wxDropTarget_OnDragOver, "OnDragOver(x, y, defResult) -> DragResult\n"
239 "\n"
240 "Called when the mouse is being dragged over the drop target.");
241 
242 extern "C" {static PyObject *meth_wxDropTarget_OnDragOver(PyObject *, PyObject *, PyObject *);}
meth_wxDropTarget_OnDragOver(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)243 static PyObject *meth_wxDropTarget_OnDragOver(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
244 {
245     PyObject *sipParseErr = SIP_NULLPTR;
246     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
247 
248     {
249          ::wxCoord x;
250          ::wxCoord y;
251          ::wxDragResult defResult;
252          ::wxDropTarget *sipCpp;
253 
254         static const char *sipKwdList[] = {
255             sipName_x,
256             sipName_y,
257             sipName_defResult,
258         };
259 
260         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiE", &sipSelf, sipType_wxDropTarget, &sipCpp, &x, &y, sipType_wxDragResult, &defResult))
261         {
262              ::wxDragResult sipRes;
263 
264             PyErr_Clear();
265 
266             Py_BEGIN_ALLOW_THREADS
267             sipRes = (sipSelfWasArg ? sipCpp-> ::wxDropTarget::OnDragOver(x,y,defResult) : sipCpp->OnDragOver(x,y,defResult));
268             Py_END_ALLOW_THREADS
269 
270             if (PyErr_Occurred())
271                 return 0;
272 
273             return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxDragResult);
274         }
275     }
276 
277     /* Raise an exception if the arguments couldn't be parsed. */
278     sipNoMethod(sipParseErr, sipName_DropTarget, sipName_OnDragOver, SIP_NULLPTR);
279 
280     return SIP_NULLPTR;
281 }
282 
283 
284 PyDoc_STRVAR(doc_wxDropTarget_OnDrop, "OnDrop(x, y) -> bool\n"
285 "\n"
286 "Called when the user drops a data object on the target.");
287 
288 extern "C" {static PyObject *meth_wxDropTarget_OnDrop(PyObject *, PyObject *, PyObject *);}
meth_wxDropTarget_OnDrop(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)289 static PyObject *meth_wxDropTarget_OnDrop(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
290 {
291     PyObject *sipParseErr = SIP_NULLPTR;
292     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
293 
294     {
295          ::wxCoord x;
296          ::wxCoord y;
297          ::wxDropTarget *sipCpp;
298 
299         static const char *sipKwdList[] = {
300             sipName_x,
301             sipName_y,
302         };
303 
304         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bii", &sipSelf, sipType_wxDropTarget, &sipCpp, &x, &y))
305         {
306             bool sipRes;
307 
308             PyErr_Clear();
309 
310             Py_BEGIN_ALLOW_THREADS
311             sipRes = (sipSelfWasArg ? sipCpp-> ::wxDropTarget::OnDrop(x,y) : sipCpp->OnDrop(x,y));
312             Py_END_ALLOW_THREADS
313 
314             if (PyErr_Occurred())
315                 return 0;
316 
317             return PyBool_FromLong(sipRes);
318         }
319     }
320 
321     /* Raise an exception if the arguments couldn't be parsed. */
322     sipNoMethod(sipParseErr, sipName_DropTarget, sipName_OnDrop, SIP_NULLPTR);
323 
324     return SIP_NULLPTR;
325 }
326 
327 
328 PyDoc_STRVAR(doc_wxDropTarget_OnEnter, "OnEnter(x, y, defResult) -> DragResult\n"
329 "\n"
330 "Called when the mouse enters the drop target.");
331 
332 extern "C" {static PyObject *meth_wxDropTarget_OnEnter(PyObject *, PyObject *, PyObject *);}
meth_wxDropTarget_OnEnter(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)333 static PyObject *meth_wxDropTarget_OnEnter(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
334 {
335     PyObject *sipParseErr = SIP_NULLPTR;
336     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
337 
338     {
339          ::wxCoord x;
340          ::wxCoord y;
341          ::wxDragResult defResult;
342          ::wxDropTarget *sipCpp;
343 
344         static const char *sipKwdList[] = {
345             sipName_x,
346             sipName_y,
347             sipName_defResult,
348         };
349 
350         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiE", &sipSelf, sipType_wxDropTarget, &sipCpp, &x, &y, sipType_wxDragResult, &defResult))
351         {
352              ::wxDragResult sipRes;
353 
354             PyErr_Clear();
355 
356             Py_BEGIN_ALLOW_THREADS
357             sipRes = (sipSelfWasArg ? sipCpp-> ::wxDropTarget::OnEnter(x,y,defResult) : sipCpp->OnEnter(x,y,defResult));
358             Py_END_ALLOW_THREADS
359 
360             if (PyErr_Occurred())
361                 return 0;
362 
363             return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxDragResult);
364         }
365     }
366 
367     /* Raise an exception if the arguments couldn't be parsed. */
368     sipNoMethod(sipParseErr, sipName_DropTarget, sipName_OnEnter, SIP_NULLPTR);
369 
370     return SIP_NULLPTR;
371 }
372 
373 
374 PyDoc_STRVAR(doc_wxDropTarget_OnLeave, "OnLeave()\n"
375 "\n"
376 "Called when the mouse leaves the drop target.");
377 
378 extern "C" {static PyObject *meth_wxDropTarget_OnLeave(PyObject *, PyObject *);}
meth_wxDropTarget_OnLeave(PyObject * sipSelf,PyObject * sipArgs)379 static PyObject *meth_wxDropTarget_OnLeave(PyObject *sipSelf, PyObject *sipArgs)
380 {
381     PyObject *sipParseErr = SIP_NULLPTR;
382     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
383 
384     {
385          ::wxDropTarget *sipCpp;
386 
387         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDropTarget, &sipCpp))
388         {
389             PyErr_Clear();
390 
391             Py_BEGIN_ALLOW_THREADS
392             (sipSelfWasArg ? sipCpp-> ::wxDropTarget::OnLeave() : sipCpp->OnLeave());
393             Py_END_ALLOW_THREADS
394 
395             if (PyErr_Occurred())
396                 return 0;
397 
398             Py_INCREF(Py_None);
399             return Py_None;
400         }
401     }
402 
403     /* Raise an exception if the arguments couldn't be parsed. */
404     sipNoMethod(sipParseErr, sipName_DropTarget, sipName_OnLeave, SIP_NULLPTR);
405 
406     return SIP_NULLPTR;
407 }
408 
409 
410 PyDoc_STRVAR(doc_wxDropTarget_GetDataObject, "GetDataObject() -> DataObject\n"
411 "\n"
412 "Returns the data wxDataObject associated with the drop target.");
413 
414 extern "C" {static PyObject *meth_wxDropTarget_GetDataObject(PyObject *, PyObject *);}
meth_wxDropTarget_GetDataObject(PyObject * sipSelf,PyObject * sipArgs)415 static PyObject *meth_wxDropTarget_GetDataObject(PyObject *sipSelf, PyObject *sipArgs)
416 {
417     PyObject *sipParseErr = SIP_NULLPTR;
418 
419     {
420         const  ::wxDropTarget *sipCpp;
421 
422         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDropTarget, &sipCpp))
423         {
424              ::wxDataObject*sipRes;
425 
426             PyErr_Clear();
427 
428             Py_BEGIN_ALLOW_THREADS
429             sipRes = sipCpp->GetDataObject();
430             Py_END_ALLOW_THREADS
431 
432             if (PyErr_Occurred())
433                 return 0;
434 
435             return sipConvertFromType(sipRes,sipType_wxDataObject,SIP_NULLPTR);
436         }
437     }
438 
439     /* Raise an exception if the arguments couldn't be parsed. */
440     sipNoMethod(sipParseErr, sipName_DropTarget, sipName_GetDataObject, SIP_NULLPTR);
441 
442     return SIP_NULLPTR;
443 }
444 
445 
446 PyDoc_STRVAR(doc_wxDropTarget_SetDataObject, "SetDataObject(data)\n"
447 "\n"
448 "Sets the data wxDataObject associated with the drop target and deletes\n"
449 "any previously associated data object.");
450 
451 extern "C" {static PyObject *meth_wxDropTarget_SetDataObject(PyObject *, PyObject *, PyObject *);}
meth_wxDropTarget_SetDataObject(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)452 static PyObject *meth_wxDropTarget_SetDataObject(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
453 {
454     PyObject *sipParseErr = SIP_NULLPTR;
455 
456     {
457          ::wxDataObject* data;
458          ::wxDropTarget *sipCpp;
459 
460         static const char *sipKwdList[] = {
461             sipName_data,
462         };
463 
464         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ:", &sipSelf, sipType_wxDropTarget, &sipCpp, sipType_wxDataObject, &data))
465         {
466             PyErr_Clear();
467 
468             Py_BEGIN_ALLOW_THREADS
469             sipCpp->SetDataObject(data);
470             Py_END_ALLOW_THREADS
471 
472             if (PyErr_Occurred())
473                 return 0;
474 
475             Py_INCREF(Py_None);
476             return Py_None;
477         }
478     }
479 
480     /* Raise an exception if the arguments couldn't be parsed. */
481     sipNoMethod(sipParseErr, sipName_DropTarget, sipName_SetDataObject, SIP_NULLPTR);
482 
483     return SIP_NULLPTR;
484 }
485 
486 
487 PyDoc_STRVAR(doc_wxDropTarget_SetDefaultAction, "SetDefaultAction(action)\n"
488 "\n"
489 "Sets the default action for drag and drop.");
490 
491 extern "C" {static PyObject *meth_wxDropTarget_SetDefaultAction(PyObject *, PyObject *, PyObject *);}
meth_wxDropTarget_SetDefaultAction(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)492 static PyObject *meth_wxDropTarget_SetDefaultAction(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
493 {
494     PyObject *sipParseErr = SIP_NULLPTR;
495 
496     {
497          ::wxDragResult action;
498          ::wxDropTarget *sipCpp;
499 
500         static const char *sipKwdList[] = {
501             sipName_action,
502         };
503 
504         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BE", &sipSelf, sipType_wxDropTarget, &sipCpp, sipType_wxDragResult, &action))
505         {
506             PyErr_Clear();
507 
508             Py_BEGIN_ALLOW_THREADS
509             sipCpp->SetDefaultAction(action);
510             Py_END_ALLOW_THREADS
511 
512             if (PyErr_Occurred())
513                 return 0;
514 
515             Py_INCREF(Py_None);
516             return Py_None;
517         }
518     }
519 
520     /* Raise an exception if the arguments couldn't be parsed. */
521     sipNoMethod(sipParseErr, sipName_DropTarget, sipName_SetDefaultAction, SIP_NULLPTR);
522 
523     return SIP_NULLPTR;
524 }
525 
526 
527 PyDoc_STRVAR(doc_wxDropTarget_GetDefaultAction, "GetDefaultAction() -> DragResult\n"
528 "\n"
529 "Returns default action for drag and drop or wxDragNone if this not\n"
530 "specified.");
531 
532 extern "C" {static PyObject *meth_wxDropTarget_GetDefaultAction(PyObject *, PyObject *);}
meth_wxDropTarget_GetDefaultAction(PyObject * sipSelf,PyObject * sipArgs)533 static PyObject *meth_wxDropTarget_GetDefaultAction(PyObject *sipSelf, PyObject *sipArgs)
534 {
535     PyObject *sipParseErr = SIP_NULLPTR;
536 
537     {
538          ::wxDropTarget *sipCpp;
539 
540         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDropTarget, &sipCpp))
541         {
542              ::wxDragResult sipRes;
543 
544             PyErr_Clear();
545 
546             Py_BEGIN_ALLOW_THREADS
547             sipRes = sipCpp->GetDefaultAction();
548             Py_END_ALLOW_THREADS
549 
550             if (PyErr_Occurred())
551                 return 0;
552 
553             return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxDragResult);
554         }
555     }
556 
557     /* Raise an exception if the arguments couldn't be parsed. */
558     sipNoMethod(sipParseErr, sipName_DropTarget, sipName_GetDefaultAction, SIP_NULLPTR);
559 
560     return SIP_NULLPTR;
561 }
562 
563 
564 /* Call the instance's destructor. */
565 extern "C" {static void release_wxDropTarget(void *, int);}
release_wxDropTarget(void * sipCppV,int sipState)566 static void release_wxDropTarget(void *sipCppV, int sipState)
567 {
568     Py_BEGIN_ALLOW_THREADS
569 
570     if (sipState & SIP_DERIVED_CLASS)
571         delete reinterpret_cast<sipwxDropTarget *>(sipCppV);
572     else
573         delete reinterpret_cast< ::wxDropTarget *>(sipCppV);
574 
575     Py_END_ALLOW_THREADS
576 }
577 
578 
579 extern "C" {static void dealloc_wxDropTarget(sipSimpleWrapper *);}
dealloc_wxDropTarget(sipSimpleWrapper * sipSelf)580 static void dealloc_wxDropTarget(sipSimpleWrapper *sipSelf)
581 {
582     if (sipIsDerivedClass(sipSelf))
583         reinterpret_cast<sipwxDropTarget *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
584 
585     if (sipIsOwnedByPython(sipSelf))
586     {
587         release_wxDropTarget(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
588     }
589 }
590 
591 
592 extern "C" {static void *init_type_wxDropTarget(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxDropTarget(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)593 static void *init_type_wxDropTarget(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
594 {
595     sipwxDropTarget *sipCpp = SIP_NULLPTR;
596 
597     {
598          ::wxDataObject* data = 0;
599         PyObject *dataWrapper = 0;
600 
601         static const char *sipKwdList[] = {
602             sipName_data,
603         };
604 
605         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|@J8", &dataWrapper, sipType_wxDataObject, &data))
606         {
607             PyErr_Clear();
608 
609             Py_BEGIN_ALLOW_THREADS
610             sipCpp = new sipwxDropTarget(data);
611             Py_END_ALLOW_THREADS
612 
613             sipTransferTo(dataWrapper, (PyObject *)sipSelf);
614 
615             if (PyErr_Occurred())
616             {
617                 delete sipCpp;
618                 return SIP_NULLPTR;
619             }
620 
621             sipCpp->sipPySelf = sipSelf;
622 
623             return sipCpp;
624         }
625     }
626 
627     return SIP_NULLPTR;
628 }
629 
630 
631 static PyMethodDef methods_wxDropTarget[] = {
632     {SIP_MLNAME_CAST(sipName_GetData), meth_wxDropTarget_GetData, METH_VARARGS, SIP_MLDOC_CAST(doc_wxDropTarget_GetData)},
633     {SIP_MLNAME_CAST(sipName_GetDataObject), meth_wxDropTarget_GetDataObject, METH_VARARGS, SIP_MLDOC_CAST(doc_wxDropTarget_GetDataObject)},
634     {SIP_MLNAME_CAST(sipName_GetDefaultAction), meth_wxDropTarget_GetDefaultAction, METH_VARARGS, SIP_MLDOC_CAST(doc_wxDropTarget_GetDefaultAction)},
635     {SIP_MLNAME_CAST(sipName_OnData), SIP_MLMETH_CAST(meth_wxDropTarget_OnData), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxDropTarget_OnData)},
636     {SIP_MLNAME_CAST(sipName_OnDragOver), SIP_MLMETH_CAST(meth_wxDropTarget_OnDragOver), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxDropTarget_OnDragOver)},
637     {SIP_MLNAME_CAST(sipName_OnDrop), SIP_MLMETH_CAST(meth_wxDropTarget_OnDrop), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxDropTarget_OnDrop)},
638     {SIP_MLNAME_CAST(sipName_OnEnter), SIP_MLMETH_CAST(meth_wxDropTarget_OnEnter), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxDropTarget_OnEnter)},
639     {SIP_MLNAME_CAST(sipName_OnLeave), meth_wxDropTarget_OnLeave, METH_VARARGS, SIP_MLDOC_CAST(doc_wxDropTarget_OnLeave)},
640     {SIP_MLNAME_CAST(sipName_SetDataObject), SIP_MLMETH_CAST(meth_wxDropTarget_SetDataObject), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxDropTarget_SetDataObject)},
641     {SIP_MLNAME_CAST(sipName_SetDefaultAction), SIP_MLMETH_CAST(meth_wxDropTarget_SetDefaultAction), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxDropTarget_SetDefaultAction)}
642 };
643 
644 sipVariableDef variables_wxDropTarget[] = {
645     {PropertyVariable, sipName_DefaultAction, &methods_wxDropTarget[2], &methods_wxDropTarget[9], SIP_NULLPTR, SIP_NULLPTR},
646     {PropertyVariable, sipName_DataObject, &methods_wxDropTarget[1], &methods_wxDropTarget[8], SIP_NULLPTR, SIP_NULLPTR},
647     {PropertyVariable, sipName_Data, &methods_wxDropTarget[0], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
648 };
649 
650 PyDoc_STRVAR(doc_wxDropTarget, "DropTarget(data=None)\n"
651 "\n"
652 "This class represents a target for a drag and drop operation.");
653 
654 
655 sipClassTypeDef sipTypeDef__core_wxDropTarget = {
656     {
657         -1,
658         SIP_NULLPTR,
659         SIP_NULLPTR,
660         SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
661         sipNameNr_wxDropTarget,
662         {SIP_NULLPTR},
663         SIP_NULLPTR
664     },
665     {
666         sipNameNr_DropTarget,
667         {0, 0, 1},
668         10, methods_wxDropTarget,
669         0, SIP_NULLPTR,
670         3, variables_wxDropTarget,
671         {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
672     },
673     doc_wxDropTarget,
674     -1,
675     -1,
676     SIP_NULLPTR,
677     SIP_NULLPTR,
678     init_type_wxDropTarget,
679     SIP_NULLPTR,
680     SIP_NULLPTR,
681 #if PY_MAJOR_VERSION >= 3
682     SIP_NULLPTR,
683     SIP_NULLPTR,
684 #else
685     SIP_NULLPTR,
686     SIP_NULLPTR,
687     SIP_NULLPTR,
688     SIP_NULLPTR,
689 #endif
690     dealloc_wxDropTarget,
691     SIP_NULLPTR,
692     SIP_NULLPTR,
693     SIP_NULLPTR,
694     release_wxDropTarget,
695     SIP_NULLPTR,
696     SIP_NULLPTR,
697     SIP_NULLPTR,
698     SIP_NULLPTR,
699     SIP_NULLPTR,
700     SIP_NULLPTR,
701     SIP_NULLPTR
702 };
703