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