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_html.h"
11 
12         #include <wx/html/htmlcell.h>
13 
14         #include <wx/dc.h>
15         #include <wx/cursor.h>
16         #include <wx/html/htmlwin.h>
17         #include <wx/html/htmlcell.h>
18         #include <wx/html/htmlcell.h>
19         #include <wx/gdicmn.h>
20         #include <wx/html/htmlcell.h>
21         #include <wx/html/htmlcell.h>
22         #include <wx/html/htmlcell.h>
23         #include <wx/event.h>
24         #include <wx/object.h>
25         #include <wx/object.h>
26         #include <wx/object.h>
27 
28 
29 class sipwxHtmlWordCell : public  ::wxHtmlWordCell
30 {
31 public:
32     sipwxHtmlWordCell(const  ::wxString&,const  ::wxDC&);
33     virtual ~sipwxHtmlWordCell();
34 
35     /*
36      * There is a protected method for every virtual method visible from
37      * this class.
38      */
39 protected:
40     bool AdjustPagebreak(int*,const  ::wxArrayInt&,int) const SIP_OVERRIDE;
41     void Draw( ::wxDC&,int,int,int,int, ::wxHtmlRenderingInfo&) SIP_OVERRIDE;
42     void DrawInvisible( ::wxDC&,int,int, ::wxHtmlRenderingInfo&) SIP_OVERRIDE;
43     const  ::wxHtmlCell* Find(int,const void*) const SIP_OVERRIDE;
44      ::wxHtmlCell* FindCellByPos( ::wxCoord, ::wxCoord,uint) const SIP_OVERRIDE;
45      ::wxHtmlCell* GetFirstChild() const SIP_OVERRIDE;
46      ::wxHtmlLinkInfo* GetLink(int,int) const SIP_OVERRIDE;
47      ::wxCursor GetMouseCursor( ::wxHtmlWindowInterface*) const SIP_OVERRIDE;
48      ::wxCursor GetMouseCursorAt( ::wxHtmlWindowInterface*,const  ::wxPoint&) const SIP_OVERRIDE;
49     void Layout(int) SIP_OVERRIDE;
50     bool ProcessMouseClick( ::wxHtmlWindowInterface*,const  ::wxPoint&,const  ::wxMouseEvent&) SIP_OVERRIDE;
51     void SetPos(int,int) SIP_OVERRIDE;
52      ::wxString ConvertToText( ::wxHtmlSelection*) const SIP_OVERRIDE;
53 
54 public:
55     sipSimpleWrapper *sipPySelf;
56 
57 private:
58     sipwxHtmlWordCell(const sipwxHtmlWordCell &);
59     sipwxHtmlWordCell &operator = (const sipwxHtmlWordCell &);
60 
61     char sipPyMethods[13];
62 };
63 
sipwxHtmlWordCell(const::wxString & word,const::wxDC & dc)64 sipwxHtmlWordCell::sipwxHtmlWordCell(const  ::wxString& word,const  ::wxDC& dc):  ::wxHtmlWordCell(word,dc), sipPySelf(SIP_NULLPTR)
65 {
66     memset(sipPyMethods, 0, sizeof (sipPyMethods));
67 }
68 
~sipwxHtmlWordCell()69 sipwxHtmlWordCell::~sipwxHtmlWordCell()
70 {
71     sipInstanceDestroyedEx(&sipPySelf);
72 }
73 
AdjustPagebreak(int * pagebreak,const::wxArrayInt & known_pagebreaks,int pageHeight) const74 bool sipwxHtmlWordCell::AdjustPagebreak(int*pagebreak,const  ::wxArrayInt& known_pagebreaks,int pageHeight) const
75 {
76     sip_gilstate_t sipGILState;
77     PyObject *sipMeth;
78 
79     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,SIP_NULLPTR,sipName_AdjustPagebreak);
80 
81     if (!sipMeth)
82         return  ::wxHtmlWordCell::AdjustPagebreak(pagebreak,known_pagebreaks,pageHeight);
83 
84     extern bool sipVH__html_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int*,const  ::wxArrayInt&,int);
85 
86     return sipVH__html_1(sipGILState, 0, sipPySelf, sipMeth, pagebreak, known_pagebreaks, pageHeight);
87 }
88 
Draw(::wxDC & dc,int x,int y,int view_y1,int view_y2,::wxHtmlRenderingInfo & info)89 void sipwxHtmlWordCell::Draw( ::wxDC& dc,int x,int y,int view_y1,int view_y2, ::wxHtmlRenderingInfo& info)
90 {
91     sip_gilstate_t sipGILState;
92     PyObject *sipMeth;
93 
94     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,SIP_NULLPTR,sipName_Draw);
95 
96     if (!sipMeth)
97     {
98          ::wxHtmlWordCell::Draw(dc,x,y,view_y1,view_y2,info);
99         return;
100     }
101 
102     extern void sipVH__html_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxDC&,int,int,int,int, ::wxHtmlRenderingInfo&);
103 
104     sipVH__html_2(sipGILState, 0, sipPySelf, sipMeth, dc, x, y, view_y1, view_y2, info);
105 }
106 
DrawInvisible(::wxDC & dc,int x,int y,::wxHtmlRenderingInfo & info)107 void sipwxHtmlWordCell::DrawInvisible( ::wxDC& dc,int x,int y, ::wxHtmlRenderingInfo& info)
108 {
109     sip_gilstate_t sipGILState;
110     PyObject *sipMeth;
111 
112     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,SIP_NULLPTR,sipName_DrawInvisible);
113 
114     if (!sipMeth)
115     {
116          ::wxHtmlWordCell::DrawInvisible(dc,x,y,info);
117         return;
118     }
119 
120     extern void sipVH__html_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxDC&,int,int, ::wxHtmlRenderingInfo&);
121 
122     sipVH__html_3(sipGILState, 0, sipPySelf, sipMeth, dc, x, y, info);
123 }
124 
Find(int condition,const void * param) const125 const  ::wxHtmlCell* sipwxHtmlWordCell::Find(int condition,const void*param) const
126 {
127     sip_gilstate_t sipGILState;
128     PyObject *sipMeth;
129 
130     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[3]),sipPySelf,SIP_NULLPTR,sipName_Find);
131 
132     if (!sipMeth)
133         return  ::wxHtmlWordCell::Find(condition,param);
134 
135     extern const  ::wxHtmlCell* sipVH__html_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,const void*);
136 
137     return sipVH__html_4(sipGILState, 0, sipPySelf, sipMeth, condition, param);
138 }
139 
FindCellByPos(::wxCoord x,::wxCoord y,uint flags) const140  ::wxHtmlCell* sipwxHtmlWordCell::FindCellByPos( ::wxCoord x, ::wxCoord y,uint flags) const
141 {
142     sip_gilstate_t sipGILState;
143     PyObject *sipMeth;
144 
145     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[4]),sipPySelf,SIP_NULLPTR,sipName_FindCellByPos);
146 
147     if (!sipMeth)
148         return  ::wxHtmlWordCell::FindCellByPos(x,y,flags);
149 
150     extern  ::wxHtmlCell* sipVH__html_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxCoord, ::wxCoord,uint);
151 
152     return sipVH__html_5(sipGILState, 0, sipPySelf, sipMeth, x, y, flags);
153 }
154 
GetFirstChild() const155  ::wxHtmlCell* sipwxHtmlWordCell::GetFirstChild() const
156 {
157     sip_gilstate_t sipGILState;
158     PyObject *sipMeth;
159 
160     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[5]),sipPySelf,SIP_NULLPTR,sipName_GetFirstChild);
161 
162     if (!sipMeth)
163         return  ::wxHtmlWordCell::GetFirstChild();
164 
165     extern  ::wxHtmlCell* sipVH__html_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
166 
167     return sipVH__html_6(sipGILState, 0, sipPySelf, sipMeth);
168 }
169 
GetLink(int x,int y) const170  ::wxHtmlLinkInfo* sipwxHtmlWordCell::GetLink(int x,int y) const
171 {
172     sip_gilstate_t sipGILState;
173     PyObject *sipMeth;
174 
175     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[6]),sipPySelf,SIP_NULLPTR,sipName_GetLink);
176 
177     if (!sipMeth)
178         return  ::wxHtmlWordCell::GetLink(x,y);
179 
180     extern  ::wxHtmlLinkInfo* sipVH__html_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int);
181 
182     return sipVH__html_7(sipGILState, 0, sipPySelf, sipMeth, x, y);
183 }
184 
GetMouseCursor(::wxHtmlWindowInterface * window) const185  ::wxCursor sipwxHtmlWordCell::GetMouseCursor( ::wxHtmlWindowInterface*window) const
186 {
187     sip_gilstate_t sipGILState;
188     PyObject *sipMeth;
189 
190     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[7]),sipPySelf,SIP_NULLPTR,sipName_GetMouseCursor);
191 
192     if (!sipMeth)
193         return  ::wxHtmlWordCell::GetMouseCursor(window);
194 
195     extern  ::wxCursor sipVH__html_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxHtmlWindowInterface*);
196 
197     return sipVH__html_8(sipGILState, 0, sipPySelf, sipMeth, window);
198 }
199 
GetMouseCursorAt(::wxHtmlWindowInterface * window,const::wxPoint & rePos) const200  ::wxCursor sipwxHtmlWordCell::GetMouseCursorAt( ::wxHtmlWindowInterface*window,const  ::wxPoint& rePos) const
201 {
202     sip_gilstate_t sipGILState;
203     PyObject *sipMeth;
204 
205     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[8]),sipPySelf,SIP_NULLPTR,sipName_GetMouseCursorAt);
206 
207     if (!sipMeth)
208         return  ::wxHtmlWordCell::GetMouseCursorAt(window,rePos);
209 
210     extern  ::wxCursor sipVH__html_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxHtmlWindowInterface*,const  ::wxPoint&);
211 
212     return sipVH__html_9(sipGILState, 0, sipPySelf, sipMeth, window, rePos);
213 }
214 
Layout(int w)215 void sipwxHtmlWordCell::Layout(int w)
216 {
217     sip_gilstate_t sipGILState;
218     PyObject *sipMeth;
219 
220     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[9],sipPySelf,SIP_NULLPTR,sipName_Layout);
221 
222     if (!sipMeth)
223     {
224          ::wxHtmlWordCell::Layout(w);
225         return;
226     }
227 
228     extern void sipVH__html_10(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);
229 
230     sipVH__html_10(sipGILState, 0, sipPySelf, sipMeth, w);
231 }
232 
ProcessMouseClick(::wxHtmlWindowInterface * window,const::wxPoint & pos,const::wxMouseEvent & event)233 bool sipwxHtmlWordCell::ProcessMouseClick( ::wxHtmlWindowInterface*window,const  ::wxPoint& pos,const  ::wxMouseEvent& event)
234 {
235     sip_gilstate_t sipGILState;
236     PyObject *sipMeth;
237 
238     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[10],sipPySelf,SIP_NULLPTR,sipName_ProcessMouseClick);
239 
240     if (!sipMeth)
241         return  ::wxHtmlWordCell::ProcessMouseClick(window,pos,event);
242 
243     extern bool sipVH__html_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxHtmlWindowInterface*,const  ::wxPoint&,const  ::wxMouseEvent&);
244 
245     return sipVH__html_11(sipGILState, 0, sipPySelf, sipMeth, window, pos, event);
246 }
247 
SetPos(int x,int y)248 void sipwxHtmlWordCell::SetPos(int x,int y)
249 {
250     sip_gilstate_t sipGILState;
251     PyObject *sipMeth;
252 
253     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[11],sipPySelf,SIP_NULLPTR,sipName_SetPos);
254 
255     if (!sipMeth)
256     {
257          ::wxHtmlWordCell::SetPos(x,y);
258         return;
259     }
260 
261     extern void sipVH__html_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int);
262 
263     sipVH__html_12(sipGILState, 0, sipPySelf, sipMeth, x, y);
264 }
265 
ConvertToText(::wxHtmlSelection * sel) const266  ::wxString sipwxHtmlWordCell::ConvertToText( ::wxHtmlSelection*sel) const
267 {
268     sip_gilstate_t sipGILState;
269     PyObject *sipMeth;
270 
271     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[12]),sipPySelf,SIP_NULLPTR,sipName_ConvertToText);
272 
273     if (!sipMeth)
274         return  ::wxHtmlWordCell::ConvertToText(sel);
275 
276     extern  ::wxString sipVH__html_13(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxHtmlSelection*);
277 
278     return sipVH__html_13(sipGILState, 0, sipPySelf, sipMeth, sel);
279 }
280 
281 
282 PyDoc_STRVAR(doc_wxHtmlWordCell_Draw, "Draw(self, dc: DC, x: int, y: int, view_y1: int, view_y2: int, info: HtmlRenderingInfo)");
283 
284 extern "C" {static PyObject *meth_wxHtmlWordCell_Draw(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlWordCell_Draw(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)285 static PyObject *meth_wxHtmlWordCell_Draw(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
286 {
287     PyObject *sipParseErr = SIP_NULLPTR;
288     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
289 
290     {
291          ::wxDC* dc;
292         int x;
293         int y;
294         int view_y1;
295         int view_y2;
296          ::wxHtmlRenderingInfo* info;
297          ::wxHtmlWordCell *sipCpp;
298 
299         static const char *sipKwdList[] = {
300             sipName_dc,
301             sipName_x,
302             sipName_y,
303             sipName_view_y1,
304             sipName_view_y2,
305             sipName_info,
306         };
307 
308         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9iiiiJ9", &sipSelf, sipType_wxHtmlWordCell, &sipCpp, sipType_wxDC, &dc, &x, &y, &view_y1, &view_y2, sipType_wxHtmlRenderingInfo, &info))
309         {
310             PyErr_Clear();
311 
312             Py_BEGIN_ALLOW_THREADS
313             (sipSelfWasArg ? sipCpp-> ::wxHtmlWordCell::Draw(*dc,x,y,view_y1,view_y2,*info) : sipCpp->Draw(*dc,x,y,view_y1,view_y2,*info));
314             Py_END_ALLOW_THREADS
315 
316             if (PyErr_Occurred())
317                 return 0;
318 
319             Py_INCREF(Py_None);
320             return Py_None;
321         }
322     }
323 
324     /* Raise an exception if the arguments couldn't be parsed. */
325     sipNoMethod(sipParseErr, sipName_HtmlWordCell, sipName_Draw, doc_wxHtmlWordCell_Draw);
326 
327     return SIP_NULLPTR;
328 }
329 
330 
331 PyDoc_STRVAR(doc_wxHtmlWordCell_DrawInvisible, "DrawInvisible(self, dc: DC, x: int, y: int, info: HtmlRenderingInfo)");
332 
333 extern "C" {static PyObject *meth_wxHtmlWordCell_DrawInvisible(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlWordCell_DrawInvisible(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)334 static PyObject *meth_wxHtmlWordCell_DrawInvisible(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
335 {
336     PyObject *sipParseErr = SIP_NULLPTR;
337     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
338 
339     {
340          ::wxDC* dc;
341         int x;
342         int y;
343          ::wxHtmlRenderingInfo* info;
344          ::wxHtmlWordCell *sipCpp;
345 
346         static const char *sipKwdList[] = {
347             sipName_dc,
348             sipName_x,
349             sipName_y,
350             sipName_info,
351         };
352 
353         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9iiJ9", &sipSelf, sipType_wxHtmlWordCell, &sipCpp, sipType_wxDC, &dc, &x, &y, sipType_wxHtmlRenderingInfo, &info))
354         {
355             PyErr_Clear();
356 
357             Py_BEGIN_ALLOW_THREADS
358             (sipSelfWasArg ? sipCpp-> ::wxHtmlWordCell::DrawInvisible(*dc,x,y,*info) : sipCpp->DrawInvisible(*dc,x,y,*info));
359             Py_END_ALLOW_THREADS
360 
361             if (PyErr_Occurred())
362                 return 0;
363 
364             Py_INCREF(Py_None);
365             return Py_None;
366         }
367     }
368 
369     /* Raise an exception if the arguments couldn't be parsed. */
370     sipNoMethod(sipParseErr, sipName_HtmlWordCell, sipName_DrawInvisible, doc_wxHtmlWordCell_DrawInvisible);
371 
372     return SIP_NULLPTR;
373 }
374 
375 
376 PyDoc_STRVAR(doc_wxHtmlWordCell_GetMouseCursor, "GetMouseCursor(self, window: HtmlWindowInterface) -> Cursor");
377 
378 extern "C" {static PyObject *meth_wxHtmlWordCell_GetMouseCursor(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlWordCell_GetMouseCursor(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)379 static PyObject *meth_wxHtmlWordCell_GetMouseCursor(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
380 {
381     PyObject *sipParseErr = SIP_NULLPTR;
382     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
383 
384     {
385          ::wxHtmlWindowInterface* window;
386         const  ::wxHtmlWordCell *sipCpp;
387 
388         static const char *sipKwdList[] = {
389             sipName_window,
390         };
391 
392         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxHtmlWordCell, &sipCpp, sipType_wxHtmlWindowInterface, &window))
393         {
394              ::wxCursor*sipRes;
395 
396             PyErr_Clear();
397 
398             Py_BEGIN_ALLOW_THREADS
399             sipRes = new  ::wxCursor((sipSelfWasArg ? sipCpp-> ::wxHtmlWordCell::GetMouseCursor(window) : sipCpp->GetMouseCursor(window)));
400             Py_END_ALLOW_THREADS
401 
402             if (PyErr_Occurred())
403                 return 0;
404 
405             return sipConvertFromNewType(sipRes,sipType_wxCursor,SIP_NULLPTR);
406         }
407     }
408 
409     /* Raise an exception if the arguments couldn't be parsed. */
410     sipNoMethod(sipParseErr, sipName_HtmlWordCell, sipName_GetMouseCursor, doc_wxHtmlWordCell_GetMouseCursor);
411 
412     return SIP_NULLPTR;
413 }
414 
415 
416 PyDoc_STRVAR(doc_wxHtmlWordCell_Layout, "Layout(self, w: int)");
417 
418 extern "C" {static PyObject *meth_wxHtmlWordCell_Layout(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlWordCell_Layout(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)419 static PyObject *meth_wxHtmlWordCell_Layout(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
420 {
421     PyObject *sipParseErr = SIP_NULLPTR;
422     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
423 
424     {
425         int w;
426          ::wxHtmlWordCell *sipCpp;
427 
428         static const char *sipKwdList[] = {
429             sipName_w,
430         };
431 
432         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxHtmlWordCell, &sipCpp, &w))
433         {
434             PyErr_Clear();
435 
436             Py_BEGIN_ALLOW_THREADS
437             (sipSelfWasArg ? sipCpp-> ::wxHtmlWordCell::Layout(w) : sipCpp->Layout(w));
438             Py_END_ALLOW_THREADS
439 
440             if (PyErr_Occurred())
441                 return 0;
442 
443             Py_INCREF(Py_None);
444             return Py_None;
445         }
446     }
447 
448     /* Raise an exception if the arguments couldn't be parsed. */
449     sipNoMethod(sipParseErr, sipName_HtmlWordCell, sipName_Layout, doc_wxHtmlWordCell_Layout);
450 
451     return SIP_NULLPTR;
452 }
453 
454 
455 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
456 extern "C" {static void *cast_wxHtmlWordCell(void *, const sipTypeDef *);}
cast_wxHtmlWordCell(void * sipCppV,const sipTypeDef * targetType)457 static void *cast_wxHtmlWordCell(void *sipCppV, const sipTypeDef *targetType)
458 {
459      ::wxHtmlWordCell *sipCpp = reinterpret_cast< ::wxHtmlWordCell *>(sipCppV);
460 
461     if (targetType == sipType_wxHtmlCell)
462         return static_cast< ::wxHtmlCell *>(sipCpp);
463 
464     if (targetType == sipType_wxObject)
465         return static_cast< ::wxObject *>(sipCpp);
466 
467     return sipCppV;
468 }
469 
470 
471 /* Call the instance's destructor. */
472 extern "C" {static void release_wxHtmlWordCell(void *, int);}
release_wxHtmlWordCell(void * sipCppV,int sipState)473 static void release_wxHtmlWordCell(void *sipCppV, int sipState)
474 {
475     Py_BEGIN_ALLOW_THREADS
476 
477     if (sipState & SIP_DERIVED_CLASS)
478         delete reinterpret_cast<sipwxHtmlWordCell *>(sipCppV);
479     else
480         delete reinterpret_cast< ::wxHtmlWordCell *>(sipCppV);
481 
482     Py_END_ALLOW_THREADS
483 }
484 
485 
486 extern "C" {static void dealloc_wxHtmlWordCell(sipSimpleWrapper *);}
dealloc_wxHtmlWordCell(sipSimpleWrapper * sipSelf)487 static void dealloc_wxHtmlWordCell(sipSimpleWrapper *sipSelf)
488 {
489     if (sipIsDerivedClass(sipSelf))
490         reinterpret_cast<sipwxHtmlWordCell *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
491 
492     if (sipIsOwnedByPython(sipSelf))
493     {
494         release_wxHtmlWordCell(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
495     }
496 }
497 
498 
499 extern "C" {static void *init_type_wxHtmlWordCell(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxHtmlWordCell(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)500 static void *init_type_wxHtmlWordCell(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
501 {
502     sipwxHtmlWordCell *sipCpp = SIP_NULLPTR;
503 
504     {
505         const  ::wxString* word;
506         int wordState = 0;
507         const  ::wxDC* dc;
508 
509         static const char *sipKwdList[] = {
510             sipName_word,
511             sipName_dc,
512         };
513 
514         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1J9", sipType_wxString,&word, &wordState, sipType_wxDC, &dc))
515         {
516             PyErr_Clear();
517 
518             Py_BEGIN_ALLOW_THREADS
519             sipCpp = new sipwxHtmlWordCell(*word,*dc);
520             Py_END_ALLOW_THREADS
521             sipReleaseType(const_cast< ::wxString *>(word),sipType_wxString,wordState);
522 
523             if (PyErr_Occurred())
524             {
525                 delete sipCpp;
526                 return SIP_NULLPTR;
527             }
528 
529             sipCpp->sipPySelf = sipSelf;
530 
531             return sipCpp;
532         }
533     }
534 
535     return SIP_NULLPTR;
536 }
537 
538 
539 /* Define this type's super-types. */
540 static sipEncodedTypeDef supers_wxHtmlWordCell[] = {{2, 255, 1}};
541 
542 
543 static PyMethodDef methods_wxHtmlWordCell[] = {
544     {SIP_MLNAME_CAST(sipName_Draw), SIP_MLMETH_CAST(meth_wxHtmlWordCell_Draw), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlWordCell_Draw)},
545     {SIP_MLNAME_CAST(sipName_DrawInvisible), SIP_MLMETH_CAST(meth_wxHtmlWordCell_DrawInvisible), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlWordCell_DrawInvisible)},
546     {SIP_MLNAME_CAST(sipName_GetMouseCursor), SIP_MLMETH_CAST(meth_wxHtmlWordCell_GetMouseCursor), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlWordCell_GetMouseCursor)},
547     {SIP_MLNAME_CAST(sipName_Layout), SIP_MLMETH_CAST(meth_wxHtmlWordCell_Layout), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlWordCell_Layout)}
548 };
549 
550 PyDoc_STRVAR(doc_wxHtmlWordCell, "HtmlWordCell(word, dc)\n"
551 "\n"
552 "This html cell represents a single word or text fragment in the\n"
553 "document stream.");
554 
555 
556 sipClassTypeDef sipTypeDef__html_wxHtmlWordCell = {
557     {
558         -1,
559         SIP_NULLPTR,
560         SIP_NULLPTR,
561         SIP_TYPE_SCC|SIP_TYPE_CLASS,
562         sipNameNr_wxHtmlWordCell,
563         {SIP_NULLPTR},
564         SIP_NULLPTR
565     },
566     {
567         sipNameNr_HtmlWordCell,
568         {0, 0, 1},
569         4, methods_wxHtmlWordCell,
570         0, SIP_NULLPTR,
571         0, SIP_NULLPTR,
572         {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
573     },
574     doc_wxHtmlWordCell,
575     -1,
576     -1,
577     supers_wxHtmlWordCell,
578     SIP_NULLPTR,
579     init_type_wxHtmlWordCell,
580     SIP_NULLPTR,
581     SIP_NULLPTR,
582 #if PY_MAJOR_VERSION >= 3
583     SIP_NULLPTR,
584     SIP_NULLPTR,
585 #else
586     SIP_NULLPTR,
587     SIP_NULLPTR,
588     SIP_NULLPTR,
589     SIP_NULLPTR,
590 #endif
591     dealloc_wxHtmlWordCell,
592     SIP_NULLPTR,
593     SIP_NULLPTR,
594     SIP_NULLPTR,
595     release_wxHtmlWordCell,
596     cast_wxHtmlWordCell,
597     SIP_NULLPTR,
598     SIP_NULLPTR,
599     SIP_NULLPTR,
600     SIP_NULLPTR,
601     SIP_NULLPTR,
602     SIP_NULLPTR
603 };
604