NekoWM
A gfxprim proxy backend tiling window manager
Loading...
Searching...
No Matches
neko_ctx.h
Go to the documentation of this file.
1//SPDX-License-Identifier: GPL-2.0-or-later
2/*
3
4 Copyright (c) 2019-2024 Cyril Hrubis <metan@ucw.cz>
5
6 */
7
13#ifndef NEKO_CTX_H
14#define NEKO_CTX_H
15
16#include <text/gp_text.h>
17#include <core/gp_types.h>
18#include <backends/gp_types.h>
19
23struct neko_ctx {
27 gp_pixel col_fg;
31 gp_pixel col_bg;
35 gp_pixel col_sel;
36
37 uint32_t dark_theme:1;
38
39 gp_size padd;
40
44 gp_text_style *font;
45
49 gp_text_style *font_bold;
50
54 gp_backend *backend;
55};
56
57extern struct neko_ctx ctx;
58
59void neko_ctx_init(gp_backend *backend, int reverse, const char *font_family);
60
61#endif /* NEKO_CTX_H */
A global context.
Definition neko_ctx.h:23
gp_backend * backend
Pointer to the current backend.
Definition neko_ctx.h:54
gp_pixel col_fg
A foreground color.
Definition neko_ctx.h:27
gp_pixel col_sel
A selected color.
Definition neko_ctx.h:35
gp_text_style * font_bold
Current bold font.
Definition neko_ctx.h:49
gp_pixel col_bg
A background color.
Definition neko_ctx.h:31
gp_text_style * font
Current font.
Definition neko_ctx.h:44