action.h revision c82dfdfb
1f46a6179Smrg/************************************************************ 2f46a6179Smrg Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. 3f46a6179Smrg 4f46a6179Smrg Permission to use, copy, modify, and distribute this 5f46a6179Smrg software and its documentation for any purpose and without 6f46a6179Smrg fee is hereby granted, provided that the above copyright 7f46a6179Smrg notice appear in all copies and that both that copyright 8f46a6179Smrg notice and this permission notice appear in supporting 9f46a6179Smrg documentation, and that the name of Silicon Graphics not be 10f46a6179Smrg used in advertising or publicity pertaining to distribution 11f46a6179Smrg of the software without specific prior written permission. 12f46a6179Smrg Silicon Graphics makes no representation about the suitability 13f46a6179Smrg of this software for any purpose. It is provided "as is" 14f46a6179Smrg without any express or implied warranty. 15f46a6179Smrg 16f46a6179Smrg SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 17f46a6179Smrg SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 18f46a6179Smrg AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 19f46a6179Smrg GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 20f46a6179Smrg DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 21f46a6179Smrg DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 22f46a6179Smrg OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 23f46a6179Smrg THE USE OR PERFORMANCE OF THIS SOFTWARE. 24f46a6179Smrg 25f46a6179Smrg ********************************************************/ 26f46a6179Smrg 27f46a6179Smrg#ifndef ACTION_H 28f46a6179Smrg#define ACTION_H 1 29f46a6179Smrg 30f46a6179Smrg#define F_ClearLocks 0 31f46a6179Smrg#define F_LatchToLock 1 32f46a6179Smrg#define F_GenKeyEvent 2 33f46a6179Smrg#define F_Report 3 34f46a6179Smrg#define F_Default 4 35f46a6179Smrg#define F_Affect 5 36f46a6179Smrg#define F_Increment 6 37f46a6179Smrg#define F_Modifiers 7 38f46a6179Smrg#define F_Group 8 39f46a6179Smrg#define F_X 9 40f46a6179Smrg#define F_Y 10 41f46a6179Smrg#define F_Accel 11 42f46a6179Smrg#define F_Button 12 43f46a6179Smrg#define F_Value 13 44f46a6179Smrg#define F_Controls 14 45f46a6179Smrg#define F_Type 15 46f46a6179Smrg#define F_Count 16 47f46a6179Smrg#define F_Screen 17 48f46a6179Smrg#define F_Same 18 49f46a6179Smrg#define F_Data 19 50f46a6179Smrg#define F_Device 20 51f46a6179Smrg#define F_Keycode 21 52f46a6179Smrg#define F_ModsToClear 22 53f46a6179Smrg#define F_LastField F_ModsToClear 54f46a6179Smrg#define F_NumFields (F_LastField+1) 55f46a6179Smrg 56f46a6179Smrg#define PrivateAction (XkbSA_LastAction+1) 57f46a6179Smrg 5834345a63Smrgtypedef struct _ActionInfo 5934345a63Smrg{ 6034345a63Smrg unsigned action; 6134345a63Smrg unsigned field; 6234345a63Smrg ExprDef *array_ndx; 6334345a63Smrg ExprDef *value; 6434345a63Smrg struct _ActionInfo *next; 65f46a6179Smrg} ActionInfo; 66f46a6179Smrg 6734345a63Smrgextern int HandleActionDef(ExprDef * /* def */ , 6834345a63Smrg XkbDescPtr /* xkb */ , 6934345a63Smrg XkbAnyAction * /* action */ , 7034345a63Smrg unsigned /* mergeMode */ , 7134345a63Smrg ActionInfo * /* info */ 7234345a63Smrg ); 73f46a6179Smrg 7434345a63Smrgextern int SetActionField(XkbDescPtr /* xkb */ , 75c82dfdfbSmrg const char * /* elem */ , 76c82dfdfbSmrg const char * /* field */ , 7734345a63Smrg ExprDef * /* index */ , 7834345a63Smrg ExprDef * /* value */ , 7934345a63Smrg ActionInfo ** /* info_rtrn */ 8034345a63Smrg ); 81f46a6179Smrg 8234345a63Smrgextern void ActionsInit(void); 83f46a6179Smrg 84f46a6179Smrgextern LookupEntry ctrlNames[]; 85f46a6179Smrg 86f46a6179Smrg#endif /* ACTION_H */ 87