X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..32e806fe7f0ca4ccee9924f4ded0a8be05de2b89:/include/wx/init.h?ds=sidebyside diff --git a/include/wx/init.h b/include/wx/init.h index a30de75228..3ea8957cc3 100644 --- a/include/wx/init.h +++ b/include/wx/init.h @@ -12,7 +12,8 @@ #ifndef _WX_INIT_H_ #define _WX_INIT_H_ -#include "wx/wxchar.h" +#include "wx/defs.h" +#include "wx/chartype.h" // ---------------------------------------------------------------------------- // wxEntry helper functions which allow to have more fine grained control @@ -60,7 +61,11 @@ extern int WXDLLIMPEXP_BASE wxEntry(int& argc, char **argv); // initialize the library (may be called as many times as needed, but each // call to wxInitialize() must be matched by wxUninitialize()) -extern bool WXDLLIMPEXP_BASE wxInitialize(int argc = 0, wxChar **argv = NULL); +extern bool WXDLLIMPEXP_BASE wxInitialize(); +extern bool WXDLLIMPEXP_BASE wxInitialize(int argc, wxChar **argv); +#if wxUSE_UNICODE +extern bool WXDLLIMPEXP_BASE wxInitialize(int argc, char **argv); +#endif // clean up -- the library can't be used any more after the last call to // wxUninitialize() @@ -72,7 +77,22 @@ class WXDLLIMPEXP_BASE wxInitializer { public: // initialize the library - wxInitializer() { m_ok = wxInitialize(); } + wxInitializer() + { + m_ok = wxInitialize(); + } + + wxInitializer(int argc, wxChar **argv) + { + m_ok = wxInitialize(argc, argv); + } + +#if wxUSE_UNICODE + wxInitializer(int argc, char **argv) + { + m_ok = wxInitialize(argc, argv); + } +#endif // wxUSE_UNICODE // has the initialization been successful? (explicit test) bool IsOk() const { return m_ok; }