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/fontutil.h>
13 
14         #include <wx/font.h>
_wxNativeFontInfo___str__(wxNativeFontInfo * self)15     wxString* _wxNativeFontInfo___str__(wxNativeFontInfo* self)
16     {
17         return new wxString(self->ToString());
18     }
19 
20 
21 PyDoc_STRVAR(doc_wxNativeFontInfo_Init, "Init()");
22 
23 extern "C" {static PyObject *meth_wxNativeFontInfo_Init(PyObject *, PyObject *);}
meth_wxNativeFontInfo_Init(PyObject * sipSelf,PyObject * sipArgs)24 static PyObject *meth_wxNativeFontInfo_Init(PyObject *sipSelf, PyObject *sipArgs)
25 {
26     PyObject *sipParseErr = SIP_NULLPTR;
27 
28     {
29          ::wxNativeFontInfo *sipCpp;
30 
31         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativeFontInfo, &sipCpp))
32         {
33             PyErr_Clear();
34 
35             Py_BEGIN_ALLOW_THREADS
36             sipCpp->Init();
37             Py_END_ALLOW_THREADS
38 
39             if (PyErr_Occurred())
40                 return 0;
41 
42             Py_INCREF(Py_None);
43             return Py_None;
44         }
45     }
46 
47     /* Raise an exception if the arguments couldn't be parsed. */
48     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_Init, SIP_NULLPTR);
49 
50     return SIP_NULLPTR;
51 }
52 
53 
54 PyDoc_STRVAR(doc_wxNativeFontInfo_InitFromFont, "InitFromFont(font)");
55 
56 extern "C" {static PyObject *meth_wxNativeFontInfo_InitFromFont(PyObject *, PyObject *, PyObject *);}
meth_wxNativeFontInfo_InitFromFont(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)57 static PyObject *meth_wxNativeFontInfo_InitFromFont(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
58 {
59     PyObject *sipParseErr = SIP_NULLPTR;
60 
61     {
62         const  ::wxFont* font;
63          ::wxNativeFontInfo *sipCpp;
64 
65         static const char *sipKwdList[] = {
66             sipName_font,
67         };
68 
69         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, sipType_wxFont, &font))
70         {
71             PyErr_Clear();
72 
73             Py_BEGIN_ALLOW_THREADS
74             sipCpp->InitFromFont(*font);
75             Py_END_ALLOW_THREADS
76 
77             if (PyErr_Occurred())
78                 return 0;
79 
80             Py_INCREF(Py_None);
81             return Py_None;
82         }
83     }
84 
85     /* Raise an exception if the arguments couldn't be parsed. */
86     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_InitFromFont, SIP_NULLPTR);
87 
88     return SIP_NULLPTR;
89 }
90 
91 
92 PyDoc_STRVAR(doc_wxNativeFontInfo_GetPointSize, "GetPointSize() -> int");
93 
94 extern "C" {static PyObject *meth_wxNativeFontInfo_GetPointSize(PyObject *, PyObject *);}
meth_wxNativeFontInfo_GetPointSize(PyObject * sipSelf,PyObject * sipArgs)95 static PyObject *meth_wxNativeFontInfo_GetPointSize(PyObject *sipSelf, PyObject *sipArgs)
96 {
97     PyObject *sipParseErr = SIP_NULLPTR;
98 
99     {
100         const  ::wxNativeFontInfo *sipCpp;
101 
102         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativeFontInfo, &sipCpp))
103         {
104             int sipRes;
105 
106             PyErr_Clear();
107 
108             Py_BEGIN_ALLOW_THREADS
109             sipRes = sipCpp->GetPointSize();
110             Py_END_ALLOW_THREADS
111 
112             if (PyErr_Occurred())
113                 return 0;
114 
115             return SIPLong_FromLong(sipRes);
116         }
117     }
118 
119     /* Raise an exception if the arguments couldn't be parsed. */
120     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_GetPointSize, SIP_NULLPTR);
121 
122     return SIP_NULLPTR;
123 }
124 
125 
126 PyDoc_STRVAR(doc_wxNativeFontInfo_GetStyle, "GetStyle() -> FontStyle");
127 
128 extern "C" {static PyObject *meth_wxNativeFontInfo_GetStyle(PyObject *, PyObject *);}
meth_wxNativeFontInfo_GetStyle(PyObject * sipSelf,PyObject * sipArgs)129 static PyObject *meth_wxNativeFontInfo_GetStyle(PyObject *sipSelf, PyObject *sipArgs)
130 {
131     PyObject *sipParseErr = SIP_NULLPTR;
132 
133     {
134         const  ::wxNativeFontInfo *sipCpp;
135 
136         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativeFontInfo, &sipCpp))
137         {
138              ::wxFontStyle sipRes;
139 
140             PyErr_Clear();
141 
142             Py_BEGIN_ALLOW_THREADS
143             sipRes = sipCpp->GetStyle();
144             Py_END_ALLOW_THREADS
145 
146             if (PyErr_Occurred())
147                 return 0;
148 
149             return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxFontStyle);
150         }
151     }
152 
153     /* Raise an exception if the arguments couldn't be parsed. */
154     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_GetStyle, SIP_NULLPTR);
155 
156     return SIP_NULLPTR;
157 }
158 
159 
160 PyDoc_STRVAR(doc_wxNativeFontInfo_GetWeight, "GetWeight() -> FontWeight");
161 
162 extern "C" {static PyObject *meth_wxNativeFontInfo_GetWeight(PyObject *, PyObject *);}
meth_wxNativeFontInfo_GetWeight(PyObject * sipSelf,PyObject * sipArgs)163 static PyObject *meth_wxNativeFontInfo_GetWeight(PyObject *sipSelf, PyObject *sipArgs)
164 {
165     PyObject *sipParseErr = SIP_NULLPTR;
166 
167     {
168         const  ::wxNativeFontInfo *sipCpp;
169 
170         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativeFontInfo, &sipCpp))
171         {
172              ::wxFontWeight sipRes;
173 
174             PyErr_Clear();
175 
176             Py_BEGIN_ALLOW_THREADS
177             sipRes = sipCpp->GetWeight();
178             Py_END_ALLOW_THREADS
179 
180             if (PyErr_Occurred())
181                 return 0;
182 
183             return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxFontWeight);
184         }
185     }
186 
187     /* Raise an exception if the arguments couldn't be parsed. */
188     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_GetWeight, SIP_NULLPTR);
189 
190     return SIP_NULLPTR;
191 }
192 
193 
194 PyDoc_STRVAR(doc_wxNativeFontInfo_GetUnderlined, "GetUnderlined() -> bool");
195 
196 extern "C" {static PyObject *meth_wxNativeFontInfo_GetUnderlined(PyObject *, PyObject *);}
meth_wxNativeFontInfo_GetUnderlined(PyObject * sipSelf,PyObject * sipArgs)197 static PyObject *meth_wxNativeFontInfo_GetUnderlined(PyObject *sipSelf, PyObject *sipArgs)
198 {
199     PyObject *sipParseErr = SIP_NULLPTR;
200 
201     {
202         const  ::wxNativeFontInfo *sipCpp;
203 
204         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativeFontInfo, &sipCpp))
205         {
206             bool sipRes;
207 
208             PyErr_Clear();
209 
210             Py_BEGIN_ALLOW_THREADS
211             sipRes = sipCpp->GetUnderlined();
212             Py_END_ALLOW_THREADS
213 
214             if (PyErr_Occurred())
215                 return 0;
216 
217             return PyBool_FromLong(sipRes);
218         }
219     }
220 
221     /* Raise an exception if the arguments couldn't be parsed. */
222     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_GetUnderlined, SIP_NULLPTR);
223 
224     return SIP_NULLPTR;
225 }
226 
227 
228 PyDoc_STRVAR(doc_wxNativeFontInfo_GetFaceName, "GetFaceName() -> String");
229 
230 extern "C" {static PyObject *meth_wxNativeFontInfo_GetFaceName(PyObject *, PyObject *);}
meth_wxNativeFontInfo_GetFaceName(PyObject * sipSelf,PyObject * sipArgs)231 static PyObject *meth_wxNativeFontInfo_GetFaceName(PyObject *sipSelf, PyObject *sipArgs)
232 {
233     PyObject *sipParseErr = SIP_NULLPTR;
234 
235     {
236         const  ::wxNativeFontInfo *sipCpp;
237 
238         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativeFontInfo, &sipCpp))
239         {
240              ::wxString*sipRes;
241 
242             PyErr_Clear();
243 
244             Py_BEGIN_ALLOW_THREADS
245             sipRes = new  ::wxString(sipCpp->GetFaceName());
246             Py_END_ALLOW_THREADS
247 
248             if (PyErr_Occurred())
249                 return 0;
250 
251             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
252         }
253     }
254 
255     /* Raise an exception if the arguments couldn't be parsed. */
256     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_GetFaceName, SIP_NULLPTR);
257 
258     return SIP_NULLPTR;
259 }
260 
261 
262 PyDoc_STRVAR(doc_wxNativeFontInfo_GetFamily, "GetFamily() -> FontFamily");
263 
264 extern "C" {static PyObject *meth_wxNativeFontInfo_GetFamily(PyObject *, PyObject *);}
meth_wxNativeFontInfo_GetFamily(PyObject * sipSelf,PyObject * sipArgs)265 static PyObject *meth_wxNativeFontInfo_GetFamily(PyObject *sipSelf, PyObject *sipArgs)
266 {
267     PyObject *sipParseErr = SIP_NULLPTR;
268 
269     {
270         const  ::wxNativeFontInfo *sipCpp;
271 
272         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativeFontInfo, &sipCpp))
273         {
274              ::wxFontFamily sipRes;
275 
276             PyErr_Clear();
277 
278             Py_BEGIN_ALLOW_THREADS
279             sipRes = sipCpp->GetFamily();
280             Py_END_ALLOW_THREADS
281 
282             if (PyErr_Occurred())
283                 return 0;
284 
285             return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxFontFamily);
286         }
287     }
288 
289     /* Raise an exception if the arguments couldn't be parsed. */
290     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_GetFamily, SIP_NULLPTR);
291 
292     return SIP_NULLPTR;
293 }
294 
295 
296 PyDoc_STRVAR(doc_wxNativeFontInfo_GetEncoding, "GetEncoding() -> FontEncoding");
297 
298 extern "C" {static PyObject *meth_wxNativeFontInfo_GetEncoding(PyObject *, PyObject *);}
meth_wxNativeFontInfo_GetEncoding(PyObject * sipSelf,PyObject * sipArgs)299 static PyObject *meth_wxNativeFontInfo_GetEncoding(PyObject *sipSelf, PyObject *sipArgs)
300 {
301     PyObject *sipParseErr = SIP_NULLPTR;
302 
303     {
304         const  ::wxNativeFontInfo *sipCpp;
305 
306         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativeFontInfo, &sipCpp))
307         {
308              ::wxFontEncoding sipRes;
309 
310             PyErr_Clear();
311 
312             Py_BEGIN_ALLOW_THREADS
313             sipRes = sipCpp->GetEncoding();
314             Py_END_ALLOW_THREADS
315 
316             if (PyErr_Occurred())
317                 return 0;
318 
319             return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxFontEncoding);
320         }
321     }
322 
323     /* Raise an exception if the arguments couldn't be parsed. */
324     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_GetEncoding, SIP_NULLPTR);
325 
326     return SIP_NULLPTR;
327 }
328 
329 
330 PyDoc_STRVAR(doc_wxNativeFontInfo_SetPointSize, "SetPointSize(pointsize)");
331 
332 extern "C" {static PyObject *meth_wxNativeFontInfo_SetPointSize(PyObject *, PyObject *, PyObject *);}
meth_wxNativeFontInfo_SetPointSize(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)333 static PyObject *meth_wxNativeFontInfo_SetPointSize(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
334 {
335     PyObject *sipParseErr = SIP_NULLPTR;
336 
337     {
338         int pointsize;
339          ::wxNativeFontInfo *sipCpp;
340 
341         static const char *sipKwdList[] = {
342             sipName_pointsize,
343         };
344 
345         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, &pointsize))
346         {
347             PyErr_Clear();
348 
349             Py_BEGIN_ALLOW_THREADS
350             sipCpp->SetPointSize(pointsize);
351             Py_END_ALLOW_THREADS
352 
353             if (PyErr_Occurred())
354                 return 0;
355 
356             Py_INCREF(Py_None);
357             return Py_None;
358         }
359     }
360 
361     /* Raise an exception if the arguments couldn't be parsed. */
362     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_SetPointSize, SIP_NULLPTR);
363 
364     return SIP_NULLPTR;
365 }
366 
367 
368 PyDoc_STRVAR(doc_wxNativeFontInfo_SetStyle, "SetStyle(style)");
369 
370 extern "C" {static PyObject *meth_wxNativeFontInfo_SetStyle(PyObject *, PyObject *, PyObject *);}
meth_wxNativeFontInfo_SetStyle(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)371 static PyObject *meth_wxNativeFontInfo_SetStyle(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
372 {
373     PyObject *sipParseErr = SIP_NULLPTR;
374 
375     {
376          ::wxFontStyle style;
377          ::wxNativeFontInfo *sipCpp;
378 
379         static const char *sipKwdList[] = {
380             sipName_style,
381         };
382 
383         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BE", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, sipType_wxFontStyle, &style))
384         {
385             PyErr_Clear();
386 
387             Py_BEGIN_ALLOW_THREADS
388             sipCpp->SetStyle(style);
389             Py_END_ALLOW_THREADS
390 
391             if (PyErr_Occurred())
392                 return 0;
393 
394             Py_INCREF(Py_None);
395             return Py_None;
396         }
397     }
398 
399     /* Raise an exception if the arguments couldn't be parsed. */
400     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_SetStyle, SIP_NULLPTR);
401 
402     return SIP_NULLPTR;
403 }
404 
405 
406 PyDoc_STRVAR(doc_wxNativeFontInfo_SetWeight, "SetWeight(weight)");
407 
408 extern "C" {static PyObject *meth_wxNativeFontInfo_SetWeight(PyObject *, PyObject *, PyObject *);}
meth_wxNativeFontInfo_SetWeight(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)409 static PyObject *meth_wxNativeFontInfo_SetWeight(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
410 {
411     PyObject *sipParseErr = SIP_NULLPTR;
412 
413     {
414          ::wxFontWeight weight;
415          ::wxNativeFontInfo *sipCpp;
416 
417         static const char *sipKwdList[] = {
418             sipName_weight,
419         };
420 
421         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BE", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, sipType_wxFontWeight, &weight))
422         {
423             PyErr_Clear();
424 
425             Py_BEGIN_ALLOW_THREADS
426             sipCpp->SetWeight(weight);
427             Py_END_ALLOW_THREADS
428 
429             if (PyErr_Occurred())
430                 return 0;
431 
432             Py_INCREF(Py_None);
433             return Py_None;
434         }
435     }
436 
437     /* Raise an exception if the arguments couldn't be parsed. */
438     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_SetWeight, SIP_NULLPTR);
439 
440     return SIP_NULLPTR;
441 }
442 
443 
444 PyDoc_STRVAR(doc_wxNativeFontInfo_SetUnderlined, "SetUnderlined(underlined)");
445 
446 extern "C" {static PyObject *meth_wxNativeFontInfo_SetUnderlined(PyObject *, PyObject *, PyObject *);}
meth_wxNativeFontInfo_SetUnderlined(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)447 static PyObject *meth_wxNativeFontInfo_SetUnderlined(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
448 {
449     PyObject *sipParseErr = SIP_NULLPTR;
450 
451     {
452         bool underlined;
453          ::wxNativeFontInfo *sipCpp;
454 
455         static const char *sipKwdList[] = {
456             sipName_underlined,
457         };
458 
459         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bb", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, &underlined))
460         {
461             PyErr_Clear();
462 
463             Py_BEGIN_ALLOW_THREADS
464             sipCpp->SetUnderlined(underlined);
465             Py_END_ALLOW_THREADS
466 
467             if (PyErr_Occurred())
468                 return 0;
469 
470             Py_INCREF(Py_None);
471             return Py_None;
472         }
473     }
474 
475     /* Raise an exception if the arguments couldn't be parsed. */
476     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_SetUnderlined, SIP_NULLPTR);
477 
478     return SIP_NULLPTR;
479 }
480 
481 
482 PyDoc_STRVAR(doc_wxNativeFontInfo_SetFaceName, "SetFaceName(facename) -> bool\n"
483 "SetFaceName(facenames)\n"
484 "");
485 
486 extern "C" {static PyObject *meth_wxNativeFontInfo_SetFaceName(PyObject *, PyObject *, PyObject *);}
meth_wxNativeFontInfo_SetFaceName(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)487 static PyObject *meth_wxNativeFontInfo_SetFaceName(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
488 {
489     PyObject *sipParseErr = SIP_NULLPTR;
490 
491     {
492         const  ::wxString* facename;
493         int facenameState = 0;
494          ::wxNativeFontInfo *sipCpp;
495 
496         static const char *sipKwdList[] = {
497             sipName_facename,
498         };
499 
500         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, sipType_wxString,&facename, &facenameState))
501         {
502             bool sipRes;
503 
504             PyErr_Clear();
505 
506             Py_BEGIN_ALLOW_THREADS
507             sipRes = sipCpp->SetFaceName(*facename);
508             Py_END_ALLOW_THREADS
509             sipReleaseType(const_cast< ::wxString *>(facename),sipType_wxString,facenameState);
510 
511             if (PyErr_Occurred())
512                 return 0;
513 
514             return PyBool_FromLong(sipRes);
515         }
516     }
517 
518     {
519         const  ::wxArrayString* facenames;
520         int facenamesState = 0;
521          ::wxNativeFontInfo *sipCpp;
522 
523         static const char *sipKwdList[] = {
524             sipName_facenames,
525         };
526 
527         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, sipType_wxArrayString,&facenames, &facenamesState))
528         {
529             PyErr_Clear();
530 
531             Py_BEGIN_ALLOW_THREADS
532             sipCpp->SetFaceName(*facenames);
533             Py_END_ALLOW_THREADS
534             sipReleaseType(const_cast< ::wxArrayString *>(facenames),sipType_wxArrayString,facenamesState);
535 
536             if (PyErr_Occurred())
537                 return 0;
538 
539             Py_INCREF(Py_None);
540             return Py_None;
541         }
542     }
543 
544     /* Raise an exception if the arguments couldn't be parsed. */
545     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_SetFaceName, SIP_NULLPTR);
546 
547     return SIP_NULLPTR;
548 }
549 
550 
551 PyDoc_STRVAR(doc_wxNativeFontInfo_SetFamily, "SetFamily(family)");
552 
553 extern "C" {static PyObject *meth_wxNativeFontInfo_SetFamily(PyObject *, PyObject *, PyObject *);}
meth_wxNativeFontInfo_SetFamily(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)554 static PyObject *meth_wxNativeFontInfo_SetFamily(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
555 {
556     PyObject *sipParseErr = SIP_NULLPTR;
557 
558     {
559          ::wxFontFamily family;
560          ::wxNativeFontInfo *sipCpp;
561 
562         static const char *sipKwdList[] = {
563             sipName_family,
564         };
565 
566         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BE", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, sipType_wxFontFamily, &family))
567         {
568             PyErr_Clear();
569 
570             Py_BEGIN_ALLOW_THREADS
571             sipCpp->SetFamily(family);
572             Py_END_ALLOW_THREADS
573 
574             if (PyErr_Occurred())
575                 return 0;
576 
577             Py_INCREF(Py_None);
578             return Py_None;
579         }
580     }
581 
582     /* Raise an exception if the arguments couldn't be parsed. */
583     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_SetFamily, SIP_NULLPTR);
584 
585     return SIP_NULLPTR;
586 }
587 
588 
589 PyDoc_STRVAR(doc_wxNativeFontInfo_SetEncoding, "SetEncoding(encoding)");
590 
591 extern "C" {static PyObject *meth_wxNativeFontInfo_SetEncoding(PyObject *, PyObject *, PyObject *);}
meth_wxNativeFontInfo_SetEncoding(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)592 static PyObject *meth_wxNativeFontInfo_SetEncoding(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
593 {
594     PyObject *sipParseErr = SIP_NULLPTR;
595 
596     {
597          ::wxFontEncoding encoding;
598          ::wxNativeFontInfo *sipCpp;
599 
600         static const char *sipKwdList[] = {
601             sipName_encoding,
602         };
603 
604         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BE", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, sipType_wxFontEncoding, &encoding))
605         {
606             PyErr_Clear();
607 
608             Py_BEGIN_ALLOW_THREADS
609             sipCpp->SetEncoding(encoding);
610             Py_END_ALLOW_THREADS
611 
612             if (PyErr_Occurred())
613                 return 0;
614 
615             Py_INCREF(Py_None);
616             return Py_None;
617         }
618     }
619 
620     /* Raise an exception if the arguments couldn't be parsed. */
621     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_SetEncoding, SIP_NULLPTR);
622 
623     return SIP_NULLPTR;
624 }
625 
626 
627 PyDoc_STRVAR(doc_wxNativeFontInfo_FromString, "FromString(s) -> bool");
628 
629 extern "C" {static PyObject *meth_wxNativeFontInfo_FromString(PyObject *, PyObject *, PyObject *);}
meth_wxNativeFontInfo_FromString(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)630 static PyObject *meth_wxNativeFontInfo_FromString(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
631 {
632     PyObject *sipParseErr = SIP_NULLPTR;
633 
634     {
635         const  ::wxString* s;
636         int sState = 0;
637          ::wxNativeFontInfo *sipCpp;
638 
639         static const char *sipKwdList[] = {
640             sipName_s,
641         };
642 
643         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, sipType_wxString,&s, &sState))
644         {
645             bool sipRes;
646 
647             PyErr_Clear();
648 
649             Py_BEGIN_ALLOW_THREADS
650             sipRes = sipCpp->FromString(*s);
651             Py_END_ALLOW_THREADS
652             sipReleaseType(const_cast< ::wxString *>(s),sipType_wxString,sState);
653 
654             if (PyErr_Occurred())
655                 return 0;
656 
657             return PyBool_FromLong(sipRes);
658         }
659     }
660 
661     /* Raise an exception if the arguments couldn't be parsed. */
662     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_FromString, SIP_NULLPTR);
663 
664     return SIP_NULLPTR;
665 }
666 
667 
668 PyDoc_STRVAR(doc_wxNativeFontInfo_ToString, "ToString() -> String");
669 
670 extern "C" {static PyObject *meth_wxNativeFontInfo_ToString(PyObject *, PyObject *);}
meth_wxNativeFontInfo_ToString(PyObject * sipSelf,PyObject * sipArgs)671 static PyObject *meth_wxNativeFontInfo_ToString(PyObject *sipSelf, PyObject *sipArgs)
672 {
673     PyObject *sipParseErr = SIP_NULLPTR;
674 
675     {
676         const  ::wxNativeFontInfo *sipCpp;
677 
678         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativeFontInfo, &sipCpp))
679         {
680              ::wxString*sipRes;
681 
682             PyErr_Clear();
683 
684             Py_BEGIN_ALLOW_THREADS
685             sipRes = new  ::wxString(sipCpp->ToString());
686             Py_END_ALLOW_THREADS
687 
688             if (PyErr_Occurred())
689                 return 0;
690 
691             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
692         }
693     }
694 
695     /* Raise an exception if the arguments couldn't be parsed. */
696     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_ToString, SIP_NULLPTR);
697 
698     return SIP_NULLPTR;
699 }
700 
701 
702 PyDoc_STRVAR(doc_wxNativeFontInfo_FromUserString, "FromUserString(s) -> bool");
703 
704 extern "C" {static PyObject *meth_wxNativeFontInfo_FromUserString(PyObject *, PyObject *, PyObject *);}
meth_wxNativeFontInfo_FromUserString(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)705 static PyObject *meth_wxNativeFontInfo_FromUserString(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
706 {
707     PyObject *sipParseErr = SIP_NULLPTR;
708 
709     {
710         const  ::wxString* s;
711         int sState = 0;
712          ::wxNativeFontInfo *sipCpp;
713 
714         static const char *sipKwdList[] = {
715             sipName_s,
716         };
717 
718         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxNativeFontInfo, &sipCpp, sipType_wxString,&s, &sState))
719         {
720             bool sipRes;
721 
722             PyErr_Clear();
723 
724             Py_BEGIN_ALLOW_THREADS
725             sipRes = sipCpp->FromUserString(*s);
726             Py_END_ALLOW_THREADS
727             sipReleaseType(const_cast< ::wxString *>(s),sipType_wxString,sState);
728 
729             if (PyErr_Occurred())
730                 return 0;
731 
732             return PyBool_FromLong(sipRes);
733         }
734     }
735 
736     /* Raise an exception if the arguments couldn't be parsed. */
737     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_FromUserString, SIP_NULLPTR);
738 
739     return SIP_NULLPTR;
740 }
741 
742 
743 PyDoc_STRVAR(doc_wxNativeFontInfo_ToUserString, "ToUserString() -> String");
744 
745 extern "C" {static PyObject *meth_wxNativeFontInfo_ToUserString(PyObject *, PyObject *);}
meth_wxNativeFontInfo_ToUserString(PyObject * sipSelf,PyObject * sipArgs)746 static PyObject *meth_wxNativeFontInfo_ToUserString(PyObject *sipSelf, PyObject *sipArgs)
747 {
748     PyObject *sipParseErr = SIP_NULLPTR;
749 
750     {
751         const  ::wxNativeFontInfo *sipCpp;
752 
753         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativeFontInfo, &sipCpp))
754         {
755              ::wxString*sipRes;
756 
757             PyErr_Clear();
758 
759             Py_BEGIN_ALLOW_THREADS
760             sipRes = new  ::wxString(sipCpp->ToUserString());
761             Py_END_ALLOW_THREADS
762 
763             if (PyErr_Occurred())
764                 return 0;
765 
766             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
767         }
768     }
769 
770     /* Raise an exception if the arguments couldn't be parsed. */
771     sipNoMethod(sipParseErr, sipName_NativeFontInfo, sipName_ToUserString, SIP_NULLPTR);
772 
773     return SIP_NULLPTR;
774 }
775 
776 
777 extern "C" {static PyObject *slot_wxNativeFontInfo___str__(PyObject *);}
slot_wxNativeFontInfo___str__(PyObject * sipSelf)778 static PyObject *slot_wxNativeFontInfo___str__(PyObject *sipSelf)
779 {
780      ::wxNativeFontInfo *sipCpp = reinterpret_cast< ::wxNativeFontInfo *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxNativeFontInfo));
781 
782     if (!sipCpp)
783         return SIP_NULLPTR;
784 
785 
786     {
787         {
788              ::wxString*sipRes = 0;
789             int sipIsErr = 0;
790 
791         PyErr_Clear();
792         Py_BEGIN_ALLOW_THREADS
793         sipRes = _wxNativeFontInfo___str__(sipCpp);
794         Py_END_ALLOW_THREADS
795         if (PyErr_Occurred()) sipIsErr = 1;
796 
797             if (sipIsErr)
798                 return 0;
799 
800             return sipConvertFromType(sipRes,sipType_wxString,SIP_NULLPTR);
801         }
802     }
803 
804     return 0;
805 }
806 
807 
808 /* Call the instance's destructor. */
809 extern "C" {static void release_wxNativeFontInfo(void *, int);}
release_wxNativeFontInfo(void * sipCppV,int)810 static void release_wxNativeFontInfo(void *sipCppV, int)
811 {
812     Py_BEGIN_ALLOW_THREADS
813 
814     delete reinterpret_cast< ::wxNativeFontInfo *>(sipCppV);
815 
816     Py_END_ALLOW_THREADS
817 }
818 
819 
820 extern "C" {static void assign_wxNativeFontInfo(void *, SIP_SSIZE_T, void *);}
assign_wxNativeFontInfo(void * sipDst,SIP_SSIZE_T sipDstIdx,void * sipSrc)821 static void assign_wxNativeFontInfo(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
822 {
823     reinterpret_cast< ::wxNativeFontInfo *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxNativeFontInfo *>(sipSrc);
824 }
825 
826 
827 extern "C" {static void *array_wxNativeFontInfo(SIP_SSIZE_T);}
array_wxNativeFontInfo(SIP_SSIZE_T sipNrElem)828 static void *array_wxNativeFontInfo(SIP_SSIZE_T sipNrElem)
829 {
830     return new  ::wxNativeFontInfo[sipNrElem];
831 }
832 
833 
834 extern "C" {static void *copy_wxNativeFontInfo(const void *, SIP_SSIZE_T);}
copy_wxNativeFontInfo(const void * sipSrc,SIP_SSIZE_T sipSrcIdx)835 static void *copy_wxNativeFontInfo(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
836 {
837     return new  ::wxNativeFontInfo(reinterpret_cast<const  ::wxNativeFontInfo *>(sipSrc)[sipSrcIdx]);
838 }
839 
840 
841 extern "C" {static void dealloc_wxNativeFontInfo(sipSimpleWrapper *);}
dealloc_wxNativeFontInfo(sipSimpleWrapper * sipSelf)842 static void dealloc_wxNativeFontInfo(sipSimpleWrapper *sipSelf)
843 {
844     if (sipIsOwnedByPython(sipSelf))
845     {
846         release_wxNativeFontInfo(sipGetAddress(sipSelf), 0);
847     }
848 }
849 
850 
851 extern "C" {static void *init_type_wxNativeFontInfo(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxNativeFontInfo(sipSimpleWrapper *,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)852 static void *init_type_wxNativeFontInfo(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
853 {
854      ::wxNativeFontInfo *sipCpp = SIP_NULLPTR;
855 
856     {
857         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
858         {
859             PyErr_Clear();
860 
861             Py_BEGIN_ALLOW_THREADS
862             sipCpp = new  ::wxNativeFontInfo();
863             Py_END_ALLOW_THREADS
864 
865             if (PyErr_Occurred())
866             {
867                 delete sipCpp;
868                 return SIP_NULLPTR;
869             }
870 
871             return sipCpp;
872         }
873     }
874 
875     {
876         const  ::wxNativeFontInfo* info;
877 
878         static const char *sipKwdList[] = {
879             sipName_info,
880         };
881 
882         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9", sipType_wxNativeFontInfo, &info))
883         {
884             PyErr_Clear();
885 
886             Py_BEGIN_ALLOW_THREADS
887             sipCpp = new  ::wxNativeFontInfo(*info);
888             Py_END_ALLOW_THREADS
889 
890             if (PyErr_Occurred())
891             {
892                 delete sipCpp;
893                 return SIP_NULLPTR;
894             }
895 
896             return sipCpp;
897         }
898     }
899 
900     return SIP_NULLPTR;
901 }
902 
903 
904 /* Define this type's Python slots. */
905 static sipPySlotDef slots_wxNativeFontInfo[] = {
906     {(void *)slot_wxNativeFontInfo___str__, str_slot},
907     {0, (sipPySlotType)0}
908 };
909 
910 
911 static PyMethodDef methods_wxNativeFontInfo[] = {
912     {SIP_MLNAME_CAST(sipName_FromString), SIP_MLMETH_CAST(meth_wxNativeFontInfo_FromString), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_FromString)},
913     {SIP_MLNAME_CAST(sipName_FromUserString), SIP_MLMETH_CAST(meth_wxNativeFontInfo_FromUserString), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_FromUserString)},
914     {SIP_MLNAME_CAST(sipName_GetEncoding), meth_wxNativeFontInfo_GetEncoding, METH_VARARGS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_GetEncoding)},
915     {SIP_MLNAME_CAST(sipName_GetFaceName), meth_wxNativeFontInfo_GetFaceName, METH_VARARGS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_GetFaceName)},
916     {SIP_MLNAME_CAST(sipName_GetFamily), meth_wxNativeFontInfo_GetFamily, METH_VARARGS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_GetFamily)},
917     {SIP_MLNAME_CAST(sipName_GetPointSize), meth_wxNativeFontInfo_GetPointSize, METH_VARARGS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_GetPointSize)},
918     {SIP_MLNAME_CAST(sipName_GetStyle), meth_wxNativeFontInfo_GetStyle, METH_VARARGS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_GetStyle)},
919     {SIP_MLNAME_CAST(sipName_GetUnderlined), meth_wxNativeFontInfo_GetUnderlined, METH_VARARGS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_GetUnderlined)},
920     {SIP_MLNAME_CAST(sipName_GetWeight), meth_wxNativeFontInfo_GetWeight, METH_VARARGS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_GetWeight)},
921     {SIP_MLNAME_CAST(sipName_Init), meth_wxNativeFontInfo_Init, METH_VARARGS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_Init)},
922     {SIP_MLNAME_CAST(sipName_InitFromFont), SIP_MLMETH_CAST(meth_wxNativeFontInfo_InitFromFont), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_InitFromFont)},
923     {SIP_MLNAME_CAST(sipName_SetEncoding), SIP_MLMETH_CAST(meth_wxNativeFontInfo_SetEncoding), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_SetEncoding)},
924     {SIP_MLNAME_CAST(sipName_SetFaceName), SIP_MLMETH_CAST(meth_wxNativeFontInfo_SetFaceName), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_SetFaceName)},
925     {SIP_MLNAME_CAST(sipName_SetFamily), SIP_MLMETH_CAST(meth_wxNativeFontInfo_SetFamily), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_SetFamily)},
926     {SIP_MLNAME_CAST(sipName_SetPointSize), SIP_MLMETH_CAST(meth_wxNativeFontInfo_SetPointSize), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_SetPointSize)},
927     {SIP_MLNAME_CAST(sipName_SetStyle), SIP_MLMETH_CAST(meth_wxNativeFontInfo_SetStyle), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_SetStyle)},
928     {SIP_MLNAME_CAST(sipName_SetUnderlined), SIP_MLMETH_CAST(meth_wxNativeFontInfo_SetUnderlined), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_SetUnderlined)},
929     {SIP_MLNAME_CAST(sipName_SetWeight), SIP_MLMETH_CAST(meth_wxNativeFontInfo_SetWeight), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_SetWeight)},
930     {SIP_MLNAME_CAST(sipName_ToString), meth_wxNativeFontInfo_ToString, METH_VARARGS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_ToString)},
931     {SIP_MLNAME_CAST(sipName_ToUserString), meth_wxNativeFontInfo_ToUserString, METH_VARARGS, SIP_MLDOC_CAST(doc_wxNativeFontInfo_ToUserString)}
932 };
933 
934 sipVariableDef variables_wxNativeFontInfo[] = {
935     {PropertyVariable, sipName_Weight, &methods_wxNativeFontInfo[8], &methods_wxNativeFontInfo[17], SIP_NULLPTR, SIP_NULLPTR},
936     {PropertyVariable, sipName_Underlined, &methods_wxNativeFontInfo[7], &methods_wxNativeFontInfo[16], SIP_NULLPTR, SIP_NULLPTR},
937     {PropertyVariable, sipName_Style, &methods_wxNativeFontInfo[6], &methods_wxNativeFontInfo[15], SIP_NULLPTR, SIP_NULLPTR},
938     {PropertyVariable, sipName_PointSize, &methods_wxNativeFontInfo[5], &methods_wxNativeFontInfo[14], SIP_NULLPTR, SIP_NULLPTR},
939     {PropertyVariable, sipName_Family, &methods_wxNativeFontInfo[4], &methods_wxNativeFontInfo[13], SIP_NULLPTR, SIP_NULLPTR},
940     {PropertyVariable, sipName_FaceName, &methods_wxNativeFontInfo[3], &methods_wxNativeFontInfo[12], SIP_NULLPTR, SIP_NULLPTR},
941     {PropertyVariable, sipName_Encoding, &methods_wxNativeFontInfo[2], &methods_wxNativeFontInfo[11], SIP_NULLPTR, SIP_NULLPTR},
942 };
943 
944 PyDoc_STRVAR(doc_wxNativeFontInfo, "NativeFontInfo()\n"
945 "NativeFontInfo(info)\n"
946 "\n"
947 "wxNativeFontInfo is platform-specific font representation: this class\n"
948 "should be considered as an opaque font description only used by the\n"
949 "native functions, the user code can only get the objects of this type\n"
950 "from somewhere and pass it somewhere else (possibly save them\n"
951 "somewhere using ToString() and restore them using FromString())");
952 
953 
954 sipClassTypeDef sipTypeDef__core_wxNativeFontInfo = {
955     {
956         -1,
957         SIP_NULLPTR,
958         SIP_NULLPTR,
959         SIP_TYPE_CLASS,
960         sipNameNr_wxNativeFontInfo,
961         {SIP_NULLPTR},
962         SIP_NULLPTR
963     },
964     {
965         sipNameNr_NativeFontInfo,
966         {0, 0, 1},
967         20, methods_wxNativeFontInfo,
968         0, SIP_NULLPTR,
969         7, variables_wxNativeFontInfo,
970         {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
971     },
972     doc_wxNativeFontInfo,
973     -1,
974     -1,
975     SIP_NULLPTR,
976     slots_wxNativeFontInfo,
977     init_type_wxNativeFontInfo,
978     SIP_NULLPTR,
979     SIP_NULLPTR,
980 #if PY_MAJOR_VERSION >= 3
981     SIP_NULLPTR,
982     SIP_NULLPTR,
983 #else
984     SIP_NULLPTR,
985     SIP_NULLPTR,
986     SIP_NULLPTR,
987     SIP_NULLPTR,
988 #endif
989     dealloc_wxNativeFontInfo,
990     assign_wxNativeFontInfo,
991     array_wxNativeFontInfo,
992     copy_wxNativeFontInfo,
993     release_wxNativeFontInfo,
994     SIP_NULLPTR,
995     SIP_NULLPTR,
996     SIP_NULLPTR,
997     SIP_NULLPTR,
998     SIP_NULLPTR,
999     SIP_NULLPTR,
1000     SIP_NULLPTR
1001 };
1002