xkbevd.h revision 9ff100ac
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; 509ff100acSmrgextern Bool detectableRepeat; 519ff100acSmrg 529ff100acSmrgextern XkbDescPtr xkb; 539ff100acSmrg 549ff100acSmrg#define UnknownAction 0 559ff100acSmrg#define NoAction 1 569ff100acSmrg#define EchoAction 2 579ff100acSmrg#define PrintEvAction 3 589ff100acSmrg#define ShellAction 4 599ff100acSmrg#define SoundAction 5 6076910425Smrg 6176910425Smrgtypedef struct _ActDef { 629ff100acSmrg int type; 639ff100acSmrg char * text; 649ff100acSmrg unsigned priv; 6576910425Smrg} ActDefRec,*ActDefPtr; 6676910425Smrg 679ff100acSmrg#define EventDef 0 689ff100acSmrg#define VariableDef 1 6976910425Smrg 7076910425Smrgtypedef struct _CfgEntry { 719ff100acSmrg unsigned char entry_type; 729ff100acSmrg unsigned char event_type; 739ff100acSmrg union { 749ff100acSmrg char * str; 759ff100acSmrg Atom atom; 769ff100acSmrg unsigned priv; 779ff100acSmrg } name; 789ff100acSmrg ActDefRec action; 799ff100acSmrg struct _CfgEntry * next; 8076910425Smrg} CfgEntryRec,*CfgEntryPtr; 8176910425Smrg 8276910425Smrgextern void InterpretConfigs( 839ff100acSmrg CfgEntryPtr /* cfgs */ 8476910425Smrg); 8576910425Smrg 8676910425Smrgextern char *SubstituteEventArgs( 879ff100acSmrg char * /* cmd */, 889ff100acSmrg XkbEvent * /* ev */ 8976910425Smrg); 9076910425Smrg 9176910425Smrgextern void PrintXkbEvent( 929ff100acSmrg FILE * /* file */, 939ff100acSmrg XkbEvent * /* ev */ 9476910425Smrg); 9576910425Smrg 969ff100acSmrgextern int setScanState ( const char * file, int line ); 9776910425Smrgextern int CFGParseFile ( FILE *file ); 9876910425Smrg 9976910425Smrgextern int yylex(void); 10076910425Smrgextern int yyparse(void); 10176910425Smrgextern int yyerror(char *s); 10276910425Smrgextern int yywrap(void); 10376910425Smrg#endif /* XKBEVD_H */ 104