summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-curses-color.h
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-03-16 22:04:18 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-03-17 18:52:30 +0100
commit3640d187b8ea37dfb433ce75902f68f4d3f7cd75 (patch)
treec14dc7645ceca8fbffe9b2907d202542ee3583a0 /src/gui/curses/gui-curses-color.h
parent313b40235ac5f4a5bef4e27a9d2b8331e6b0c8ac (diff)
downloadweechat-3640d187b8ea37dfb433ce75902f68f4d3f7cd75.zip
core: split gui-curses.h into multiple headers
Diffstat (limited to 'src/gui/curses/gui-curses-color.h')
-rw-r--r--src/gui/curses/gui-curses-color.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/gui/curses/gui-curses-color.h b/src/gui/curses/gui-curses-color.h
new file mode 100644
index 000000000..defc43a13
--- /dev/null
+++ b/src/gui/curses/gui-curses-color.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2003-2023 Sébastien Helleu <flashcode@flashtux.org>
+ *
+ * This file is part of WeeChat, the extensible chat client.
+ *
+ * WeeChat is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * WeeChat is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef WEECHAT_GUI_CURSES_COLOR_H
+#define WEECHAT_GUI_CURSES_COLOR_H
+
+#define GUI_CURSES_NUM_WEECHAT_COLORS 17
+
+#ifndef A_ITALIC /* A_ITALIC is defined in ncurses >= 5.9 patch 20130831 */
+#define A_ITALIC 0
+#endif /* A_ITALIC */
+
+#define A_ALL_ATTR A_BLINK | A_DIM | A_BOLD | A_UNDERLINE | A_REVERSE | A_ITALIC
+
+extern struct t_gui_color *gui_weechat_colors;
+extern int gui_color_term_colors;
+extern int gui_color_num_pairs;
+extern int gui_color_pairs_auto_reset;
+extern int gui_color_pairs_auto_reset_pending;
+extern time_t gui_color_pairs_auto_reset_last;
+extern int gui_color_buffer_refresh_needed;
+
+extern int gui_color_get_gui_attrs (int color);
+extern int gui_color_get_pair (int fg, int bg);
+extern int gui_color_weechat_get_pair (int weechat_color);
+extern void gui_color_alloc ();
+
+#endif /* WEECHAT_GUI_CURSES_COLOR_H */