| 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 "xkbcommon/xkbcommon.h" |
| 12 |
#include "atom.h" |
| 13 |
#include "keymap.h" |
| 14 |
|
| 15 |
typedef struct { |
| 16 |
const char *name; |
| 17 |
uint32_t value; |
| 18 |
} LookupEntry; |
| 19 |
|
| 20 |
bool |
| 21 |
LookupString(const LookupEntry tab[], const char *string, |
| 22 |
unsigned int *value_rtrn); |
| 23 |
|
| 24 |
const char * |
| 25 |
LookupValue(const LookupEntry tab[], unsigned int value); |
| 26 |
|
| 27 |
extern const LookupEntry ctrlMaskNames[]; |
| 28 |
extern const LookupEntry modComponentMaskNames[]; |
| 29 |
extern const LookupEntry groupComponentMaskNames[]; |
| 30 |
extern const LookupEntry groupMaskNames[]; |
| 31 |
extern const LookupEntry buttonNames[]; |
| 32 |
extern const LookupEntry useModMapValueNames[]; |
| 33 |
extern const LookupEntry actionTypeNames[]; |
| 34 |
extern const LookupEntry symInterpretMatchMaskNames[]; |
| 35 |
|
| 36 |
const char * |
| 37 |
ModMaskText(struct xkb_context *ctx, enum mod_type type, |
| 38 |
const struct xkb_mod_set *mods, xkb_mod_mask_t mask); |
| 39 |
|
| 40 |
const char * |
| 41 |
ModIndexText(struct xkb_context *ctx, const struct xkb_mod_set *mods, |
| 42 |
xkb_mod_index_t ndx); |
| 43 |
|
| 44 |
const char * |
| 45 |
ActionTypeText(enum xkb_action_type type); |
| 46 |
|
| 47 |
const char * |
| 48 |
KeysymText(struct xkb_context *ctx, xkb_keysym_t sym); |
| 49 |
|
| 50 |
const char * |
| 51 |
KeyNameText(struct xkb_context *ctx, xkb_atom_t name); |
| 52 |
|
| 53 |
const char * |
| 54 |
SIMatchText(enum xkb_match_operation type); |
| 55 |
|
| 56 |
const char * |
| 57 |
LedStateMaskText(struct xkb_context *ctx, const LookupEntry *lookup, |
| 58 |
enum xkb_state_component mask); |
| 59 |
|
| 60 |
const char * |
| 61 |
ControlMaskText(struct xkb_context *ctx, enum xkb_action_controls mask); |