-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathneko_ctx.h
More file actions
86 lines (71 loc) · 1.31 KB
/
neko_ctx.h
File metadata and controls
86 lines (71 loc) · 1.31 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//SPDX-License-Identifier: GPL-2.0-or-later
/*
Copyright (c) 2019-2024 Cyril Hrubis <metan@ucw.cz>
*/
/**
* @brief Global context, font, colors, backend pointer.
* @file neko_ctx.h
*/
#ifndef NEKO_CTX_H
#define NEKO_CTX_H
#include <text/gp_text.h>
#include <core/gp_types.h>
#include <backends/gp_types.h>
enum neko_theme {
NEKO_THEME_LIGHT,
NEKO_THEME_DARK,
NEKO_THEME_INVALID = -1,
};
/**
* @brief A global context.
*/
struct neko_ctx {
/**
* @brief A foreground color.
*/
gp_pixel col_fg;
/**
* @brief A background color.
*/
gp_pixel col_bg;
/**
* @brief A selected menu color.
*/
gp_pixel col_sel;
/**
* @brief Focused out menu bg color.
*/
gp_pixel col_fout_bg;
/**
* @brief Focused in menu bg color.
*/
gp_pixel col_fin_bg;
/**
* @brief Focused out frame color.
*/
gp_pixel col_fout_fr;
/**
* @brief Focused in frame color.
*/
gp_pixel col_fin_fr;
/**
* @brief Neko theme.
*/
enum neko_theme theme;
gp_size padd;
/**
* @brief Current font.
*/
gp_text_style *font;
/**
* @brief Current bold font.
*/
gp_text_style *font_bold;
/**
* @brief Pointer to the current backend.
*/
gp_backend *backend;
};
extern struct neko_ctx ctx;
void neko_ctx_init(gp_backend *backend, enum neko_theme theme, const char *font_family);
#endif /* NEKO_CTX_H */