xref: /aosp_15_r20/external/libxkbcommon/src/xkbcomp/expr.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_EXPR_H
28*2b949d04SAndroid Build Coastguard Worker #define XKBCOMP_EXPR_H
29*2b949d04SAndroid Build Coastguard Worker 
30*2b949d04SAndroid Build Coastguard Worker bool
31*2b949d04SAndroid Build Coastguard Worker ExprResolveLhs(struct xkb_context *ctx, const ExprDef *expr,
32*2b949d04SAndroid Build Coastguard Worker                const char **elem_rtrn, const char **field_rtrn,
33*2b949d04SAndroid Build Coastguard Worker                ExprDef **index_rtrn);
34*2b949d04SAndroid Build Coastguard Worker 
35*2b949d04SAndroid Build Coastguard Worker bool
36*2b949d04SAndroid Build Coastguard Worker ExprResolveModMask(struct xkb_context *ctx, const ExprDef *expr,
37*2b949d04SAndroid Build Coastguard Worker                    enum mod_type mod_type, const struct xkb_mod_set *mods,
38*2b949d04SAndroid Build Coastguard Worker                    xkb_mod_mask_t *mask_rtrn);
39*2b949d04SAndroid Build Coastguard Worker 
40*2b949d04SAndroid Build Coastguard Worker bool
41*2b949d04SAndroid Build Coastguard Worker ExprResolveMod(struct xkb_context *ctx, const ExprDef *def,
42*2b949d04SAndroid Build Coastguard Worker                enum mod_type mod_type, const struct xkb_mod_set *mods,
43*2b949d04SAndroid Build Coastguard Worker                xkb_mod_index_t *ndx_rtrn);
44*2b949d04SAndroid Build Coastguard Worker 
45*2b949d04SAndroid Build Coastguard Worker bool
46*2b949d04SAndroid Build Coastguard Worker ExprResolveBoolean(struct xkb_context *ctx, const ExprDef *expr,
47*2b949d04SAndroid Build Coastguard Worker                    bool *set_rtrn);
48*2b949d04SAndroid Build Coastguard Worker 
49*2b949d04SAndroid Build Coastguard Worker bool
50*2b949d04SAndroid Build Coastguard Worker ExprResolveKeyCode(struct xkb_context *ctx, const ExprDef *expr,
51*2b949d04SAndroid Build Coastguard Worker                    xkb_keycode_t *kc);
52*2b949d04SAndroid Build Coastguard Worker 
53*2b949d04SAndroid Build Coastguard Worker bool
54*2b949d04SAndroid Build Coastguard Worker ExprResolveInteger(struct xkb_context *ctx, const ExprDef *expr,
55*2b949d04SAndroid Build Coastguard Worker                    int *val_rtrn);
56*2b949d04SAndroid Build Coastguard Worker 
57*2b949d04SAndroid Build Coastguard Worker bool
58*2b949d04SAndroid Build Coastguard Worker ExprResolveLevel(struct xkb_context *ctx, const ExprDef *expr,
59*2b949d04SAndroid Build Coastguard Worker                  xkb_level_index_t *level_rtrn);
60*2b949d04SAndroid Build Coastguard Worker 
61*2b949d04SAndroid Build Coastguard Worker bool
62*2b949d04SAndroid Build Coastguard Worker ExprResolveGroup(struct xkb_context *ctx, const ExprDef *expr,
63*2b949d04SAndroid Build Coastguard Worker                  xkb_layout_index_t *group_rtrn);
64*2b949d04SAndroid Build Coastguard Worker 
65*2b949d04SAndroid Build Coastguard Worker bool
66*2b949d04SAndroid Build Coastguard Worker ExprResolveButton(struct xkb_context *ctx, const ExprDef *expr,
67*2b949d04SAndroid Build Coastguard Worker                   int *btn_rtrn);
68*2b949d04SAndroid Build Coastguard Worker 
69*2b949d04SAndroid Build Coastguard Worker bool
70*2b949d04SAndroid Build Coastguard Worker ExprResolveString(struct xkb_context *ctx, const ExprDef *expr,
71*2b949d04SAndroid Build Coastguard Worker                   xkb_atom_t *val_rtrn);
72*2b949d04SAndroid Build Coastguard Worker 
73*2b949d04SAndroid Build Coastguard Worker bool
74*2b949d04SAndroid Build Coastguard Worker ExprResolveEnum(struct xkb_context *ctx, const ExprDef *expr,
75*2b949d04SAndroid Build Coastguard Worker                 unsigned int *val_rtrn, const LookupEntry *values);
76*2b949d04SAndroid Build Coastguard Worker 
77*2b949d04SAndroid Build Coastguard Worker bool
78*2b949d04SAndroid Build Coastguard Worker ExprResolveMask(struct xkb_context *ctx, const ExprDef *expr,
79*2b949d04SAndroid Build Coastguard Worker                 unsigned int *mask_rtrn, const LookupEntry *values);
80*2b949d04SAndroid Build Coastguard Worker 
81*2b949d04SAndroid Build Coastguard Worker bool
82*2b949d04SAndroid Build Coastguard Worker ExprResolveKeySym(struct xkb_context *ctx, const ExprDef *expr,
83*2b949d04SAndroid Build Coastguard Worker                   xkb_keysym_t *sym_rtrn);
84*2b949d04SAndroid Build Coastguard Worker 
85*2b949d04SAndroid Build Coastguard Worker #endif
86