libkeymap 2.4.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
12#ifndef __GNUC__
13#undef __attribute__
14#define __attribute__(x) /*NOTHING*/
15#endif
16
20 typedef enum {
21 LK_SHAPE_DEFAULT = (1 << 1),
22 LK_SHAPE_FULL_TABLE = (1 << 2),
23 LK_SHAPE_SEPARATE_LINES = (1 << 3),
24 LK_SHAPE_UNTIL_HOLE = (1 << 4)
25} lk_table_shape;
26
30 struct kmapinfo {
31 lk_flags flags;
32 lk_keywords keywords;
33 ssize_t keymaps;
34 ssize_t keymaps_alloced;
35 ssize_t functions;
36 ssize_t composes;
38 ssize_t keymaps_total;
39 ssize_t functions_total;
40 ssize_t composes_total;
41};
42
50 int lk_dump_bkeymap(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1)));
51
59 int lk_dump_ctable(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1, 2)));
60
69 void lk_dump_keymap(struct lk_ctx *ctx, FILE *fd, lk_table_shape table, char numeric) __attribute__((nonnull(1, 2)));
70
78 void lk_dump_keys(struct lk_ctx *ctx, FILE *fd, lk_table_shape table, char numeric) __attribute__((nonnull(1, 2)));
79
85 void lk_dump_keymaps(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1, 2)));
86
92 void lk_dump_funcs(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1, 2)));
93
99 void lk_dump_diacs(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1, 2)));
100
108 char *lk_code_to_ksym(struct lk_ctx *ctx, int code) __attribute__((nonnull(1)));
109
110 char *lk_get_sym(struct lk_ctx *ctx, int ktype, int index) __attribute__((nonnull(1)));
111
119 int lk_ksym_to_unicode(struct lk_ctx *ctx, const char *code) __attribute__((nonnull(1, 2)));
120
121 int lk_get_kmapinfo(struct lk_ctx *ctx, struct kmapinfo *res) __attribute__((nonnull(1, 2)));
122 void lk_dump_summary(struct lk_ctx *ctx, FILE *fd, int console) __attribute__((nonnull(1, 2)));
123 void lk_dump_symbols(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1, 2)));
124
125#endif /* LK_DUMP_H */
context.h
Header contains flags, keywords and context structure.
lk_keywords
lk_keywords
Keywords used in keymap files.
Definition: context.h:26
lk_flags
lk_flags
Parser flags that are set outside the library.
Definition: context.h:16
lk_dump_symbols
int int void void lk_dump_symbols(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1
lk_dump_summary
int int void lk_dump_summary(struct lk_ctx *ctx, FILE *fd, int console) __attribute__((nonnull(1
lk_code_to_ksym
int void void void void void char * lk_code_to_ksym(struct lk_ctx *ctx, int code) __attribute__((nonnull(1)))
lk_table_shape
lk_table_shape
Flags controlling the output keymap.
Definition: dump.h:20
LK_SHAPE_UNTIL_HOLE
@ LK_SHAPE_UNTIL_HOLE
Definition: dump.h:24
LK_SHAPE_FULL_TABLE
@ LK_SHAPE_FULL_TABLE
Definition: dump.h:22
LK_SHAPE_SEPARATE_LINES
@ LK_SHAPE_SEPARATE_LINES
Definition: dump.h:23
LK_SHAPE_DEFAULT
@ LK_SHAPE_DEFAULT
Definition: dump.h:21
lk_dump_funcs
int void void void void lk_dump_funcs(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1
lk_dump_keymaps
int void void void lk_dump_keymaps(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1
lk_get_kmapinfo
int int lk_get_kmapinfo(struct lk_ctx *ctx, struct kmapinfo *res) __attribute__((nonnull(1
__attribute__
#define __attribute__(x)
Definition: dump.h:14
lk_dump_ctable
int lk_dump_ctable(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1
lk_get_sym
char * lk_get_sym(struct lk_ctx *ctx, int ktype, int index) __attribute__((nonnull(1)))
lk_dump_keymap
int void lk_dump_keymap(struct lk_ctx *ctx, FILE *fd, lk_table_shape table, char numeric) __attribute__((nonnull(1
lk_ksym_to_unicode
int lk_ksym_to_unicode(struct lk_ctx *ctx, const char *code) __attribute__((nonnull(1
lk_dump_keys
int void void lk_dump_keys(struct lk_ctx *ctx, FILE *fd, lk_table_shape table, char numeric) __attribute__((nonnull(1
lk_dump_bkeymap
int lk_dump_bkeymap(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1)))
lk_dump_diacs
int void void void void void lk_dump_diacs(struct lk_ctx *ctx, FILE *fd) __attribute__((nonnull(1
kmapinfo
General information about the keymap.
Definition: dump.h:30
kmapinfo::keymaps
ssize_t keymaps
Definition: dump.h:33
kmapinfo::functions_total
ssize_t functions_total
Definition: dump.h:39
kmapinfo::flags
lk_flags flags
Definition: dump.h:31
kmapinfo::composes_total
ssize_t composes_total
Definition: dump.h:40
kmapinfo::composes
ssize_t composes
Definition: dump.h:36
kmapinfo::keywords
lk_keywords keywords
Definition: dump.h:32
kmapinfo::keymaps_total
ssize_t keymaps_total
Definition: dump.h:38
kmapinfo::functions
ssize_t functions
Definition: dump.h:35
kmapinfo::keymaps_alloced
ssize_t keymaps_alloced
Definition: dump.h:34