Debian Codegraph @

src/xkbcomp/rules.h

raw
1 /*
2 * Copyright © 2009 Dan Nicholson
3 * SPDX-License-Identifier: MIT
4 */
5 #pragma once
6
7 #include "config.h"
8
9 #include <stdbool.h>
10
11 #include "xkbcomp-priv.h"
12 #include "rmlvo.h"
13
14 XKB_EXPORT_PRIVATE bool
15 xkb_components_from_rmlvo_builder(const struct xkb_rmlvo_builder *rmlvo,
16 struct xkb_component_names *out,
17 xkb_layout_index_t *explicit_layouts);
18
19 XKB_EXPORT_PRIVATE bool
20 xkb_components_from_rules_names(struct xkb_context *ctx,
21 const struct xkb_rule_names *rmlvo,
22 struct xkb_component_names *out,
23 xkb_layout_index_t *explicit_layouts);
24
25 /* Maximum length of a layout index string:
26 *
27 * length = ceiling (bitsize(xkb_layout_index_t) * logBase 10 2)
28 * < ceiling (bitsize(xkb_layout_index_t) * 5 / 16)
29 * < 1 + floor (bitsize(xkb_layout_index_t) * 5 / 16)
30 */
31 #define MAX_LAYOUT_INDEX_STR_LENGTH \
32 (1 + ((sizeof(xkb_layout_index_t) * CHAR_BIT * 5) >> 4))
33
34 #define OPTIONS_GROUP_SPECIFIER_PREFIX '!'