X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2049ba38adafa0ec146880de29f26e32dd69a125..4875458c3e56c10f92e6ba9d85bea68435386beb:/include/wx/app.h diff --git a/include/wx/app.h b/include/wx/app.h index c4a3d4ba43..64b479d1f0 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -9,29 +9,34 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __APPH_BASE__ -#define __APPH_BASE__ +#ifndef _WX_APP_H_BASE_ +#define _WX_APP_H_BASE_ -#ifndef __WXGTK__ +#ifdef __WXMSW__ class WXDLLEXPORT wxApp; typedef wxApp* (*wxAppInitializerFunction) (void); #endif #include "wx/object.h" -#ifdef __WXGTK__ +#ifndef __WXMSW__ typedef wxObject* (*wxAppInitializerFunction) (void); // returning wxApp* won't work with gcc #endif #if defined(__WXMSW__) #include "wx/msw/app.h" #elif defined(__WXMOTIF__) -#include "wx/xt/app.h" +#include "wx/motif/app.h" +#elif defined(__WXQT__) +#include "wx/qt/app.h" #elif defined(__WXGTK__) #include "wx/gtk/app.h" +#elif defined(__WXMAC__) +#include "wx/mac/app.h" +#elif defined(__WXSTUBS__) +#include "wx/stubs/app.h" #endif - // Having a global instance of this class allows // wxApp to be aware of the app creator function. // wxApp can then call this function to create a new @@ -55,6 +60,26 @@ public: #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) + +// NT defines APIENTRY, 3.x not +#if !defined(WXAPIENTRY) +# ifdef __WATCOMC__ +# define WXAPIENTRY PASCAL +# else +# define WXAPIENTRY FAR PASCAL +# endif +#endif + +#define IMPLEMENT_WXWIN_MAIN \ +int WXAPIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,\ + LPSTR m_lpCmdLine, int nCmdShow )\ +{\ + return wxEntry((WXHINSTANCE) hInstance, (WXHINSTANCE) hPrevInstance,\ + m_lpCmdLine, nCmdShow);\ +} + #else #define IMPLEMENT_WXWIN_MAIN #endif @@ -70,4 +95,4 @@ int main(int argc, char *argv[]) { return wxEntry(argc, argv); } #endif - // __APPH_BASE__ + // _WX_APP_H_BASE_