xklavier

## xklavier xklavier |

## Synopsis

    const gchar *       xkl_get_last_error                  (void);
    void                (*XklLogAppender)                   (const gchar file[],
                                                             const gchar function[],
                                                             gint level,
                                                             const gchar format[],
                                                             va_list args);
    void                xkl_default_log_appender            (const gchar file[],
                                                             const gchar function[],
                                                             gint level,
                                                             const gchar format[],
                                                             va_list args);
    void                xkl_set_log_appender                (XklLogAppender fun);
    void                xkl_set_debug_level                 (gint level);
    #define             xkl_debug                           (level,
                                                             ...)

## Description

## Details

### xkl_get_last_error ()

    const gchar *       xkl_get_last_error                  (void);

Returns : | the text message (statically allocated) of the last error

### XklLogAppender ()

    void                (*XklLogAppender)                   (const gchar file[],
                                                             const gchar function[],
                                                             gint level,
                                                             const gchar format[],
                                                             va_list args);

Custom log output method for _xkl_debug. This appender is NOT called if the level of the message is greater than currently set debug level.

`file` : | name of the source file. Preprocessor symbol__FILE__ should be used here
`function` : | name of the function Preprocessor symbol__func__ should be used here
`level` : | level of the message
`format` : | format (like in printf)
`args` : | list of parameters

### xkl_default_log_appender ()

    void                xkl_default_log_appender            (const gchar file[],
                                                             const gchar function[],
                                                             gint level,
                                                             const gchar format[],
                                                             va_list args);

### xkl_set_log_appender ()

    void                xkl_set_log_appender                (XklLogAppender fun);

### xkl_set_debug_level ()

    void                xkl_set_debug_level                 (gint level);

Sets maximum debug level. Message of the level more than the one set here - will be ignored

`level` : | new debug level

### xkl_debug()

    #define             xkl_debug( level, ... )

Output (optionally) some debug info

`level` : | level of the message