-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsb_theme.h
More file actions
52 lines (42 loc) · 1.47 KB
/
Copy pathsb_theme.h
File metadata and controls
52 lines (42 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* ShellBar v1.9.0 — A command-bar terminal emulator built on libghostty-vt
* Copyright (c) 2026 Xavier Araque <xavieraraque@gmail.com>
* MIT License
*/
#ifndef SB_THEME_H
#define SB_THEME_H
#include <stdint.h>
#include <stdbool.h>
#include <gtk/gtk.h>
typedef struct { uint8_t r, g, b; } SbColor;
typedef struct {
const char *name; /* identifier, e.g. "cyber" */
const char *display_name; /* human label, e.g. "Cyber" */
/* Window chrome */
SbColor background; /* window/content fallback */
SbColor surface; /* secondary surface */
SbColor header; /* header/toolbar background */
SbColor border; /* separators */
SbColor text_primary;
SbColor text_secondary;
/* Terminal */
SbColor term_background;
SbColor term_foreground;
SbColor term_cursor;
SbColor term_selection;
/* Accents (for tabs / highlights) */
SbColor accent_blue;
SbColor accent_cyan;
SbColor accent_orange;
SbColor error;
/* 16 ANSI palette colors (0..15). Remaining 240 are filled by libghostty. */
SbColor ansi[16];
} SbTheme;
/* Built-in themes. Returns NULL if name unknown. */
const SbTheme *sb_theme_get(const char *name);
const SbTheme *sb_theme_default(void);
const SbTheme *const *sb_theme_list(int *out_count);
/* Apply chrome CSS for theme to the given display (idempotent: the same
* provider is reused / replaced on subsequent calls). */
void sb_theme_apply_to_display(GdkDisplay *display, const SbTheme *theme);
#endif