Files
zoitechat/src/fe-gtk/palette.h

63 lines
2.0 KiB
C
Raw Normal View History

2026-01-05 23:12:38 -07:00
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
2013-04-01 01:02:03 +02:00
#ifndef HEXCHAT_PALETTE_H
#define HEXCHAT_PALETTE_H
2011-02-24 04:14:30 +01:00
extern GdkColor colors[];
#define COL_MARK_FG 32
#define COL_MARK_BG 33
#define COL_FG 34
#define COL_BG 35
#define COL_MARKER 36
#define COL_NEW_DATA 37
#define COL_HILIGHT 38
#define COL_NEW_MSG 39
#define COL_AWAY 40
#define COL_SPELL 41
2013-10-01 07:03:53 -04:00
#define MAX_COL 41
2011-02-24 04:14:30 +01:00
void palette_alloc (GtkWidget * widget);
void palette_load (void);
void palette_save (void);
2013-04-01 01:02:03 +02:00
2026-01-12 21:24:09 -07:00
/* Keep a copy of the user's palette so dark mode can be toggled without losing it. */
void palette_user_set_color (int idx, const GdkColor *col);
void palette_dark_set_color (int idx, const GdkColor *col);
2026-01-12 21:24:09 -07:00
2026-01-11 12:02:58 -07:00
/*
2026-01-12 21:24:09 -07:00
* Apply ZoiteChat's built-in "dark mode" palette.
*
* When enabled, ZoiteChat switches to a curated dark-friendly palette for:
* - message colors (mIRC palette)
* - selection colors
* - tab highlight colors
* - chat/user/channel list background + foreground
2026-01-11 12:02:58 -07:00
*
2026-01-12 21:24:09 -07:00
* The user's palette is preserved in-memory and written to colors.conf even
* while dark mode is enabled, so disabling dark mode restores the previous
* colors without surprises.
2026-01-11 12:02:58 -07:00
*
* Returns TRUE if any palette entries were changed.
*/
gboolean palette_apply_dark_mode (gboolean enable);
2013-04-01 01:02:03 +02:00
#endif