Debian Codegraph @

src/shared/vconsole-util.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "shared-forward.h"
5
6 typedef struct X11Context {
7 char *layout;
8 char *model;
9 char *variant;
10 char *options;
11 } X11Context;
12
13 typedef struct VCContext {
14 char *keymap;
15 char *toggle;
16 } VCContext;
17
18 void x11_context_clear(X11Context *xc);
19 void x11_context_replace(X11Context *dest, X11Context *src);
20 bool x11_context_isempty(const X11Context *xc);
21 void x11_context_empty_to_null(X11Context *xc);
22 bool x11_context_is_safe(const X11Context *xc);
23 bool x11_context_equal(const X11Context *a, const X11Context *b);
24 int x11_context_copy(X11Context *dest, const X11Context *src);
25
26 int find_converted_keymap(const X11Context *xc, char **ret);
27 int find_legacy_keymap(const X11Context *xc, char **ret);
28 int find_language_fallback(const char *lang, char **ret);
29
30 void vc_context_clear(VCContext *vc);
31 void vc_context_replace(VCContext *dest, VCContext *src);
32 bool vc_context_isempty(const VCContext *vc);
33 void vc_context_empty_to_null(VCContext *vc);
34 bool vc_context_equal(const VCContext *a, const VCContext *b);
35 int vc_context_copy(VCContext *dest, const VCContext *src);
36
37 typedef int (*X11VerifyCallback)(const X11Context *xc);
38
39 int vconsole_convert_to_x11(const VCContext *vc, X11VerifyCallback verify, X11Context *ret);
40 int x11_convert_to_vconsole(const X11Context *xc, VCContext *ret);
41
42 int find_vconsole_keymap_for_bcp47(const char *tag, char **ret);
43 int vconsole_keymap_from_efi(char **ret);
44
45 int vconsole_serialize(const VCContext *vc, const X11Context *xc, char ***env);