libkeymap  2.2.0
Library to manage the Linux keymaps
dump.h
Go to the documentation of this file.
1 
5 #ifndef LK_DUMP_H
6 #define LK_DUMP_H
7 
8 #include <stdio.h>
9 
10 #include <keymap/context.h>
11 
15 typedef enum {
16  LK_SHAPE_DEFAULT = (1 << 1),
17  LK_SHAPE_FULL_TABLE = (1 << 2),
19  LK_SHAPE_UNTIL_HOLE = (1 << 4)
21 
25 struct kmapinfo {
28  ssize_t keymaps;
29  ssize_t keymaps_alloced;
30  ssize_t functions;
31  ssize_t composes;
33  ssize_t keymaps_total;
34  ssize_t functions_total;
35  ssize_t composes_total;
36 };
37 
45 int lk_dump_bkeymap(struct lk_ctx *ctx, FILE *fd);
46 
54 int lk_dump_ctable(struct lk_ctx *ctx, FILE *fd);
55 
64 void lk_dump_keymap(struct lk_ctx *ctx, FILE *fd, lk_table_shape table, char numeric);
65 
73 void lk_dump_keys(struct lk_ctx *ctx, FILE *fd, lk_table_shape table, char numeric);
74 
80 void lk_dump_keymaps(struct lk_ctx *ctx, FILE *fd);
81 
87 void lk_dump_funcs(struct lk_ctx *ctx, FILE *fd);
88 
94 void lk_dump_diacs(struct lk_ctx *ctx, FILE *fd);
95 
103 char *lk_code_to_ksym(struct lk_ctx *ctx, int code);
104 
105 char *lk_get_sym(struct lk_ctx *ctx, int ktype, int index);
106 
114 int lk_ksym_to_unicode(struct lk_ctx *ctx, const char *code);
115 
116 int lk_get_kmapinfo(struct lk_ctx *ctx, struct kmapinfo *res);
117 void lk_dump_summary(struct lk_ctx *ctx, FILE *fd, int console);
118 void lk_dump_symbols(struct lk_ctx *ctx, FILE *fd);
119 
120 #endif /* LK_DUMP_H */