/* * Copyright © 2026 Pierre Le Marre * * SPDX-License-Identifier: MIT * * Author: Pierre Le Marre */ #ifndef _XKBCOMMON_ERRORS_H_ #define _XKBCOMMON_ERRORS_H_ /* This file is autogenerated; please do not commit directly. */ #ifdef __cplusplus extern "C" { #endif /** * @file * @brief Error-handling related features */ /** * @defgroup error-api Error handling * Error-handling related features * * @{ */ /** * @enum xkb_error_code * Error codes returned by the API. * * The numeric values are stable identifiers that are also used in logging. * See the @ref error-index for the full list of logging codes. * *
* About the numeric values * * Codes are small positive integers assigned *non-sequentially* by design: * it prevents callers from assuming adjacency implies relatedness. * * See [these guidelines] for further details on the methodology. * * The value -1 (`::XKB_ERROR_INVALID`) is reserved for pre-1.14 * functions and does not follow the above scheme. *
* * @since 1.14.0 * * [these guidelines]: https://github.com/haskellfoundation/error-message-index/blob/main/tool-developers.md#code-assignment-recommendations */ enum xkb_error_code { /** * An unspecified error occurred. * * Reserved for pre-1.14 functions, which signal errors via -1 return * values documented per-function. * * @since 1.14.0 */ XKB_ERROR_INVALID = -1, /** * The operation completed successfully. * * @since 1.14.0 */ XKB_SUCCESS = 0, {# The next code are shared with the internal xkb_message_code enum #} {% for entry in entries %} /** * {{ entry.description }} * {% if entry.details %} {# Indent 2 times to avoid trailing space #} * {{ entry.details | trim | wordwrap(width=73) | indent(width=1, first=False, blank=False) | indent(width=" *", first=False, blank=True) }} * {% endif %} {% if entry.examples %} * @sa The [detailed entry](@ref {{ entry.message_code }}) in the error index. * {% endif %} * @since {{ entry.added_public }} */ {{ entry.message_code_constant(visibility) }} = {{ entry.code }}, {% endfor %} }; /** @} */ #ifdef __cplusplus } /* extern "C" */ #endif #endif /* _XKBCOMMON_ERRORS_H_ */