]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - include/curses.h.in
ncurses 5.7 - patch 20100109
[ncurses.git] / include / curses.h.in
index 0220752b935f3a90f531efca0ecc12f4d99d1a5c..ac5a400a761d04571cc9956b92214a2b0464d862 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.202 2009/06/13 21:44:51 tom Exp $ */
+/* $Id: curses.h.in,v 1.208 2010/01/09 19:34:26 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
 #define NCURSES_REENTRANT @cf_cv_enable_reentrant@
 #endif
 
 #define NCURSES_REENTRANT @cf_cv_enable_reentrant@
 #endif
 
+/*
+ * Control whether bindings for interop support are added.
+ */
+#undef NCURSES_INTEROP_FUNCS
+#define        NCURSES_INTEROP_FUNCS @NCURSES_INTEROP_FUNCS@
+
 /*
  * The internal type used for window dimensions.
  */
 /*
  * The internal type used for window dimensions.
  */
@@ -344,7 +350,13 @@ typedef unsigned short wchar_t@NCURSES_OK_WCHAR_T@;
 typedef unsigned int wint_t@NCURSES_OK_WCHAR_T@;
 #endif
 
 typedef unsigned int wint_t@NCURSES_OK_WCHAR_T@;
 #endif
 
-#define CCHARW_MAX     5
+/*
+ * cchar_t stores an array of CCHARW_MAX wide characters.  The first is
+ * normally a spacing character.  The others are non-spacing.  If those
+ * (spacing and nonspacing) do not fill the array, a null L'\0' follows. 
+ * Otherwise, a null is assumed to follow when extracting via getcchar().
+ */
+#define CCHARW_MAX     @NCURSES_CCHARW_MAX@
 typedef struct
 {
     attr_t     attr;
 typedef struct
 {
     attr_t     attr;
@@ -811,6 +823,8 @@ extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,long,l
 extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...);       /* special */
 #endif
 
 extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...);       /* special */
 #endif
 
+extern NCURSES_EXPORT(char *) tiparm (const char *, ...);              /* special */
+
 /*
  * These functions are not in X/Open, but we use them in macro definitions:
  */
 /*
  * These functions are not in X/Open, but we use them in macro definitions:
  */
@@ -844,6 +858,7 @@ extern NCURSES_EXPORT(char *) keybound (int, int);
 extern NCURSES_EXPORT(const char *) curses_version (void);
 extern NCURSES_EXPORT(int) assume_default_colors (int, int);
 extern NCURSES_EXPORT(int) define_key (const char *, int);
 extern NCURSES_EXPORT(const char *) curses_version (void);
 extern NCURSES_EXPORT(int) assume_default_colors (int, int);
 extern NCURSES_EXPORT(int) define_key (const char *, int);
+extern NCURSES_EXPORT(int) get_escdelay (void);
 extern NCURSES_EXPORT(int) key_defined (const char *);
 extern NCURSES_EXPORT(int) keyok (int, bool);
 extern NCURSES_EXPORT(int) resize_term (int, int);
 extern NCURSES_EXPORT(int) key_defined (const char *);
 extern NCURSES_EXPORT(int) keyok (int, bool);
 extern NCURSES_EXPORT(int) resize_term (int, int);
@@ -871,7 +886,9 @@ extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *);             /* @GENERATED_EXT_FUNCS
 extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *);       /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *);       /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *);     /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *);       /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *);       /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *);     /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_pad (const WINDOW *);           /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *);      /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *);      /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_subwin (const WINDOW *);                /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *);                /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */
 
 extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *);                /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */
 
@@ -1087,9 +1104,11 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int);
 #if !NCURSES_OPAQUE
 #if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@
 #define wattrset(win,at)       ((win)->_color = PAIR_NUMBER(at), \
 #if !NCURSES_OPAQUE
 #if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@
 #define wattrset(win,at)       ((win)->_color = PAIR_NUMBER(at), \
-                                 NCURSES_CAST(int, (win)->_attrs = (at)))
+                                 (win)->_attrs = (at), \
+                                 NCURSES_CAST(int, (win)->_attrs))
 #else
 #else
-#define wattrset(win,at)        NCURSES_CAST(int, (win)->_attrs = (at))
+#define wattrset(win,at)        ((win)->_attrs = (at), \
+                                NCURSES_CAST(int, (win)->_attrs))
 #endif
 #endif /* NCURSES_OPAQUE */
 
 #endif
 #endif /* NCURSES_OPAQUE */
 
@@ -1264,16 +1283,18 @@ NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
  */
 #if @NCURSES_EXT_FUNCS@
 #if !NCURSES_OPAQUE
  */
 #if @NCURSES_EXT_FUNCS@
 #if !NCURSES_OPAQUE
-#define is_cleared(win)                ((win)->_clear)
-#define is_idcok(win)          ((win)->_idcok)
-#define is_idlok(win)          ((win)->_idlok)
-#define is_immedok(win)                ((win)->_immed)
-#define is_keypad(win)         ((win)->_use_keypad)
-#define is_leaveok(win)                ((win)->_leaveok)
-#define is_nodelay(win)                ((win)->_delay == 0)
-#define is_notimeout(win)      ((win)->_notimeout)
-#define is_scrollok(win)       ((win)->_scroll)
-#define is_syncok(win)         ((win)->_sync)
+#define is_cleared(win)                ((win) ? (win)->_clear : FALSE)
+#define is_idcok(win)          ((win) ? (win)->_idcok : FALSE)
+#define is_idlok(win)          ((win) ? (win)->_idlok : FALSE)
+#define is_immedok(win)                ((win) ? (win)->_immed : FALSE)
+#define is_keypad(win)         ((win) ? (win)->_use_keypad : FALSE)
+#define is_leaveok(win)                ((win) ? (win)->_leaveok : FALSE)
+#define is_nodelay(win)                ((win) ? ((win)->_delay == 0) : FALSE)
+#define is_notimeout(win)      ((win) ? (win)->_notimeout : FALSE)
+#define is_pad(win)            ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
+#define is_scrollok(win)       ((win) ? (win)->_scroll : FALSE)
+#define is_subwin(win)         ((win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE)
+#define is_syncok(win)         ((win) ? (win)->_sync : FALSE)
 #define wgetparent(win)                ((win) ? (win)->_parent : 0)
 #define wgetscrreg(win,t,b)    ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
 #endif
 #define wgetparent(win)                ((win) ? (win)->_parent : 0)
 #define wgetscrreg(win,t,b)    ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
 #endif