| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- /*
- * Copyright © 2026 Pierre Le Marre
- *
- * SPDX-License-Identifier: MIT
- *
- * Author: Pierre Le Marre <dev@wismill.eu>
- */
- #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.
- *
- * <details>
- * <summary>About the numeric values</summary>
- *
- * 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.
- * </details>
- *
- * @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_ */
|