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