/****************************************************************************
- * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2017,2018 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 *
****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.583 2017/07/22 23:19:00 tom Exp $
+ * $Id: curses.priv.h,v 1.588 2018/02/10 16:13:31 tom Exp $
*
* curses.priv.h
*
}
color_t;
+typedef union {
+ struct {
+ unsigned char red;
+ unsigned char green;
+ unsigned char blue;
+ } bits; /* bits per color-value in RGB */
+ unsigned value;
+} rgb_bits_t;
+
/*
* If curses.h did not expose the SCREEN-functions, then we do not need the
* parameter in the corresponding unextended functions.
#if NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR
#define NCURSES_EXT_NUMBERS 1
#define NCURSES_INT2 int
+#define SIZEOF_INT2 4
#define TerminalType(tp) (tp)->type2
#else
#define NCURSES_EXT_NUMBERS 0
#define NCURSES_INT2 short
+#define SIZEOF_INT2 2
#define TerminalType(tp) (tp)->type
#endif
+#define SIZEOF_SHORT 2
+
#ifdef CUR
#undef CUR
#define CUR TerminalType(cur_term).
/*
* Simplify ifdef's for the "*_ATTR" macros in case italics are not configured.
*/
-#ifdef A_ITALIC
+#if defined(A_ITALIC) && defined(exit_italics_mode)
#define USE_ITALIC 1
#else
#define USE_ITALIC 0
+#undef A_ITALIC
#define A_ITALIC 0
#endif
int nested_tracef;
#endif
#endif /* TRACE */
+#if NO_LEAKS
+ bool leak_checking;
+#endif
#ifdef USE_PTHREADS
pthread_mutex_t mutex_curses;
int _scrolling; /* 1 if terminal's smart enough to */
/* used in lib_color.c */
+ rgb_bits_t _direct_color; /* RGB overrides color-table */
color_t *_color_table; /* screen's color palette */
int _color_count; /* count of colors in palette */
colorpair_t *_color_pairs; /* screen's color pair list */
int _pair_count; /* same as COLOR_PAIRS */
int _pair_limit; /* actual limit of color-pairs */
+ int _pair_alloc; /* current table-size of color-pairs */
#if NCURSES_EXT_FUNCS
bool _assumed_color; /* use assumed colors */
bool _default_color; /* use default colors */
#define returnVoidPtr(code) TRACE_RETURN1(code,void_ptr)
#define returnWin(code) TRACE_RETURN1(code,win)
-#define returnDB(code) do { TR(TRACE_DATABASE,(T_RETURN("code %d"), (code))); return (code); } while (0)
+#define returnDB(rc) do { TR(TRACE_DATABASE,(T_RETURN("code %d"), (rc))); return (rc); } while (0)
extern NCURSES_EXPORT(NCURSES_BOOL) _nc_retrace_bool (int);
extern NCURSES_EXPORT(NCURSES_CONST void *) _nc_retrace_cvoid_ptr (NCURSES_CONST void *);
extern NCURSES_EXPORT(int) _nc_init_pair(SCREEN *, int, int, int);
extern NCURSES_EXPORT(int) _nc_pair_content(SCREEN *, int, int *, int *);
extern NCURSES_EXPORT(bool) _nc_reset_colors(void);
+extern NCURSES_EXPORT(colorpair_t *) _nc_reserve_pairs(SCREEN *, int);
extern NCURSES_EXPORT(void) _nc_change_pair(SCREEN *, int);
/* lib_getch.c */
extern NCURSES_EXPORT(int) _nc_mingw_testmouse(
SCREEN * sp,
HANDLE fd,
- int delay);
+ int delay EVENTLIST_2nd(_nc_eventlist*));
#else
#endif
extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER;