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/html/htmlcell.h>
15         #include <wx/html/htmlcell.h>
16         #include <wx/html/htmlcell.h>
17 
18 
19 PyDoc_STRVAR(doc_wxHtmlRenderingInfo_SetSelection, "SetSelection(s)\n"
20 "\n"
21 "Accessors.");
22 
23 extern "C" {static PyObject *meth_wxHtmlRenderingInfo_SetSelection(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlRenderingInfo_SetSelection(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)24 static PyObject *meth_wxHtmlRenderingInfo_SetSelection(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
25 {
26     PyObject *sipParseErr = SIP_NULLPTR;
27 
28     {
29          ::wxHtmlSelection* s;
30          ::wxHtmlRenderingInfo *sipCpp;
31 
32         static const char *sipKwdList[] = {
33             sipName_s,
34         };
35 
36         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxHtmlRenderingInfo, &sipCpp, sipType_wxHtmlSelection, &s))
37         {
38             PyErr_Clear();
39 
40             Py_BEGIN_ALLOW_THREADS
41             sipCpp->SetSelection(s);
42             Py_END_ALLOW_THREADS
43 
44             if (PyErr_Occurred())
45                 return 0;
46 
47             Py_INCREF(Py_None);
48             return Py_None;
49         }
50     }
51 
52     /* Raise an exception if the arguments couldn't be parsed. */
53     sipNoMethod(sipParseErr, sipName_HtmlRenderingInfo, sipName_SetSelection, SIP_NULLPTR);
54 
55     return SIP_NULLPTR;
56 }
57 
58 
59 PyDoc_STRVAR(doc_wxHtmlRenderingInfo_GetSelection, "GetSelection() -> HtmlSelection\n"
60 "\n"
61 "Accessors.");
62 
63 extern "C" {static PyObject *meth_wxHtmlRenderingInfo_GetSelection(PyObject *, PyObject *);}
meth_wxHtmlRenderingInfo_GetSelection(PyObject * sipSelf,PyObject * sipArgs)64 static PyObject *meth_wxHtmlRenderingInfo_GetSelection(PyObject *sipSelf, PyObject *sipArgs)
65 {
66     PyObject *sipParseErr = SIP_NULLPTR;
67 
68     {
69         const  ::wxHtmlRenderingInfo *sipCpp;
70 
71         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxHtmlRenderingInfo, &sipCpp))
72         {
73              ::wxHtmlSelection*sipRes;
74 
75             PyErr_Clear();
76 
77             Py_BEGIN_ALLOW_THREADS
78             sipRes = sipCpp->GetSelection();
79             Py_END_ALLOW_THREADS
80 
81             if (PyErr_Occurred())
82                 return 0;
83 
84             return sipConvertFromType(sipRes,sipType_wxHtmlSelection,SIP_NULLPTR);
85         }
86     }
87 
88     /* Raise an exception if the arguments couldn't be parsed. */
89     sipNoMethod(sipParseErr, sipName_HtmlRenderingInfo, sipName_GetSelection, SIP_NULLPTR);
90 
91     return SIP_NULLPTR;
92 }
93 
94 
95 PyDoc_STRVAR(doc_wxHtmlRenderingInfo_SetStyle, "SetStyle(style)\n"
96 "\n"
97 "Accessors.");
98 
99 extern "C" {static PyObject *meth_wxHtmlRenderingInfo_SetStyle(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlRenderingInfo_SetStyle(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)100 static PyObject *meth_wxHtmlRenderingInfo_SetStyle(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
101 {
102     PyObject *sipParseErr = SIP_NULLPTR;
103 
104     {
105          ::wxHtmlRenderingStyle* style;
106          ::wxHtmlRenderingInfo *sipCpp;
107 
108         static const char *sipKwdList[] = {
109             sipName_style,
110         };
111 
112         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxHtmlRenderingInfo, &sipCpp, sipType_wxHtmlRenderingStyle, &style))
113         {
114             PyErr_Clear();
115 
116             Py_BEGIN_ALLOW_THREADS
117             sipCpp->SetStyle(style);
118             Py_END_ALLOW_THREADS
119 
120             if (PyErr_Occurred())
121                 return 0;
122 
123             Py_INCREF(Py_None);
124             return Py_None;
125         }
126     }
127 
128     /* Raise an exception if the arguments couldn't be parsed. */
129     sipNoMethod(sipParseErr, sipName_HtmlRenderingInfo, sipName_SetStyle, SIP_NULLPTR);
130 
131     return SIP_NULLPTR;
132 }
133 
134 
135 PyDoc_STRVAR(doc_wxHtmlRenderingInfo_GetStyle, "GetStyle() -> HtmlRenderingStyle\n"
136 "\n"
137 "Accessors.");
138 
139 extern "C" {static PyObject *meth_wxHtmlRenderingInfo_GetStyle(PyObject *, PyObject *);}
meth_wxHtmlRenderingInfo_GetStyle(PyObject * sipSelf,PyObject * sipArgs)140 static PyObject *meth_wxHtmlRenderingInfo_GetStyle(PyObject *sipSelf, PyObject *sipArgs)
141 {
142     PyObject *sipParseErr = SIP_NULLPTR;
143 
144     {
145          ::wxHtmlRenderingInfo *sipCpp;
146 
147         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxHtmlRenderingInfo, &sipCpp))
148         {
149              ::wxHtmlRenderingStyle*sipRes;
150 
151             PyErr_Clear();
152 
153             Py_BEGIN_ALLOW_THREADS
154             sipRes = &sipCpp->GetStyle();
155             Py_END_ALLOW_THREADS
156 
157             if (PyErr_Occurred())
158                 return 0;
159 
160             return sipConvertFromType(sipRes,sipType_wxHtmlRenderingStyle,SIP_NULLPTR);
161         }
162     }
163 
164     /* Raise an exception if the arguments couldn't be parsed. */
165     sipNoMethod(sipParseErr, sipName_HtmlRenderingInfo, sipName_GetStyle, SIP_NULLPTR);
166 
167     return SIP_NULLPTR;
168 }
169 
170 
171 PyDoc_STRVAR(doc_wxHtmlRenderingInfo_GetState, "GetState() -> HtmlRenderingState\n"
172 "\n"
173 "Accessors.");
174 
175 extern "C" {static PyObject *meth_wxHtmlRenderingInfo_GetState(PyObject *, PyObject *);}
meth_wxHtmlRenderingInfo_GetState(PyObject * sipSelf,PyObject * sipArgs)176 static PyObject *meth_wxHtmlRenderingInfo_GetState(PyObject *sipSelf, PyObject *sipArgs)
177 {
178     PyObject *sipParseErr = SIP_NULLPTR;
179 
180     {
181          ::wxHtmlRenderingInfo *sipCpp;
182 
183         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxHtmlRenderingInfo, &sipCpp))
184         {
185              ::wxHtmlRenderingState*sipRes;
186 
187             PyErr_Clear();
188 
189             Py_BEGIN_ALLOW_THREADS
190             sipRes = &sipCpp->GetState();
191             Py_END_ALLOW_THREADS
192 
193             if (PyErr_Occurred())
194                 return 0;
195 
196             return sipConvertFromType(sipRes,sipType_wxHtmlRenderingState,SIP_NULLPTR);
197         }
198     }
199 
200     /* Raise an exception if the arguments couldn't be parsed. */
201     sipNoMethod(sipParseErr, sipName_HtmlRenderingInfo, sipName_GetState, SIP_NULLPTR);
202 
203     return SIP_NULLPTR;
204 }
205 
206 
207 /* Call the instance's destructor. */
208 extern "C" {static void release_wxHtmlRenderingInfo(void *, int);}
release_wxHtmlRenderingInfo(void * sipCppV,int)209 static void release_wxHtmlRenderingInfo(void *sipCppV, int)
210 {
211     Py_BEGIN_ALLOW_THREADS
212 
213     delete reinterpret_cast< ::wxHtmlRenderingInfo *>(sipCppV);
214 
215     Py_END_ALLOW_THREADS
216 }
217 
218 
219 extern "C" {static void assign_wxHtmlRenderingInfo(void *, SIP_SSIZE_T, void *);}
assign_wxHtmlRenderingInfo(void * sipDst,SIP_SSIZE_T sipDstIdx,void * sipSrc)220 static void assign_wxHtmlRenderingInfo(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
221 {
222     reinterpret_cast< ::wxHtmlRenderingInfo *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxHtmlRenderingInfo *>(sipSrc);
223 }
224 
225 
226 extern "C" {static void *array_wxHtmlRenderingInfo(SIP_SSIZE_T);}
array_wxHtmlRenderingInfo(SIP_SSIZE_T sipNrElem)227 static void *array_wxHtmlRenderingInfo(SIP_SSIZE_T sipNrElem)
228 {
229     return new  ::wxHtmlRenderingInfo[sipNrElem];
230 }
231 
232 
233 extern "C" {static void *copy_wxHtmlRenderingInfo(const void *, SIP_SSIZE_T);}
copy_wxHtmlRenderingInfo(const void * sipSrc,SIP_SSIZE_T sipSrcIdx)234 static void *copy_wxHtmlRenderingInfo(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
235 {
236     return new  ::wxHtmlRenderingInfo(reinterpret_cast<const  ::wxHtmlRenderingInfo *>(sipSrc)[sipSrcIdx]);
237 }
238 
239 
240 extern "C" {static void dealloc_wxHtmlRenderingInfo(sipSimpleWrapper *);}
dealloc_wxHtmlRenderingInfo(sipSimpleWrapper * sipSelf)241 static void dealloc_wxHtmlRenderingInfo(sipSimpleWrapper *sipSelf)
242 {
243     if (sipIsOwnedByPython(sipSelf))
244     {
245         release_wxHtmlRenderingInfo(sipGetAddress(sipSelf), 0);
246     }
247 }
248 
249 
250 extern "C" {static void *init_type_wxHtmlRenderingInfo(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxHtmlRenderingInfo(sipSimpleWrapper *,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)251 static void *init_type_wxHtmlRenderingInfo(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
252 {
253      ::wxHtmlRenderingInfo *sipCpp = SIP_NULLPTR;
254 
255     {
256         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
257         {
258             PyErr_Clear();
259 
260             Py_BEGIN_ALLOW_THREADS
261             sipCpp = new  ::wxHtmlRenderingInfo();
262             Py_END_ALLOW_THREADS
263 
264             if (PyErr_Occurred())
265             {
266                 delete sipCpp;
267                 return SIP_NULLPTR;
268             }
269 
270             return sipCpp;
271         }
272     }
273 
274     {
275         const  ::wxHtmlRenderingInfo* a0;
276 
277         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxHtmlRenderingInfo, &a0))
278         {
279             Py_BEGIN_ALLOW_THREADS
280             sipCpp = new  ::wxHtmlRenderingInfo(*a0);
281             Py_END_ALLOW_THREADS
282 
283             return sipCpp;
284         }
285     }
286 
287     return SIP_NULLPTR;
288 }
289 
290 
291 static PyMethodDef methods_wxHtmlRenderingInfo[] = {
292     {SIP_MLNAME_CAST(sipName_GetSelection), meth_wxHtmlRenderingInfo_GetSelection, METH_VARARGS, SIP_MLDOC_CAST(doc_wxHtmlRenderingInfo_GetSelection)},
293     {SIP_MLNAME_CAST(sipName_GetState), meth_wxHtmlRenderingInfo_GetState, METH_VARARGS, SIP_MLDOC_CAST(doc_wxHtmlRenderingInfo_GetState)},
294     {SIP_MLNAME_CAST(sipName_GetStyle), meth_wxHtmlRenderingInfo_GetStyle, METH_VARARGS, SIP_MLDOC_CAST(doc_wxHtmlRenderingInfo_GetStyle)},
295     {SIP_MLNAME_CAST(sipName_SetSelection), SIP_MLMETH_CAST(meth_wxHtmlRenderingInfo_SetSelection), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlRenderingInfo_SetSelection)},
296     {SIP_MLNAME_CAST(sipName_SetStyle), SIP_MLMETH_CAST(meth_wxHtmlRenderingInfo_SetStyle), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlRenderingInfo_SetStyle)}
297 };
298 
299 sipVariableDef variables_wxHtmlRenderingInfo[] = {
300     {PropertyVariable, sipName_Style, &methods_wxHtmlRenderingInfo[2], &methods_wxHtmlRenderingInfo[4], SIP_NULLPTR, SIP_NULLPTR},
301     {PropertyVariable, sipName_State, &methods_wxHtmlRenderingInfo[1], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
302     {PropertyVariable, sipName_Selection, &methods_wxHtmlRenderingInfo[0], &methods_wxHtmlRenderingInfo[3], SIP_NULLPTR, SIP_NULLPTR},
303 };
304 
305 PyDoc_STRVAR(doc_wxHtmlRenderingInfo, "HtmlRenderingInfo()\n"
306 "\n"
307 "This class contains information given to cells when drawing them.");
308 
309 
310 sipClassTypeDef sipTypeDef__html_wxHtmlRenderingInfo = {
311     {
312         -1,
313         SIP_NULLPTR,
314         SIP_NULLPTR,
315         SIP_TYPE_CLASS,
316         sipNameNr_wxHtmlRenderingInfo,
317         {SIP_NULLPTR},
318         SIP_NULLPTR
319     },
320     {
321         sipNameNr_HtmlRenderingInfo,
322         {0, 0, 1},
323         5, methods_wxHtmlRenderingInfo,
324         0, SIP_NULLPTR,
325         3, variables_wxHtmlRenderingInfo,
326         {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
327     },
328     doc_wxHtmlRenderingInfo,
329     -1,
330     -1,
331     SIP_NULLPTR,
332     SIP_NULLPTR,
333     init_type_wxHtmlRenderingInfo,
334     SIP_NULLPTR,
335     SIP_NULLPTR,
336 #if PY_MAJOR_VERSION >= 3
337     SIP_NULLPTR,
338     SIP_NULLPTR,
339 #else
340     SIP_NULLPTR,
341     SIP_NULLPTR,
342     SIP_NULLPTR,
343     SIP_NULLPTR,
344 #endif
345     dealloc_wxHtmlRenderingInfo,
346     assign_wxHtmlRenderingInfo,
347     array_wxHtmlRenderingInfo,
348     copy_wxHtmlRenderingInfo,
349     release_wxHtmlRenderingInfo,
350     SIP_NULLPTR,
351     SIP_NULLPTR,
352     SIP_NULLPTR,
353     SIP_NULLPTR,
354     SIP_NULLPTR,
355     SIP_NULLPTR,
356     SIP_NULLPTR
357 };
358