Shorten context to ctx
[platform/upstream/libxkbcommon.git] / src / xkbcomp / xkbcomp.h
index 1261c73..a4078a3 100644 (file)
 #ifndef XKBCOMP_H
 #define        XKBCOMP_H 1
 
-#ifndef DEBUG_VAR
-#define        DEBUG_VAR debugFlags
-#endif
-
-#include <X11/X.h>
-#include <X11/Xdefs.h>
-
-#include "utils.h"
-
-#include "xkbcommon/xkbcommon.h"
-#include "XKBcommonint.h"
-#include "xkbmisc.h"
-
-extern char *scanFile;
+#include "xkb-priv.h"
 
 #define        TypeUnknown     0
 #define        TypeBoolean     1
 #define        TypeInt         2
-#define        TypeFloat       3
 #define        TypeString      4
 #define        TypeAction      5
 #define        TypeKeyName     6
@@ -81,7 +67,6 @@ typedef struct _ParseCommon
 #define        ExprArrayRef    4
 #define        ExprKeysymList  5
 #define        ExprActionList  6
-#define        ExprCoord       7
 
 #define        OpAdd           20
 #define        OpSubtract      21
@@ -149,18 +134,16 @@ typedef struct _Expr
             int nSyms;
             int szSyms;
             char **syms;
+            int nLevels;
+            int szLevels;
+            int *symsMapIndex;
+            unsigned int *symsNumEntries;
         } list;
-        struct
-        {
-            int x;
-            int y;
-        } coord;
         struct _Expr *child;
         xkb_atom_t str;
         unsigned uval;
         int ival;
         char keyName[5];
-        void * ptr;
     } value;
 } ExprDef;
 
@@ -243,7 +226,7 @@ typedef struct _IndicatorNameDef
     unsigned merge;
     int ndx;
     ExprDef *name;
-    Bool virtual;
+    bool virtual;
 } IndicatorNameDef;
 
 typedef struct _IndicatorMapDef
@@ -258,34 +241,30 @@ typedef struct _IndicatorMapDef
 typedef struct _XkbFile
 {
     ParseCommon common;
-    int type;
+    unsigned type;
     char *topName;
     char *name;
     ParseCommon *defs;
     int id;
     unsigned flags;
-    Bool compiled;
 } XkbFile;
 
-extern struct xkb_desc *
-CompileKeymap(XkbFile *file, unsigned merge);
+extern struct xkb_keymap *
+CompileKeymap(struct xkb_ctx *ctx, XkbFile *file);
 
-extern Bool
-CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
+extern bool
+CompileKeycodes(XkbFile *file, struct xkb_keymap *keymap, unsigned merge);
 
-extern Bool
-CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
+extern bool
+CompileKeyTypes(XkbFile *file, struct xkb_keymap *keymap, unsigned merge);
 
 typedef struct _LEDInfo *LEDInfoPtr;
 
-extern Bool
-CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
+extern bool
+CompileCompatMap(XkbFile *file, struct xkb_keymap *keymap, unsigned merge,
                  LEDInfoPtr *unboundLEDs);
 
-extern Bool
-CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
-
-extern Bool
-UpdateModifiersFromCompat(struct xkb_desc *xkb);
+extern bool
+CompileSymbols(XkbFile *file, struct xkb_keymap *keymap, unsigned merge);
 
 #endif /* XKBCOMP_H */