small wxGTK compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-06-30 20:33:30 +00:00
parent 4f4a180e21
commit abca8ebff1
6 changed files with 27 additions and 27 deletions

View File

@ -24,7 +24,6 @@
#endif // wxUSE_GUI
#include "wx/build.h"
#include "wx/init.h"
class WXDLLEXPORT wxApp;
class WXDLLEXPORT wxAppTraits;
@ -553,14 +552,9 @@ public:
// be in your main program (e.g. hello.cpp). Now IMPLEMENT_APP should add this
// code if required.
#if !wxUSE_GUI || defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXPM__) || defined(__WXMGL__) || defined(__WXCOCOA__)
#define IMPLEMENT_WXWIN_MAIN \
extern int wxEntry( int argc, char **argv ); \
int main(int argc, char **argv) { return wxEntry(argc, argv); }
#elif defined(__WXMAC__)
// wxMac seems to have a specific wxEntry prototype
#define IMPLEMENT_WXWIN_MAIN \
extern int wxEntry( int argc, char **argv, bool enterLoop = TRUE ); \
#if !wxUSE_GUI || !defined(__WXMSW__)
#define IMPLEMENT_WXWIN_MAIN \
extern int wxEntry( int& argc, char **argv ); \
int main(int argc, char **argv) { return wxEntry(argc, argv); }
#elif defined(__WXMSW__) && defined(WXUSINGDLL)
#define IMPLEMENT_WXWIN_MAIN \

View File

@ -96,6 +96,4 @@ private:
DECLARE_EVENT_TABLE()
};
int WXDLLEXPORT wxEntry( int argc, char *argv[] );
#endif // __GTKAPPH__

View File

@ -96,6 +96,4 @@ private:
DECLARE_EVENT_TABLE()
};
int WXDLLEXPORT wxEntry( int argc, char *argv[] );
#endif // __GTKAPPH__

View File

@ -31,6 +31,8 @@
#include "wx/thread.h"
#endif
#include "wx/init.h"
#include "wx/ptr_scpd.h"
#include "wx/module.h"
@ -409,7 +411,7 @@ int wxEntryReal(int& argc, wxChar **argv)
extern unsigned long wxGlobalSEHandler();
int wxEntry(int argc, wxChar **argv)
int wxEntry(int& argc, wxChar **argv)
{
__try
{
@ -429,7 +431,7 @@ int wxEntry(int argc, wxChar **argv)
#if wxUSE_UNICODE
// as with wxEntryStart, we provide an ANSI wrapper
int wxEntry(int argc, char **argv)
int wxEntry(int& argc, char **argv)
{
ConvertArgsToUnicode(argc, argv);

View File

@ -671,11 +671,8 @@ void wxApp::Dispatch()
gtk_main_iteration();
}
bool wxApp::Initialize(int argc, wxChar **argv)
bool wxApp::Initialize(int& argc, wxChar **argv)
{
if ( !wxAppBase::Initialize(argc, argv) )
return false;
#if wxUSE_THREADS
// GTK 1.2 up to version 1.2.3 has broken threads
if ((gtk_major_version == 1) &&
@ -751,6 +748,13 @@ bool wxApp::Initialize(int argc, wxChar **argv)
// we can not enter threads before gtk_init is done
gdk_threads_enter();
if ( !wxAppBase::Initialize(argc, argv) )
{
gdk_threads_leave();
return false;
}
wxSetDetectableAutoRepeat( TRUE );
#if wxUSE_INTL
@ -764,9 +768,9 @@ bool wxApp::Initialize(int argc, wxChar **argv)
void wxApp::CleanUp()
{
wxAppBase::CleanUp();
gdk_threads_leave();
wxAppBase::CleanUp();
}
#ifdef __WXDEBUG__

View File

@ -671,11 +671,8 @@ void wxApp::Dispatch()
gtk_main_iteration();
}
bool wxApp::Initialize(int argc, wxChar **argv)
bool wxApp::Initialize(int& argc, wxChar **argv)
{
if ( !wxAppBase::Initialize(argc, argv) )
return false;
#if wxUSE_THREADS
// GTK 1.2 up to version 1.2.3 has broken threads
if ((gtk_major_version == 1) &&
@ -751,6 +748,13 @@ bool wxApp::Initialize(int argc, wxChar **argv)
// we can not enter threads before gtk_init is done
gdk_threads_enter();
if ( !wxAppBase::Initialize(argc, argv) )
{
gdk_threads_leave();
return false;
}
wxSetDetectableAutoRepeat( TRUE );
#if wxUSE_INTL
@ -764,9 +768,9 @@ bool wxApp::Initialize(int argc, wxChar **argv)
void wxApp::CleanUp()
{
wxAppBase::CleanUp();
gdk_threads_leave();
wxAppBase::CleanUp();
}
#ifdef __WXDEBUG__