Use CARD32 instead of Atom, move geom headers in
[platform/upstream/libxkbcommon.git] / src / xkbcomp / xkbcomp.h
index c6fce0b..ba39a0b 100644 (file)
@@ -6,19 +6,19 @@
  fee is hereby granted, provided that the above copyright
  notice appear in all copies and that both that copyright
  notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be 
- used in advertising or publicity pertaining to distribution 
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
  of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability 
+ Silicon Graphics makes no representation about the suitability
  of this software for any purpose. It is provided "as is"
  without any express or implied warranty.
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
  THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 #define        DEBUG_VAR debugFlags
 #endif
 
+#include <X11/X.h>
+#include <X11/Xdefs.h>
+
 #include "utils.h"
 
 #include <X11/extensions/XKM.h>
+#include <X11/extensions/XKBstrcommon.h>
+#include <X11/extensions/XKBrulescommon.h>
+#include "X11/extensions/XKBcommon.h"
+#include "XKBcommonint.h"
 
 extern char *scanFile;
 
@@ -106,7 +113,6 @@ typedef struct _ParseCommon
 #define        CreateKeyNames(x)       ((x)->flags&AutoKeyNames)
 
 extern unsigned warningLevel;
-extern unsigned optionalParts;
 
 typedef struct _IncludeStmt
 {
@@ -134,25 +140,25 @@ typedef struct _Expr
         } binary;
         struct
         {
-            Atom element;
-            Atom field;
+            CARD32 element;
+            CARD32 field;
         } field;
         struct
         {
-            Atom element;
-            Atom field;
+            CARD32 element;
+            CARD32 field;
             struct _Expr *entry;
         } array;
         struct
         {
-            Atom name;
+            CARD32 name;
             struct _Expr *args;
         } action;
         struct
         {
             int nSyms;
             int szSyms;
-            KeySym *syms;
+            char **syms;
         } list;
         struct
         {
@@ -160,7 +166,7 @@ typedef struct _Expr
             int y;
         } coord;
         struct _Expr *child;
-        Atom str;
+        CARD32 str;
         unsigned uval;
         int ival;
         char keyName[5];
@@ -180,7 +186,7 @@ typedef struct _VModDef
 {
     ParseCommon common;
     unsigned merge;
-    Atom name;
+    CARD32 name;
     ExprDef *value;
 } VModDef;
 
@@ -204,7 +210,7 @@ typedef struct _KeyTypeDef
 {
     ParseCommon common;
     unsigned merge;
-    Atom name;
+    CARD32 name;
     VarDef *body;
 } KeyTypeDef;
 
@@ -220,7 +226,7 @@ typedef struct _ModMapDef
 {
     ParseCommon common;
     unsigned merge;
-    Atom modifier;
+    CARD32 modifier;
     ExprDef *keys;
 } ModMapDef;
 
@@ -236,7 +242,7 @@ typedef struct _InterpDef
 {
     ParseCommon common;
     unsigned merge;
-    KeySym sym;
+    char *sym;
     ExprDef *match;
     VarDef *def;
 } InterpDef;
@@ -253,7 +259,7 @@ typedef struct _IndicatorNameDef
 typedef struct _OutlineDef
 {
     ParseCommon common;
-    Atom field;
+    CARD32 field;
     int nPoints;
     ExprDef *points;
 } OutlineDef;
@@ -262,7 +268,7 @@ typedef struct _ShapeDef
 {
     ParseCommon common;
     unsigned merge;
-    Atom name;
+    CARD32 name;
     int nOutlines;
     OutlineDef *outlines;
 } ShapeDef;
@@ -286,7 +292,7 @@ typedef struct _SectionDef
 {
     ParseCommon common;
     unsigned merge;
-    Atom name;
+    CARD32 name;
     int nRows;
     RowDef *rows;
 } SectionDef;
@@ -302,7 +308,7 @@ typedef struct _OverlayDef
 {
     ParseCommon common;
     unsigned merge;
-    Atom name;
+    CARD32 name;
     int nKeys;
     OverlayKeyDef *keys;
 } OverlayDef;
@@ -312,7 +318,7 @@ typedef struct _DoodadDef
     ParseCommon common;
     unsigned merge;
     unsigned type;
-    Atom name;
+    CARD32 name;
     VarDef *body;
 } DoodadDef;
 
@@ -333,60 +339,25 @@ typedef struct _XkbFile
     Bool compiled;
 } XkbFile;
 
-extern Bool CompileKeymap(XkbFile * /* file */ ,
-                          XkbFileInfo * /* result */ ,
-                          unsigned      /* merge */
-    );
+extern Bool
+CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
 
-extern Bool CompileKeycodes(XkbFile * /* file */ ,
-                            XkbFileInfo * /* result */ ,
-                            unsigned    /* merge */
-    );
+extern Bool
+CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
 
-extern Bool CompileGeometry(XkbFile * /* file */ ,
-                            XkbFileInfo * /* result */ ,
-                            unsigned    /* merge */
-    );
+extern Bool
+CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
 
-extern Bool CompileKeyTypes(XkbFile * /* file */ ,
-                            XkbFileInfo * /* result */ ,
-                            unsigned    /* merge */
-    );
+extern Bool
+CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
 
 typedef struct _LEDInfo *LEDInfoPtr;
 
-extern Bool CompileCompatMap(XkbFile * /* file */ ,
-                             XkbFileInfo * /* result */ ,
-                             unsigned /* merge */ ,
-                             LEDInfoPtr *       /* unboundLEDs */
-    );
-
-extern Bool CompileSymbols(XkbFile * /* file */ ,
-                           XkbFileInfo * /* result */ ,
-                           unsigned     /* merge */
-    );
-
-#define        WantLongListing (1<<0)
-#define        WantPartialMaps (1<<1)
-#define        WantHiddenMaps  (1<<2)
-#define        WantFullNames   (1<<3)
-#define        ListRecursive   (1<<4)
-
-extern char *rootDir;
-extern unsigned verboseLevel;
-extern unsigned dirsToStrip;
-
-extern Bool AddListing(char * /* file */ ,
-                       char *   /* map */
-    );
-
-extern Bool AddMatchingFiles(char *     /* head_in */
-    );
-
-extern int AddMapOnly(char *    /* map */
-    );
+extern Bool
+CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
+                 LEDInfoPtr *unboundLEDs);
 
-extern int GenerateListing(char *       /* filename */
-    );
+extern Bool
+CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
 
 #endif /* XKBCOMP_H */