176910425Smrg/************************************************************
276910425Smrg Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc.
376910425Smrg
476910425Smrg Permission to use, copy, modify, and distribute this
576910425Smrg software and its documentation for any purpose and without
676910425Smrg fee is hereby granted, provided that the above copyright
776910425Smrg notice appear in all copies and that both that copyright
876910425Smrg notice and this permission notice appear in supporting
99ff100acSmrg documentation, and that the name of Silicon Graphics not be
109ff100acSmrg used in advertising or publicity pertaining to distribution
1176910425Smrg of the software without specific prior written permission.
129ff100acSmrg Silicon Graphics makes no representation about the suitability
1376910425Smrg of this software for any purpose. It is provided "as is"
1476910425Smrg without any express or implied warranty.
159ff100acSmrg
169ff100acSmrg SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
179ff100acSmrg SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1876910425Smrg AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
199ff100acSmrg GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
209ff100acSmrg DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
219ff100acSmrg DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
2276910425Smrg OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
2376910425Smrg THE USE OR PERFORMANCE OF THIS SOFTWARE.
2476910425Smrg
2576910425Smrg ********************************************************/
2676910425Smrg
2776910425Smrg#ifndef XKBEVD_H
289ff100acSmrg#define XKBEVD_H 1
2976910425Smrg
3076910425Smrg#include <stdio.h>
3176910425Smrg#include <X11/Xlib.h>
3276910425Smrg#include <X11/XKBlib.h>
3376910425Smrg#include <X11/extensions/XKBfile.h>
3476910425Smrg#include <X11/extensions/XKBbells.h>
3576910425Smrg
3676910425Smrg#include "utils.h"
3776910425Smrg
389ff100acSmrgextern  FILE *          yyin;
399ff100acSmrgextern  char *          scanFile;
409ff100acSmrgextern  int             lineNum;
419ff100acSmrgextern  int             scanInt;
429ff100acSmrgextern  char *          scanIntStr;
439ff100acSmrgextern  int             scanIntClass;
449ff100acSmrgextern  char *          scanStr;
459ff100acSmrgextern  int             scanStrLine;
469ff100acSmrg
479ff100acSmrgextern  Display *       dpy;
489ff100acSmrgextern  int             xkbOpcode;
499ff100acSmrgextern  int             xkbEventCode;
509ff100acSmrg
519ff100acSmrgextern  XkbDescPtr      xkb;
529ff100acSmrg
539ff100acSmrg#define UnknownAction   0
549ff100acSmrg#define NoAction        1
559ff100acSmrg#define EchoAction      2
569ff100acSmrg#define PrintEvAction   3
579ff100acSmrg#define ShellAction     4
589ff100acSmrg#define SoundAction     5
5976910425Smrg
6076910425Smrgtypedef struct _ActDef {
619ff100acSmrg        int             type;
629ff100acSmrg        char *          text;
639ff100acSmrg        unsigned        priv;
6476910425Smrg} ActDefRec,*ActDefPtr;
6576910425Smrg
669ff100acSmrg#define EventDef        0
679ff100acSmrg#define VariableDef     1
6876910425Smrg
6976910425Smrgtypedef struct _CfgEntry {
709ff100acSmrg        unsigned char   entry_type;
719ff100acSmrg        unsigned char   event_type;
729ff100acSmrg        union {
739ff100acSmrg            char *      str;
749ff100acSmrg            Atom        atom;
759ff100acSmrg            unsigned    priv;
769ff100acSmrg        }                       name;
779ff100acSmrg        ActDefRec               action;
789ff100acSmrg        struct _CfgEntry *      next;
7976910425Smrg} CfgEntryRec,*CfgEntryPtr;
8076910425Smrg
8176910425Smrgextern void InterpretConfigs(
829ff100acSmrg        CfgEntryPtr     /* cfgs */
8376910425Smrg);
8476910425Smrg
858bfe6addSmrgextern const char *SubstituteEventArgs(
868bfe6addSmrg    const char *        /* cmd */,
878bfe6addSmrg    const XkbEvent *    /* ev */
8876910425Smrg);
8976910425Smrg
9076910425Smrgextern void PrintXkbEvent(
919ff100acSmrg        FILE *          /* file */,
929ff100acSmrg        XkbEvent *      /* ev */
9376910425Smrg);
9476910425Smrg
959ff100acSmrgextern int setScanState ( const char * file, int line );
9676910425Smrgextern int CFGParseFile ( FILE *file );
9776910425Smrg
9876910425Smrgextern int yylex(void);
9976910425Smrgextern int yyparse(void);
10076910425Smrgextern int yyerror(char *s);
10176910425Smrgextern int yywrap(void);
10276910425Smrg#endif /* XKBEVD_H */
103