libkeymap  2.0.4
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  size_t keymaps;
29  size_t keymaps_alloced;
30  size_t functions;
31  size_t composes;
33  size_t keymaps_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, unsigned int ktype, unsigned 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 */
char * lk_code_to_ksym(struct lk_ctx *ctx, int code)
lk_keywords keywords
Definition: dump.h:27
Header contains flags, keywords and context structure.
General information about the keymap.
Definition: dump.h:25
lk_flags
Parser flags that are set outside the library.
Definition: context.h:17
size_t functions
Definition: dump.h:30
Definition: dump.h:17
void lk_dump_symbols(struct lk_ctx *ctx, FILE *fd)
void lk_dump_keys(struct lk_ctx *ctx, FILE *fd, lk_table_shape table, char numeric)
Definition: dump.h:19
lk_table_shape
Flags controlling the output keymap.
Definition: dump.h:15
Definition: dump.h:16
size_t keymaps
Definition: dump.h:28
char * lk_get_sym(struct lk_ctx *ctx, unsigned int ktype, unsigned int index)
size_t functions_total
Definition: dump.h:34
size_t composes_total
Definition: dump.h:35
size_t composes
Definition: dump.h:31
int lk_dump_ctable(struct lk_ctx *ctx, FILE *fd)
int lk_dump_bkeymap(struct lk_ctx *ctx, FILE *fd)
Definition: dump.h:18
lk_keywords
Keywords used in keymap files.
Definition: context.h:27
int lk_get_kmapinfo(struct lk_ctx *ctx, struct kmapinfo *res)
int lk_ksym_to_unicode(struct lk_ctx *ctx, const char *code)
size_t keymaps_alloced
Definition: dump.h:29
lk_flags flags
Definition: dump.h:26
void lk_dump_keymaps(struct lk_ctx *ctx, FILE *fd)
void lk_dump_funcs(struct lk_ctx *ctx, FILE *fd)
void lk_dump_summary(struct lk_ctx *ctx, FILE *fd, int console)
void lk_dump_diacs(struct lk_ctx *ctx, FILE *fd)
void lk_dump_keymap(struct lk_ctx *ctx, FILE *fd, lk_table_shape table, char numeric)
size_t keymaps_total
Definition: dump.h:33