1//---------------------------------------------------------------------------
2// This file is generated by wxPython's SIP generator.  Do not edit by hand.
3//
4// Copyright: (c) 2018 by Total Control Software
5// License:   wxWindows License
6//
7// This file will be included by _core.sip
8//
9//---------------------------------------------------------------------------
10
11//---------------------------------------------------------------------------
12
13enum wxLanguage
14{
15    wxLANGUAGE_DEFAULT,
16    wxLANGUAGE_UNKNOWN,
17    wxLANGUAGE_ABKHAZIAN,
18    wxLANGUAGE_AFAR,
19    wxLANGUAGE_AFRIKAANS,
20    wxLANGUAGE_ALBANIAN,
21    wxLANGUAGE_AMHARIC,
22    wxLANGUAGE_ARABIC,
23    wxLANGUAGE_ARABIC_ALGERIA,
24    wxLANGUAGE_ARABIC_BAHRAIN,
25    wxLANGUAGE_ARABIC_EGYPT,
26    wxLANGUAGE_ARABIC_IRAQ,
27    wxLANGUAGE_ARABIC_JORDAN,
28    wxLANGUAGE_ARABIC_KUWAIT,
29    wxLANGUAGE_ARABIC_LEBANON,
30    wxLANGUAGE_ARABIC_LIBYA,
31    wxLANGUAGE_ARABIC_MOROCCO,
32    wxLANGUAGE_ARABIC_OMAN,
33    wxLANGUAGE_ARABIC_QATAR,
34    wxLANGUAGE_ARABIC_SAUDI_ARABIA,
35    wxLANGUAGE_ARABIC_SUDAN,
36    wxLANGUAGE_ARABIC_SYRIA,
37    wxLANGUAGE_ARABIC_TUNISIA,
38    wxLANGUAGE_ARABIC_UAE,
39    wxLANGUAGE_ARABIC_YEMEN,
40    wxLANGUAGE_ARMENIAN,
41    wxLANGUAGE_ASSAMESE,
42    wxLANGUAGE_ASTURIAN,
43    wxLANGUAGE_AYMARA,
44    wxLANGUAGE_AZERI,
45    wxLANGUAGE_AZERI_CYRILLIC,
46    wxLANGUAGE_AZERI_LATIN,
47    wxLANGUAGE_BASHKIR,
48    wxLANGUAGE_BASQUE,
49    wxLANGUAGE_BELARUSIAN,
50    wxLANGUAGE_BENGALI,
51    wxLANGUAGE_BHUTANI,
52    wxLANGUAGE_BIHARI,
53    wxLANGUAGE_BISLAMA,
54    wxLANGUAGE_BOSNIAN,
55    wxLANGUAGE_BRETON,
56    wxLANGUAGE_BULGARIAN,
57    wxLANGUAGE_BURMESE,
58    wxLANGUAGE_CAMBODIAN,
59    wxLANGUAGE_CATALAN,
60    wxLANGUAGE_CHINESE,
61    wxLANGUAGE_CHINESE_SIMPLIFIED,
62    wxLANGUAGE_CHINESE_TRADITIONAL,
63    wxLANGUAGE_CHINESE_HONGKONG,
64    wxLANGUAGE_CHINESE_MACAU,
65    wxLANGUAGE_CHINESE_SINGAPORE,
66    wxLANGUAGE_CHINESE_TAIWAN,
67    wxLANGUAGE_CORSICAN,
68    wxLANGUAGE_CROATIAN,
69    wxLANGUAGE_CZECH,
70    wxLANGUAGE_DANISH,
71    wxLANGUAGE_DUTCH,
72    wxLANGUAGE_DUTCH_BELGIAN,
73    wxLANGUAGE_ENGLISH,
74    wxLANGUAGE_ENGLISH_UK,
75    wxLANGUAGE_ENGLISH_US,
76    wxLANGUAGE_ENGLISH_AUSTRALIA,
77    wxLANGUAGE_ENGLISH_BELIZE,
78    wxLANGUAGE_ENGLISH_BOTSWANA,
79    wxLANGUAGE_ENGLISH_CANADA,
80    wxLANGUAGE_ENGLISH_CARIBBEAN,
81    wxLANGUAGE_ENGLISH_DENMARK,
82    wxLANGUAGE_ENGLISH_EIRE,
83    wxLANGUAGE_ENGLISH_JAMAICA,
84    wxLANGUAGE_ENGLISH_NEW_ZEALAND,
85    wxLANGUAGE_ENGLISH_PHILIPPINES,
86    wxLANGUAGE_ENGLISH_SOUTH_AFRICA,
87    wxLANGUAGE_ENGLISH_TRINIDAD,
88    wxLANGUAGE_ENGLISH_ZIMBABWE,
89    wxLANGUAGE_ESPERANTO,
90    wxLANGUAGE_ESTONIAN,
91    wxLANGUAGE_FAEROESE,
92    wxLANGUAGE_FARSI,
93    wxLANGUAGE_FIJI,
94    wxLANGUAGE_FINNISH,
95    wxLANGUAGE_FRENCH,
96    wxLANGUAGE_FRENCH_BELGIAN,
97    wxLANGUAGE_FRENCH_CANADIAN,
98    wxLANGUAGE_FRENCH_LUXEMBOURG,
99    wxLANGUAGE_FRENCH_MONACO,
100    wxLANGUAGE_FRENCH_SWISS,
101    wxLANGUAGE_FRISIAN,
102    wxLANGUAGE_GALICIAN,
103    wxLANGUAGE_GEORGIAN,
104    wxLANGUAGE_GERMAN,
105    wxLANGUAGE_GERMAN_AUSTRIAN,
106    wxLANGUAGE_GERMAN_BELGIUM,
107    wxLANGUAGE_GERMAN_LIECHTENSTEIN,
108    wxLANGUAGE_GERMAN_LUXEMBOURG,
109    wxLANGUAGE_GERMAN_SWISS,
110    wxLANGUAGE_GREEK,
111    wxLANGUAGE_GREENLANDIC,
112    wxLANGUAGE_GUARANI,
113    wxLANGUAGE_GUJARATI,
114    wxLANGUAGE_HAUSA,
115    wxLANGUAGE_HEBREW,
116    wxLANGUAGE_HINDI,
117    wxLANGUAGE_HUNGARIAN,
118    wxLANGUAGE_ICELANDIC,
119    wxLANGUAGE_INDONESIAN,
120    wxLANGUAGE_INTERLINGUA,
121    wxLANGUAGE_INTERLINGUE,
122    wxLANGUAGE_INUKTITUT,
123    wxLANGUAGE_INUPIAK,
124    wxLANGUAGE_IRISH,
125    wxLANGUAGE_ITALIAN,
126    wxLANGUAGE_ITALIAN_SWISS,
127    wxLANGUAGE_JAPANESE,
128    wxLANGUAGE_JAVANESE,
129    wxLANGUAGE_KANNADA,
130    wxLANGUAGE_KASHMIRI,
131    wxLANGUAGE_KASHMIRI_INDIA,
132    wxLANGUAGE_KAZAKH,
133    wxLANGUAGE_KERNEWEK,
134    wxLANGUAGE_KINYARWANDA,
135    wxLANGUAGE_KIRGHIZ,
136    wxLANGUAGE_KIRUNDI,
137    wxLANGUAGE_KONKANI,
138    wxLANGUAGE_KOREAN,
139    wxLANGUAGE_KURDISH,
140    wxLANGUAGE_LAOTHIAN,
141    wxLANGUAGE_LATIN,
142    wxLANGUAGE_LATVIAN,
143    wxLANGUAGE_LINGALA,
144    wxLANGUAGE_LITHUANIAN,
145    wxLANGUAGE_MACEDONIAN,
146    wxLANGUAGE_MALAGASY,
147    wxLANGUAGE_MALAY,
148    wxLANGUAGE_MALAYALAM,
149    wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM,
150    wxLANGUAGE_MALAY_MALAYSIA,
151    wxLANGUAGE_MALTESE,
152    wxLANGUAGE_MANIPURI,
153    wxLANGUAGE_MAORI,
154    wxLANGUAGE_MARATHI,
155    wxLANGUAGE_MOLDAVIAN,
156    wxLANGUAGE_MONGOLIAN,
157    wxLANGUAGE_NAURU,
158    wxLANGUAGE_NEPALI,
159    wxLANGUAGE_NEPALI_INDIA,
160    wxLANGUAGE_NORWEGIAN_BOKMAL,
161    wxLANGUAGE_NORWEGIAN_NYNORSK,
162    wxLANGUAGE_OCCITAN,
163    wxLANGUAGE_ORIYA,
164    wxLANGUAGE_OROMO,
165    wxLANGUAGE_PASHTO,
166    wxLANGUAGE_POLISH,
167    wxLANGUAGE_PORTUGUESE,
168    wxLANGUAGE_PORTUGUESE_BRAZILIAN,
169    wxLANGUAGE_PUNJABI,
170    wxLANGUAGE_QUECHUA,
171    wxLANGUAGE_RHAETO_ROMANCE,
172    wxLANGUAGE_ROMANIAN,
173    wxLANGUAGE_RUSSIAN,
174    wxLANGUAGE_RUSSIAN_UKRAINE,
175    wxLANGUAGE_SAMI,
176    wxLANGUAGE_SAMOAN,
177    wxLANGUAGE_SANGHO,
178    wxLANGUAGE_SANSKRIT,
179    wxLANGUAGE_SCOTS_GAELIC,
180    wxLANGUAGE_SERBIAN,
181    wxLANGUAGE_SERBIAN_CYRILLIC,
182    wxLANGUAGE_SERBIAN_LATIN,
183    wxLANGUAGE_SERBO_CROATIAN,
184    wxLANGUAGE_SESOTHO,
185    wxLANGUAGE_SETSWANA,
186    wxLANGUAGE_SHONA,
187    wxLANGUAGE_SINDHI,
188    wxLANGUAGE_SINHALESE,
189    wxLANGUAGE_SISWATI,
190    wxLANGUAGE_SLOVAK,
191    wxLANGUAGE_SLOVENIAN,
192    wxLANGUAGE_SOMALI,
193    wxLANGUAGE_SPANISH,
194    wxLANGUAGE_SPANISH_ARGENTINA,
195    wxLANGUAGE_SPANISH_BOLIVIA,
196    wxLANGUAGE_SPANISH_CHILE,
197    wxLANGUAGE_SPANISH_COLOMBIA,
198    wxLANGUAGE_SPANISH_COSTA_RICA,
199    wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC,
200    wxLANGUAGE_SPANISH_ECUADOR,
201    wxLANGUAGE_SPANISH_EL_SALVADOR,
202    wxLANGUAGE_SPANISH_GUATEMALA,
203    wxLANGUAGE_SPANISH_HONDURAS,
204    wxLANGUAGE_SPANISH_MEXICAN,
205    wxLANGUAGE_SPANISH_MODERN,
206    wxLANGUAGE_SPANISH_NICARAGUA,
207    wxLANGUAGE_SPANISH_PANAMA,
208    wxLANGUAGE_SPANISH_PARAGUAY,
209    wxLANGUAGE_SPANISH_PERU,
210    wxLANGUAGE_SPANISH_PUERTO_RICO,
211    wxLANGUAGE_SPANISH_URUGUAY,
212    wxLANGUAGE_SPANISH_US,
213    wxLANGUAGE_SPANISH_VENEZUELA,
214    wxLANGUAGE_SUNDANESE,
215    wxLANGUAGE_SWAHILI,
216    wxLANGUAGE_SWEDISH,
217    wxLANGUAGE_SWEDISH_FINLAND,
218    wxLANGUAGE_TAGALOG,
219    wxLANGUAGE_TAJIK,
220    wxLANGUAGE_TAMIL,
221    wxLANGUAGE_TATAR,
222    wxLANGUAGE_TELUGU,
223    wxLANGUAGE_THAI,
224    wxLANGUAGE_TIBETAN,
225    wxLANGUAGE_TIGRINYA,
226    wxLANGUAGE_TONGA,
227    wxLANGUAGE_TSONGA,
228    wxLANGUAGE_TURKISH,
229    wxLANGUAGE_TURKMEN,
230    wxLANGUAGE_TWI,
231    wxLANGUAGE_UIGHUR,
232    wxLANGUAGE_UKRAINIAN,
233    wxLANGUAGE_URDU,
234    wxLANGUAGE_URDU_INDIA,
235    wxLANGUAGE_URDU_PAKISTAN,
236    wxLANGUAGE_UZBEK,
237    wxLANGUAGE_UZBEK_CYRILLIC,
238    wxLANGUAGE_UZBEK_LATIN,
239    wxLANGUAGE_VALENCIAN,
240    wxLANGUAGE_VIETNAMESE,
241    wxLANGUAGE_VOLAPUK,
242    wxLANGUAGE_WELSH,
243    wxLANGUAGE_WOLOF,
244    wxLANGUAGE_XHOSA,
245    wxLANGUAGE_YIDDISH,
246    wxLANGUAGE_YORUBA,
247    wxLANGUAGE_ZHUANG,
248    wxLANGUAGE_ZULU,
249    wxLANGUAGE_KABYLE,
250    wxLANGUAGE_USER_DEFINED
251};
252
253enum wxLayoutDirection
254{
255    wxLayout_Default,
256    wxLayout_LeftToRight,
257    wxLayout_RightToLeft
258};
259
260enum wxLocaleCategory
261{
262    wxLOCALE_CAT_NUMBER,
263    wxLOCALE_CAT_DATE,
264    wxLOCALE_CAT_MONEY,
265    wxLOCALE_CAT_DEFAULT
266};
267
268enum wxLocaleInfo
269{
270    wxLOCALE_THOUSANDS_SEP,
271    wxLOCALE_DECIMAL_POINT,
272    wxLOCALE_SHORT_DATE_FMT,
273    wxLOCALE_LONG_DATE_FMT,
274    wxLOCALE_DATE_TIME_FMT,
275    wxLOCALE_TIME_FMT
276};
277
278enum wxLocaleInitFlags
279{
280    wxLOCALE_DONT_LOAD_DEFAULT,
281    wxLOCALE_LOAD_DEFAULT
282};
283
284struct wxLanguageInfo
285{
286    %Docstring
287        Encapsulates a wxLanguage identifier together with OS-specific
288        information related to that language.
289    %End
290    %TypeHeaderCode
291        #include <wx/intl.h>
292    %End
293
294    int Language;
295
296    wxString CanonicalName;
297
298    wxString Description;
299
300    wxLayoutDirection LayoutDirection;
301
302    wxString GetLocaleName() const;
303    %Docstring
304        GetLocaleName() -> String
305
306        Return the locale name corresponding to this language usable with
307        setlocale() on the current system.
308    %End
309
310    public:
311
312
313    %Property(name=LocaleName, get=GetLocaleName)
314};  // end of class wxLanguageInfo
315
316
317class wxLocale
318{
319    %Docstring
320        Locale()
321        Locale(language, flags=LOCALE_LOAD_DEFAULT)
322        Locale(name, shortName=EmptyString, locale=EmptyString, bLoadDefault=True)
323
324        wxLocale class encapsulates all language-dependent settings and is a
325        generalization of the C locale concept.
326    %End
327    %TypeHeaderCode
328        #include <wx/intl.h>
329    %End
330
331public:
332    wxLocale();
333
334    wxLocale(
335        int language,
336        int flags = wxLOCALE_LOAD_DEFAULT
337    );
338
339    wxLocale(
340        const wxString & name,
341        const wxString & shortName = wxEmptyString,
342        const wxString & locale = wxEmptyString,
343        bool bLoadDefault = true
344    );
345
346    virtual
347    ~wxLocale();
348
349    bool AddCatalog(
350        const wxString & domain
351    );
352    %Docstring
353        AddCatalog(domain) -> bool
354        AddCatalog(domain, msgIdLanguage) -> bool
355        AddCatalog(domain, msgIdLanguage, msgIdCharset) -> bool
356
357        Calls wxTranslations::AddCatalog(const wxString&).
358    %End
359
360    bool AddCatalog(
361        const wxString & domain,
362        wxLanguage msgIdLanguage
363    );
364
365    bool AddCatalog(
366        const wxString & domain,
367        wxLanguage msgIdLanguage,
368        const wxString & msgIdCharset
369    );
370
371    wxString GetCanonicalName() const;
372    %Docstring
373        GetCanonicalName() -> String
374
375        Returns the canonical form of current locale name.
376    %End
377
378    wxString GetHeaderValue(
379        const wxString & header,
380        const wxString & domain = wxEmptyString
381    ) const;
382    %Docstring
383        GetHeaderValue(header, domain=EmptyString) -> String
384
385        Calls wxTranslations::GetHeaderValue().
386    %End
387
388    int GetLanguage() const;
389    %Docstring
390        GetLanguage() -> int
391
392        Returns the wxLanguage constant of current language.
393    %End
394
395    const wxString & GetLocale() const;
396    %Docstring
397        GetLocale() -> String
398
399        Returns the locale name as passed to the constructor or Init().
400    %End
401
402    const wxString & GetName() const;
403    %Docstring
404        GetName() -> String
405
406        Returns the current short name for the locale (as given to the
407        constructor or the Init() function).
408    %End
409
410    const wxString & GetString(
411        const wxString & origString,
412        const wxString & domain = wxEmptyString
413    ) const;
414    %Docstring
415        GetString(origString, domain=EmptyString) -> String
416        GetString(origString, origString2, n, domain=EmptyString) -> String
417
418        Calls wxGetTranslation(const wxString&, const wxString&).
419    %End
420
421    const wxString & GetString(
422        const wxString & origString,
423        const wxString & origString2,
424        unsigned n,
425        const wxString & domain = wxEmptyString
426    ) const;
427
428    wxString GetSysName() const;
429    %Docstring
430        GetSysName() -> String
431
432        Returns current platform-specific locale name as passed to
433        setlocale().
434    %End
435
436    bool Init(
437        int language = wxLANGUAGE_DEFAULT,
438        int flags = wxLOCALE_LOAD_DEFAULT
439    );
440    %Docstring
441        Init(language=LANGUAGE_DEFAULT, flags=LOCALE_LOAD_DEFAULT) -> bool
442        Init(name, shortName=EmptyString, locale=EmptyString, bLoadDefault=True) -> bool
443
444        Initializes the wxLocale instance.
445    %End
446
447    bool Init(
448        const wxString & name,
449        const wxString & shortName = wxEmptyString,
450        const wxString & locale = wxEmptyString,
451        bool bLoadDefault = true
452    )   /Deprecated/;
453
454    bool IsLoaded(
455        const wxString & domain
456    ) const;
457    %Docstring
458        IsLoaded(domain) -> bool
459
460        Calls wxTranslations::IsLoaded().
461    %End
462
463    bool IsOk() const;
464    %Docstring
465        IsOk() -> bool
466
467        Returns true if the locale could be set successfully.
468    %End
469
470    static
471    void AddCatalogLookupPathPrefix(
472        const wxString & prefix
473    );
474    %Docstring
475        AddCatalogLookupPathPrefix(prefix)
476
477        Calls wxFileTranslationsLoader::AddCatalogLookupPathPrefix().
478    %End
479
480    static
481    void AddLanguage(
482        const wxLanguageInfo & info
483    );
484    %Docstring
485        AddLanguage(info)
486
487        Adds custom, user-defined language to the database of known languages.
488    %End
489
490    static
491    const wxLanguageInfo * FindLanguageInfo(
492        const wxString & locale
493    );
494    %Docstring
495        FindLanguageInfo(locale) -> LanguageInfo
496
497        This function may be used to find the language description structure
498        for the given locale, specified either as a two letter ISO language
499        code (for example, "pt"), a language code followed by the country code
500        ("pt_BR") or a full, human readable, language description
501        ("Portuguese-Brazil").
502    %End
503
504    static
505    const wxLanguageInfo * GetLanguageInfo(
506        int lang
507    );
508    %Docstring
509        GetLanguageInfo(lang) -> LanguageInfo
510
511        Returns a pointer to wxLanguageInfo structure containing information
512        about the given language or NULL if this language is unknown.
513    %End
514
515    static
516    wxString GetLanguageName(
517        int lang
518    );
519    %Docstring
520        GetLanguageName(lang) -> String
521
522        Returns English name of the given language or empty string if this
523        language is unknown.
524    %End
525
526    static
527    wxString GetLanguageCanonicalName(
528        int lang
529    );
530    %Docstring
531        GetLanguageCanonicalName(lang) -> String
532
533        Returns canonical name (see GetCanonicalName()) of the given language
534        or empty string if this language is unknown.
535    %End
536
537    static
538    wxFontEncoding GetSystemEncoding();
539    %Docstring
540        GetSystemEncoding() -> FontEncoding
541
542        Tries to detect the user's default font encoding.
543    %End
544
545    static
546    wxString GetSystemEncodingName();
547    %Docstring
548        GetSystemEncodingName() -> String
549
550        Tries to detect the name of the user's default font encoding.
551    %End
552
553    static
554    int GetSystemLanguage();
555    %Docstring
556        GetSystemLanguage() -> int
557
558        Tries to detect the user's default locale setting.
559    %End
560
561    static
562    wxString GetInfo(
563        wxLocaleInfo index,
564        wxLocaleCategory cat = wxLOCALE_CAT_DEFAULT
565    );
566    %Docstring
567        GetInfo(index, cat=LOCALE_CAT_DEFAULT) -> String
568
569        Get the values of the given locale-dependent datum.
570    %End
571
572    static
573    bool IsAvailable(
574        int lang
575    );
576    %Docstring
577        IsAvailable(lang) -> bool
578
579        Check whether the operating system and/or C run time environment
580        supports this locale.
581    %End
582
583    private:
584        wxLocale& operator=(const wxLocale&);
585
586
587    private:
588        wxLocale(const wxLocale&);
589
590
591    int __nonzero__();
592    %Docstring
593        __nonzero__() -> int
594    %End
595    %MethodCode
596        PyErr_Clear();
597        Py_BEGIN_ALLOW_THREADS
598        sipRes = _wxLocale___nonzero__(sipCpp);
599        Py_END_ALLOW_THREADS
600        if (PyErr_Occurred()) sipIsErr = 1;
601    %End
602    %TypeCode
603    int _wxLocale___nonzero__(wxLocale* self)
604    {
605        return self->IsOk();
606    }
607    %End
608
609    int __bool__();
610    %Docstring
611        __bool__() -> int
612    %End
613    %MethodCode
614        PyErr_Clear();
615        Py_BEGIN_ALLOW_THREADS
616        sipRes = _wxLocale___bool__(sipCpp);
617        Py_END_ALLOW_THREADS
618        if (PyErr_Occurred()) sipIsErr = 1;
619    %End
620    %TypeCode
621    int _wxLocale___bool__(wxLocale* self)
622    {
623        return self->IsOk();
624    }
625    %End
626
627    public:
628
629
630    %Property(name=CanonicalName, get=GetCanonicalName)
631    %Property(name=Language, get=GetLanguage)
632    %Property(name=Locale, get=GetLocale)
633    %Property(name=Name, get=GetName)
634    %Property(name=SysName, get=GetSysName)
635};  // end of class wxLocale
636
637
638wxLocale * wxGetLocale();
639%Docstring
640    GetLocale() -> Locale
641
642    Get the current locale object (note that it may be NULL!)
643%End
644
645        char* wxSetlocale(int category, const char *locale);
646
647
648%Extract(id=pycode_core)
649#----------------------------------------------------------------------------
650# Add the directory where the wxWidgets catalogs were installed
651# to the default catalog path, if they were put in the pacakge dir.
652import os
653_localedir = os.path.join(os.path.dirname(__file__), "locale")
654if os.path.exists(_localedir):
655    Locale.AddCatalogLookupPathPrefix(_localedir)
656del os
657#----------------------------------------------------------------------------
658
659%End
660
661
662//---------------------------------------------------------------------------
663
664