added wxInitialize() overload taking char**, to make use from main() easier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -62,6 +62,9 @@ extern int WXDLLIMPEXP_BASE wxEntry(int& argc, char **argv);
|
|||||||
// initialize the library (may be called as many times as needed, but each
|
// initialize the library (may be called as many times as needed, but each
|
||||||
// call to wxInitialize() must be matched by wxUninitialize())
|
// call to wxInitialize() must be matched by wxUninitialize())
|
||||||
extern bool WXDLLIMPEXP_BASE wxInitialize(int argc = 0, wxChar **argv = NULL);
|
extern bool WXDLLIMPEXP_BASE wxInitialize(int argc = 0, wxChar **argv = NULL);
|
||||||
|
#if wxUSE_UNICODE && wxABI_VERSION >= 20811
|
||||||
|
extern bool WXDLLIMPEXP_BASE wxInitialize(int argc = 0, char **argv = NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
// clean up -- the library can't be used any more after the last call to
|
// clean up -- the library can't be used any more after the last call to
|
||||||
// wxUninitialize()
|
// wxUninitialize()
|
||||||
@@ -78,6 +81,13 @@ public:
|
|||||||
m_ok = wxInitialize(argc, argv);
|
m_ok = wxInitialize(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE && wxABI_VERSION >= 20811
|
||||||
|
wxInitializer(int argc = 0, char **argv = NULL)
|
||||||
|
{
|
||||||
|
m_ok = wxInitialize(argc, argv);
|
||||||
|
}
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
|
||||||
// has the initialization been successful? (explicit test)
|
// has the initialization been successful? (explicit test)
|
||||||
bool IsOk() const { return m_ok; }
|
bool IsOk() const { return m_ok; }
|
||||||
|
|
||||||
|
@@ -479,6 +479,21 @@ bool wxInitialize(int argc, wxChar **argv)
|
|||||||
return wxEntryStart(argc, argv);
|
return wxEntryStart(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
bool wxInitialize(int argc, char **argv)
|
||||||
|
{
|
||||||
|
wxCRIT_SECT_LOCKER(lockInit, gs_initData.csInit);
|
||||||
|
|
||||||
|
if ( gs_initData.nInitCount++ )
|
||||||
|
{
|
||||||
|
// already initialized
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxEntryStart(argc, argv);
|
||||||
|
}
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
|
||||||
void wxUninitialize()
|
void wxUninitialize()
|
||||||
{
|
{
|
||||||
wxCRIT_SECT_LOCKER(lockInit, gs_initData.csInit);
|
wxCRIT_SECT_LOCKER(lockInit, gs_initData.csInit);
|
||||||
|
Reference in New Issue
Block a user