]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - c++/cursesw.h
ncurses 6.2 - patch 20200215
[ncurses.git] / c++ / cursesw.h
index ca07b04237f5631fbe6d314f49a71638606f154d..10a2da7ed4a781801368e6914b4a57195761449d 100644 (file)
@@ -1,7 +1,8 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 // vile:cppmode
 /****************************************************************************
- * Copyright (c) 1998-2011,2014 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            *
 #ifndef NCURSES_CURSESW_H_incl
 #define NCURSES_CURSESW_H_incl 1
 
-// $Id: cursesw.h,v 1.50 2014/02/01 22:17:37 tom Exp $
-
-#include <etip.h>
+// $Id: cursesw.h,v 1.56 2020/02/02 23:34:34 tom Exp $
 
 extern "C" {
 #  include   <curses.h>
 }
 
+#include <etip.h>
+
 /* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro.
    Undefine it here, because NCursesWindow uses lines as a method.  */
 #undef lines
@@ -324,6 +325,12 @@ inline void UNDEF(intrflush)(WINDOW *win, bool bf) { intrflush(); }
 #define intrflush UNDEF(intrflush)
 #endif
 
+#ifdef is_linetouched
+inline int UNDEF(is_linetouched)(WINDOW *w, int l)  { return is_linetouched(w,l); }
+#undef is_linetouched
+#define is_linetouched UNDEF(is_linetouched)
+#endif
+
 #ifdef leaveok
 inline int UNDEF(leaveok)(WINDOW* win, bool bf)  { return leaveok(win, bf); }
 #undef leaveok
@@ -831,7 +838,7 @@ public:
   {
   }
 
-  virtual ~NCursesWindow();
+  virtual ~NCursesWindow() THROWS(NCursesException);
 
   NCursesWindow Clone();
   // Make an exact copy of the window.
@@ -1241,7 +1248,7 @@ public:
   // on the value of the changed flag.
 
   bool           is_linetouched(int line) const {
-    return (::is_linetouched(w, line) ? TRUE:FALSE); }
+    return (::is_linetouched(w, line) == TRUE ? TRUE:FALSE); }
   // Return TRUE if line is marked as changed, FALSE otherwise
 
   bool           is_wintouched() const {
@@ -1249,7 +1256,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); }
@@ -1479,7 +1486,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
@@ -1540,7 +1547,7 @@ public:
   }
   // Construct the FramedPad with the given Window win as viewport.
 
-  virtual ~NCursesFramedPad() {
+  virtual ~NCursesFramedPad() THROWS(NCursesException) {
     delete getSubWindow();
   }