- Added a shared XTextColor definition and a palette conversion helper for Cairo-ready colors, decoupling renderer palettes from GdkColor usage in the API surface.

- Updated xtext palette APIs to accept internal color arrays directly for rendering setup.
- Wired xtext palette creation through UI entry points to use the new palette helper when constructing or refreshing text views.
This commit is contained in:
2026-01-17 21:39:45 -07:00
parent 5986e6a78b
commit 4ac836fc66
9 changed files with 71 additions and 32 deletions

View File

@@ -20,6 +20,10 @@
#ifndef HEXCHAT_PALETTE_H
#define HEXCHAT_PALETTE_H
#include <stddef.h>
#include "xtext-color.h"
extern GdkColor colors[];
#define COL_MARK_FG 32
@@ -59,4 +63,6 @@ void palette_dark_set_color (int idx, const GdkColor *col);
*/
gboolean palette_apply_dark_mode (gboolean enable);
void palette_get_xtext_colors (XTextColor *palette, size_t palette_len);
#endif