X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=c%2B%2B%2Fcursesapp.h;h=9d7b8a3958c2dbbd7b0f96848e331db6c29b859c;hp=bafc95a80b7477d9b6d683e9dd3f977fe11b4488;hb=61790aa3ac9e0dff2b443ac567b174fc4d235b86;hpb=04d942c3d98cf0a929c6afb17be8c10d4ae39af0 diff --git a/c++/cursesapp.h b/c++/cursesapp.h index bafc95a8..9d7b8a39 100644 --- a/c++/cursesapp.h +++ b/c++/cursesapp.h @@ -32,13 +32,24 @@ * Author: Juergen Pfeifer, 1997 * ****************************************************************************/ -// $Id: cursesapp.h,v 1.15 2020/05/24 01:40:20 anonymous.maarten Exp $ +// $Id: cursesapp.h,v 1.17 2020/08/29 16:22:03 juergen Exp $ #ifndef NCURSES_CURSESAPP_H_incl #define NCURSES_CURSESAPP_H_incl #include +#if (defined(_WIN32) || defined(_WIN64)) +# define NCURSES_CXX_MAIN_NAME cursespp_main +# define NCURSES_CXX_MAIN \ + int main(int argc, char *argv[]) { \ + return NCURSES_CXX_MAIN_NAME(argc, argv); \ + } +#else +# define NCURSES_CXX_MAIN_NAME main +#endif +NCURSES_CXX_IMPEXP int NCURSES_CXX_MAIN_NAME(int argc, char *argv[]); + class NCURSES_CXX_IMPEXP NCursesApplication { public: typedef struct _slk_link { // This structure is used to maintain @@ -106,13 +117,13 @@ protected: { } + static NCursesWindow *&getTitleWindow(); + public: virtual ~NCursesApplication() THROWS(NCursesException); // Get a pointer to the current application object - static NCursesApplication* getApplication() { - return theApp; - } + static NCursesApplication* getApplication(); // This method runs the application and returns its exit value int operator()(void);