X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=c%2B%2B%2Fcursesw.h;h=602b7a9650912544cac6ad385dc1324d8c1b5a94;hp=40b28f575a145b5478cdf79393ece07eaadc8e2d;hb=1f7a36fe16b11bb4aab51be89bbc1b0f75936b78;hpb=8d3ea9021573747ecd129228ba7782a03243f62c diff --git a/c++/cursesw.h b/c++/cursesw.h index 40b28f57..602b7a96 100644 --- a/c++/cursesw.h +++ b/c++/cursesw.h @@ -1,7 +1,8 @@ // * This makes emacs happy -*-Mode: C++;-*- // vile:cppmode /**************************************************************************** - * Copyright (c) 1998-2014,2017 Free Software Foundation, Inc. * + * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,12 +32,23 @@ #ifndef NCURSES_CURSESW_H_incl #define NCURSES_CURSESW_H_incl 1 -// $Id: cursesw.h,v 1.53 2017/11/21 00:37:23 tom Exp $ +// $Id: cursesw.h,v 1.57 2020/07/04 20:38:43 tom Exp $ extern "C" { # include } +#if defined(BUILDING_NCURSES_CXX) +# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT +#else +# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT +#endif + +#define NCURSES_CXX_WRAPPED_VAR(type,name) extern NCURSES_CXX_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) + +#define NCURSES_CXX_EXPORT(type) NCURSES_CXX_IMPEXP type NCURSES_API +#define NCURSES_CXX_EXPORT_VAR(type) NCURSES_CXX_IMPEXP type + #include /* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro. @@ -756,7 +768,7 @@ extern "C" int _nc_ripoffline(int, int (*init)(WINDOW*, int)); extern "C" int _nc_xx_ripoff_init(WINDOW *, int); extern "C" int _nc_has_mouse(void); -class NCURSES_IMPEXP NCursesWindow +class NCURSES_CXX_IMPEXP NCursesWindow { friend class NCursesMenu; friend class NCursesForm; @@ -837,7 +849,7 @@ public: { } - virtual ~NCursesWindow(); + virtual ~NCursesWindow() THROWS(NCursesException); NCursesWindow Clone(); // Make an exact copy of the window. @@ -1255,7 +1267,7 @@ public: // Return TRUE if window is marked as changed, FALSE otherwise int leaveok(bool bf) { return ::leaveok(w, bf); } - // If bf is TRUE, curses will leave the cursor after an update whereever + // If bf is TRUE, curses will leave the cursor after an update wherever // it is after the update. int redrawln(int from, int n) { return ::wredrawln(w, from, n); } @@ -1370,7 +1382,7 @@ public: // ------------------------------------------------------------------------- // We leave this here for compatibility reasons. // ------------------------------------------------------------------------- -class NCURSES_IMPEXP NCursesColorWindow : public NCursesWindow +class NCURSES_CXX_IMPEXP NCursesColorWindow : public NCursesWindow { public: NCursesColorWindow(WINDOW* &window) // useful only for stdscr @@ -1416,7 +1428,7 @@ public: // Pad Support. We allow an association of a pad with a "real" window // through which the pad may be viewed. // ------------------------------------------------------------------------- -class NCURSES_IMPEXP NCursesPad : public NCursesWindow +class NCURSES_CXX_IMPEXP NCursesPad : public NCursesWindow { private: NCursesWindow* viewWin; // the "viewport" window @@ -1485,7 +1497,7 @@ public: { } - virtual ~NCursesPad() {} + virtual ~NCursesPad() THROWS(NCursesException) {} int echochar(const chtype ch) { return ::pechochar(w, ch); } // Put the attributed character onto the pad and immediately do a @@ -1532,7 +1544,7 @@ public: // A FramedPad is constructed always with a viewport window. This viewport // will be framed (by a box() command) and the interior of the box is the // viewport subwindow. On the frame we display scrollbar sliders. -class NCURSES_IMPEXP NCursesFramedPad : public NCursesPad +class NCURSES_CXX_IMPEXP NCursesFramedPad : public NCursesPad { protected: virtual void OnOperation(int pad_req); @@ -1546,7 +1558,7 @@ public: } // Construct the FramedPad with the given Window win as viewport. - virtual ~NCursesFramedPad() { + virtual ~NCursesFramedPad() THROWS(NCursesException) { delete getSubWindow(); }