Debian Codegraph @

src/messages-codes.h

raw
1 // NOTE: This file has been generated automatically by “update-message-registry.py”.
2 // Do not edit manually!
3 #pragma once
4
5 #include "config.h"
6
7 #include <stdint.h>
8
9 /*
10 * Macro sorcery: PREPEND_MESSAGE_ID enables the log functions to format messages
11 * with the message ID only if the ID is not 0 (XKB_LOG_MESSAGE_NO_ID).
12 * This avoid checking the ID value at run time.
13 *
14 * The trick resides in CHECK_ID:
15 * • CHECK_ID(0) expands to:
16 * ‣ SECOND(MATCH0, WITH_ID, unused)
17 * ‣ SECOND(unused,WITHOUT_ID, WITH_ID, unused)
18 * ‣ WITHOUT_ID
19 * • CHECK_ID(123) expands to:
20 * ‣ SECOND(MATCH123, WITH_ID, unused)
21 * ‣ WITH_ID
22 */
23 #define EXPAND(...) __VA_ARGS__ /* needed for MSVC compatibility */
24
25 #define JOIN_EXPAND(a, b) a##b
26 #define JOIN(a, b) JOIN_EXPAND(a, b)
27
28 #define SECOND_EXPAND(a, b, ...) b
29 #define SECOND(...) EXPAND(SECOND_EXPAND(__VA_ARGS__))
30
31 #define MATCH0 unused,WITHOUT_ID
32 #define CHECK_ID(value) SECOND(JOIN(MATCH, value), WITH_ID, unused)
33
34 #define FORMAT_MESSAGE_WITHOUT_ID(id, fmt) fmt
35 #define FORMAT_MESSAGE_WITH_ID(id, fmt) "[XKB-%03d] " fmt, id
36 #define PREPEND_MESSAGE_ID(id, fmt) JOIN(FORMAT_MESSAGE_, CHECK_ID(id))(id, fmt)
37
38 /**
39 * Set of verbosity levels
40 */
41 enum xkb_log_verbosity {
42 XKB_LOG_VERBOSITY_SILENT = -1,
43 XKB_LOG_VERBOSITY_MINIMAL = 0,
44 XKB_LOG_VERBOSITY_BRIEF = 1,
45 XKB_LOG_VERBOSITY_DETAILED = 5,
46 XKB_LOG_VERBOSITY_VERBOSE = 10,
47 XKB_LOG_VERBOSITY_COMPREHENSIVE = 11,
48 XKB_LOG_VERBOSITY_DEFAULT = XKB_LOG_VERBOSITY_MINIMAL,
49 };
50
51 /**
52 * Special case when no message identifier is defined.
53 */
54 #define XKB_LOG_MESSAGE_NO_ID 0
55
56 /**
57 * @name Codes of the log messages
58 */
59 enum xkb_message_code {
60 _XKB_LOG_MESSAGE_MIN_CODE = 34,
61 /** Warn on malformed number literals */
62 XKB_ERROR_MALFORMED_NUMBER_LITERAL = 34,
63 /** Conflicting “preserve” entries in a key type */
64 XKB_WARNING_CONFLICTING_KEY_TYPE_PRESERVE_ENTRIES = 43,
65 /** The result of the operation is not mathematically correct */
66 XKB_ERROR_INTEGER_OVERFLOW = 52,
67 /** Warn on unsupported modifier mask */
68 XKB_ERROR_UNSUPPORTED_MODIFIER_MASK = 60,
69 /** Expected an array entry, but the index is missing */
70 XKB_ERROR_EXPECTED_ARRAY_ENTRY = 77,
71 /** Invalid numeric keysym */
72 XKB_ERROR_INVALID_NUMERIC_KEYSYM = 82,
73 /** Illegal keycode alias with the name of a real key */
74 XKB_WARNING_ILLEGAL_KEYCODE_ALIAS = 101,
75 /** Warn on unrecognized keysyms */
76 XKB_WARNING_UNRECOGNIZED_KEYSYM = 107,
77 /** A virtual modifier is used before being declared */
78 XKB_ERROR_UNDECLARED_VIRTUAL_MODIFIER = 123,
79 /** A buffer has an insufficient size */
80 XKB_ERROR_INSUFFICIENT_BUFFER_SIZE = 134,
81 /** The type of the statement is not allowed in the context */
82 XKB_ERROR_WRONG_STATEMENT_TYPE = 150,
83 /** The given path is invalid */
84 XKB_ERROR_INVALID_PATH = 161,
85 /** Geometry sections are not supported */
86 XKB_WARNING_UNSUPPORTED_GEOMETRY_SECTION = 172,
87 /** Warn if no key type can be inferred */
88 XKB_WARNING_CANNOT_INFER_KEY_TYPE = 183,
89 /** Invalid escape sequence in a string */
90 XKB_WARNING_INVALID_ESCAPE_SEQUENCE = 193,
91 /** The result of a key type “preserve” entry must be a subset of its input modifiers. */
92 XKB_WARNING_ILLEGAL_KEY_TYPE_PRESERVE_RESULT = 195,
93 /** Syntax error in the include statement */
94 XKB_ERROR_INVALID_INCLUDE_STATEMENT = 203,
95 /** A modmap entry is invalid */
96 XKB_ERROR_INVALID_MODMAP_ENTRY = 206,
97 /** Warn when a group index is not supported */
98 XKB_ERROR_UNSUPPORTED_GROUP_INDEX = 237,
99 /** The name of a key type level is defined multiple times. */
100 XKB_WARNING_CONFLICTING_KEY_TYPE_LEVEL_NAMES = 239,
101 /** Invalid statement setting default values */
102 XKB_ERROR_INVALID_SET_DEFAULT_STATEMENT = 254,
103 /** Conflicting “map” entries in type definition */
104 XKB_WARNING_CONFLICTING_KEY_TYPE_MAP_ENTRY = 266,
105 /** Warn if using an undefined key type */
106 XKB_WARNING_UNDEFINED_KEY_TYPE = 286,
107 /** A keysym has been deprecated: consider using an alternative keysym */
108 XKB_WARNING_DEPRECATED_KEYSYM = 301,
109 /** A keysym name has been deprecated: use the corresponding canonical name instead */
110 XKB_WARNING_DEPRECATED_KEYSYM_NAME = 302,
111 /** Warn if a group name was defined for group other than the first one */
112 XKB_WARNING_NON_BASE_GROUP_NAME = 305,
113 /** Warn when a shift level is not supported */
114 XKB_ERROR_UNSUPPORTED_SHIFT_LEVEL = 312,
115 /** Could not find a file used in an include statement */
116 XKB_ERROR_INCLUDED_FILE_NOT_FOUND = 338,
117 /** Use of an operator that is unknown and thus unsupported */
118 XKB_ERROR_UNKNOWN_OPERATOR = 345,
119 /** Use of a legacy X11 action that is not supported */
120 XKB_WARNING_UNSUPPORTED_LEGACY_ACTION = 362,
121 /** An entry is duplicated and will be ignored */
122 XKB_WARNING_DUPLICATE_ENTRY = 378,
123 /** Included files form cycle */
124 XKB_ERROR_RECURSIVE_INCLUDE = 386,
125 /** Conflicting definitions of a key type */
126 XKB_WARNING_CONFLICTING_KEY_TYPE_DEFINITIONS = 407,
127 /** A global defaults statement is in a wrong scope and should be moved */
128 XKB_ERROR_GLOBAL_DEFAULTS_WRONG_SCOPE = 428,
129 /** Missing default section in included file */
130 XKB_WARNING_MISSING_DEFAULT_SECTION = 433,
131 /** Warn if there are conflicting keysyms while merging keys */
132 XKB_WARNING_CONFLICTING_KEY_SYMBOL = 461,
133 /** The operation is invalid in the context */
134 XKB_ERROR_INVALID_OPERATION = 478,
135 /** Warn on numeric keysym (other than 0-9) */
136 XKB_WARNING_NUMERIC_KEYSYM = 489,
137 /** TODO: add description */
138 XKB_WARNING_EXTRA_SYMBOLS_IGNORED = 516,
139 /** Conflicting definitions of a key name or alias */
140 XKB_WARNING_CONFLICTING_KEY_NAME = 523,
141 /** Invalid file encoding */
142 XKB_ERROR_INVALID_FILE_ENCODING = 542,
143 /** Cannot allocate memory */
144 XKB_ERROR_ALLOCATION_ERROR = 550,
145 /** Unknown or unsupported action field */
146 XKB_ERROR_INVALID_ACTION_FIELD = 563,
147 /** Warn when a field has not the expected type */
148 XKB_ERROR_WRONG_FIELD_TYPE = 578,
149 /** Cannot resolve a given (Rules, Model, Layout, Variant, Options) configuration */
150 XKB_ERROR_CANNOT_RESOLVE_RMLVO = 595,
151 /** Invalid Unicode escape sequence */
152 XKB_WARNING_INVALID_UNICODE_ESCAPE_SEQUENCE = 607,
153 /** Invalid _real_ modifier */
154 XKB_ERROR_INVALID_REAL_MODIFIER = 623,
155 /** Unable to add any default include path */
156 XKB_ERROR_NO_VALID_DEFAULT_INCLUDE_PATH = 632,
157 /** Cannot set default value to a an unknown field */
158 XKB_ERROR_UNKNOWN_DEFAULT_FIELD = 639,
159 /** Warn on unknown escape sequence in string literal */
160 XKB_WARNING_UNKNOWN_CHAR_ESCAPE_SEQUENCE = 645,
161 /** The target file of an include statement could not be processed */
162 XKB_ERROR_INVALID_INCLUDED_FILE = 661,
163 /** Invalid locale for Compose */
164 XKB_ERROR_INVALID_COMPOSE_LOCALE = 679,
165 /** The Compose file syntax is invalid and the entry cannot be parsed */
166 XKB_ERROR_INVALID_COMPOSE_SYNTAX = 685,
167 /** A level has a different number of keysyms and actions */
168 XKB_ERROR_INCOMPATIBLE_ACTIONS_AND_KEYSYMS_COUNT = 693,
169 /** Warn if a key defines multiple groups at once */
170 XKB_WARNING_MULTIPLE_GROUPS_AT_ONCE = 700,
171 /** A legacy X11 symbol field is not supported */
172 XKB_WARNING_UNSUPPORTED_SYMBOLS_FIELD = 711,
173 /** The keymap has features unsupported in the target format */
174 XKB_ERROR_INCOMPATIBLE_KEYMAP_TEXT_FORMAT = 742,
175 /** Cannot expand `%%i`: missing layout or variant in MLVO rule fields */
176 XKB_ERROR_RULES_INVALID_LAYOUT_INDEX_PERCENT_EXPANSION = 762,
177 /** The XKB syntax is invalid and the file cannot be parsed */
178 XKB_ERROR_INVALID_XKB_SYNTAX = 769,
179 /** Reference to an undefined keycode */
180 XKB_WARNING_UNDEFINED_KEYCODE = 770,
181 /** An expression has not the expected type */
182 XKB_ERROR_INVALID_EXPRESSION_TYPE = 784,
183 /** A value is invalid and will be ignored */
184 XKB_ERROR_INVALID_VALUE = 796,
185 /** Warn if there are conflicting modmap definitions */
186 XKB_WARNING_CONFLICTING_MODMAP = 800,
187 /** A field is unknown and will be ignored */
188 XKB_ERROR_UNKNOWN_FIELD = 812,
189 /** Keymap compilation failed */
190 XKB_ERROR_KEYMAP_COMPILATION_FAILED = 822,
191 /** Unknown action type */
192 XKB_ERROR_UNKNOWN_ACTION_TYPE = 844,
193 /** Warn if there are conflicting actions while merging keys */
194 XKB_WARNING_CONFLICTING_KEY_ACTION = 883,
195 /** Warn if there are conflicting key types while merging groups */
196 XKB_WARNING_CONFLICTING_KEY_TYPE_MERGING_GROUPS = 893,
197 /** Conflicting symbols entry for a key */
198 XKB_ERROR_CONFLICTING_KEY_SYMBOLS_ENTRY = 901,
199 /** Missing group index in a group name entry */
200 XKB_WARNING_MISSING_SYMBOLS_GROUP_NAME_INDEX = 903,
201 /** Warn if there are conflicting fields while merging keys */
202 XKB_WARNING_CONFLICTING_KEY_FIELDS = 935,
203 /** An identifier is used but is not built-in */
204 XKB_ERROR_INVALID_IDENTIFIER = 949,
205 /** Warn if using a symbol not defined in the keymap */
206 XKB_WARNING_UNRESOLVED_KEYMAP_SYMBOL = 965,
207 /** The rules syntax is invalid and the file cannot be parsed */
208 XKB_ERROR_INVALID_RULES_SYNTAX = 967,
209 /** Some modifiers used in a key type “map” or “preserve” entry are not declared */
210 XKB_WARNING_UNDECLARED_MODIFIERS_IN_KEY_TYPE = 971,
211 _XKB_LOG_MESSAGE_MAX_CODE = 971
212 };
213
214 typedef uint32_t xkb_message_code_t;