* @{
*/
+enum xkb_log_level {
+ /** Log critical internal errors only */
+ XKB_LOG_LEVEL_CRITICAL = 0,
+ /** Log all errors */
+ XKB_LOG_LEVEL_ERROR = 1,
+ /** Log warnings and errors */
+ XKB_LOG_LEVEL_WARNING = 2,
+ /** Log information, warnings, and errors */
+ XKB_LOG_LEVEL_INFO = 3,
+ /** Log all the things */
+ XKB_LOG_LEVEL_DEBUG = 4,
+};
+
/**
* Sets the function to be called for logging messages.
* Passing NULL restores the default function, which logs to stderr.
const char *format, va_list args));
/**
* Sets the current logging priority. The value controls which messages
- * are logged.
+ * are logged. The default priority is LOG_ERR.
*
- * The value should be one of LOG_ERR, LOG_WARNING, LOG_DEBUG, etc., see
- * syslog(3) or syslog.h. The default priority is LOG_ERR.
* The environment variable XKB_LOG, if set, overrides the default value
* and may be specified as a priority number or name.
*/
void
-xkb_set_log_priority(struct xkb_context *context, int priority);
+xkb_set_log_priority(struct xkb_context *context, enum xkb_log_level priority);
/**
* Returns the current logging priority.
*/
-int
+enum xkb_log_level
xkb_get_log_priority(struct xkb_context *context);
/**
* The environment variable XKB_VERBOSITY, if set, overrdies the default
* value.
*
- * Note that most verbose messages are of priority LOG_WARNING or lower.
+ * Note that most verbose messages are of priority XKB_LOG_LEVEL_WARNING
+ * or lower.
*/
void
xkb_set_log_verbosity(struct xkb_context *ctx, int verbosity);
enum xkb_state_component type);
/**
+ * Returns 1 if the modifier specified by 'idx' is used in the
+ * translation of the keycode 'key' to the key symbols obtained by
+ * pressing it (as in xkb_key_get_syms), given the current state.
+ * Returns 0 otherwise.
+ */
+int
+xkb_key_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t key,
+ xkb_mod_index_t idx);
+
+/**
+ * Takes the given modifier mask, and removes all modifiers which are
+ * marked as 'consumed' (see xkb_key_mod_index_is_consumed definition)
+ * for that particular key.
+ */
+xkb_mod_mask_t
+xkb_key_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t key,
+ xkb_mod_mask_t mask);
+
+/**
* Returns 1 if the modifiers specified by the varargs (treated as
* xkb_mod_index_t, terminated with XKB_MOD_INVALID) are active in the manner
* specified by 'match' and 'type', 0 otherwise, or -1 if the modifier does not