xref: /aosp_15_r20/external/libxkbcommon/src/xkbcomp/action.h (revision 2b949d0487e80d67f1fda82db69e101e761f8064)
1*2b949d04SAndroid Build Coastguard Worker /************************************************************
2*2b949d04SAndroid Build Coastguard Worker  * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
3*2b949d04SAndroid Build Coastguard Worker  *
4*2b949d04SAndroid Build Coastguard Worker  * Permission to use, copy, modify, and distribute this
5*2b949d04SAndroid Build Coastguard Worker  * software and its documentation for any purpose and without
6*2b949d04SAndroid Build Coastguard Worker  * fee is hereby granted, provided that the above copyright
7*2b949d04SAndroid Build Coastguard Worker  * notice appear in all copies and that both that copyright
8*2b949d04SAndroid Build Coastguard Worker  * notice and this permission notice appear in supporting
9*2b949d04SAndroid Build Coastguard Worker  * documentation, and that the name of Silicon Graphics not be
10*2b949d04SAndroid Build Coastguard Worker  * used in advertising or publicity pertaining to distribution
11*2b949d04SAndroid Build Coastguard Worker  * of the software without specific prior written permission.
12*2b949d04SAndroid Build Coastguard Worker  * Silicon Graphics makes no representation about the suitability
13*2b949d04SAndroid Build Coastguard Worker  * of this software for any purpose. It is provided "as is"
14*2b949d04SAndroid Build Coastguard Worker  * without any express or implied warranty.
15*2b949d04SAndroid Build Coastguard Worker  *
16*2b949d04SAndroid Build Coastguard Worker  * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
17*2b949d04SAndroid Build Coastguard Worker  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18*2b949d04SAndroid Build Coastguard Worker  * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
19*2b949d04SAndroid Build Coastguard Worker  * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
20*2b949d04SAndroid Build Coastguard Worker  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21*2b949d04SAndroid Build Coastguard Worker  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
22*2b949d04SAndroid Build Coastguard Worker  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
23*2b949d04SAndroid Build Coastguard Worker  * THE USE OR PERFORMANCE OF THIS SOFTWARE.
24*2b949d04SAndroid Build Coastguard Worker  *
25*2b949d04SAndroid Build Coastguard Worker  ********************************************************/
26*2b949d04SAndroid Build Coastguard Worker 
27*2b949d04SAndroid Build Coastguard Worker #ifndef XKBCOMP_ACTION_H
28*2b949d04SAndroid Build Coastguard Worker #define XKBCOMP_ACTION_H
29*2b949d04SAndroid Build Coastguard Worker 
30*2b949d04SAndroid Build Coastguard Worker /*
31*2b949d04SAndroid Build Coastguard Worker  * This struct contains the default values which every new action
32*2b949d04SAndroid Build Coastguard Worker  * (e.g. in an interpret statement) starts off with. It can be
33*2b949d04SAndroid Build Coastguard Worker  * modified within the files (see calls to SetActionField).
34*2b949d04SAndroid Build Coastguard Worker  */
35*2b949d04SAndroid Build Coastguard Worker typedef struct {
36*2b949d04SAndroid Build Coastguard Worker     union xkb_action actions[_ACTION_TYPE_NUM_ENTRIES];
37*2b949d04SAndroid Build Coastguard Worker } ActionsInfo;
38*2b949d04SAndroid Build Coastguard Worker 
39*2b949d04SAndroid Build Coastguard Worker ActionsInfo *
40*2b949d04SAndroid Build Coastguard Worker NewActionsInfo(void);
41*2b949d04SAndroid Build Coastguard Worker 
42*2b949d04SAndroid Build Coastguard Worker void
43*2b949d04SAndroid Build Coastguard Worker FreeActionsInfo(ActionsInfo *info);
44*2b949d04SAndroid Build Coastguard Worker 
45*2b949d04SAndroid Build Coastguard Worker bool
46*2b949d04SAndroid Build Coastguard Worker HandleActionDef(struct xkb_context *ctx, ActionsInfo *info,
47*2b949d04SAndroid Build Coastguard Worker                 const struct xkb_mod_set *mods, ExprDef *def,
48*2b949d04SAndroid Build Coastguard Worker                 union xkb_action *action);
49*2b949d04SAndroid Build Coastguard Worker 
50*2b949d04SAndroid Build Coastguard Worker bool
51*2b949d04SAndroid Build Coastguard Worker SetActionField(struct xkb_context *ctx, ActionsInfo *info,
52*2b949d04SAndroid Build Coastguard Worker                struct xkb_mod_set *mods, const char *elem,
53*2b949d04SAndroid Build Coastguard Worker                const char *field, ExprDef *array_ndx, ExprDef *value);
54*2b949d04SAndroid Build Coastguard Worker 
55*2b949d04SAndroid Build Coastguard Worker 
56*2b949d04SAndroid Build Coastguard Worker #endif
57