Move lk_ctx content to private part of library
[platform/upstream/kbd.git] / src / libkeymap / keymap / context.h
index ffc8300..0a01745 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef LK_DATA_H
-#define LK_DATA_H
+#ifndef LK_CONTEXT_H
+#define LK_CONTEXT_H
 
 #include <linux/kd.h>
 #include <linux/keyboard.h>
@@ -7,13 +7,6 @@
 #include <keymap/array.h>
 
 /**
- * @brief Copy of struct kbdiacruc.
- */
-struct kb_diacr {
-       unsigned int diacr, base, result;
-};
-
-/**
  * @brief Parser flags that are set outside the library.
  */
 typedef enum {
@@ -34,67 +27,8 @@ typedef enum {
 } lk_keywords;
 
 /**
- * @brief The maximum number of include levels.
- */
-#define MAX_INCLUDE_DEPTH 20
-
-/**
  * @brief Opaque object representing the library context.
  */
-struct lk_ctx {
-       /**
-        * Parser flags that are set outside the library.
-        */
-       lk_flags flags;
-
-       /**
-        * Keywords used in keymap files.
-        */
-       lk_keywords keywords;
-
-       /**
-        * Key translation table (keycode to action code).
-        */
-       struct lk_array *keymap;
-
-       /**
-        * Function key string entry.
-        */
-       struct lk_array *func_table;
-
-       /**
-        * Accent table.
-        */
-       struct lk_array *accent_table; 
-
-       /** @protected
-        * User defined logging function.
-        */
-       void (*log_fn)(void *data, int priority,
-                      const char *file, int line, const char *fn,
-                      const char *format, va_list args);
-
-       /** @protected
-        * The data passed to the @ref log_fn logging function as the first argument.
-        */
-       void *log_data;
-
-       /** @protected
-        * Logging priority used by @ref log_fn logging function.
-        */
-       int log_priority;
-
-       /** @protected
-        * User defined charset.
-        */
-       unsigned int charset;
-
-       /* Fields used by keymap parser */
-
-       struct lk_array *key_constant;      /**< @private */
-       struct lk_array *key_line;          /**< @private */
-       int mod;                            /**< @private */
-       lkfile_t *stack[MAX_INCLUDE_DEPTH]; /**< @private */
-};
+struct lk_ctx;
 
-#endif /* LK_DATA_H */
+#endif /* LK_CONTEXT_H */