]> git.decadent.org.uk Git - ion3.git/blob - ioncore/regbind.h
Imported Upstream version 20090110
[ion3.git] / ioncore / regbind.h
1 /*
2  * ion/ioncore/regbind.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2009. 
5  *
6  * See the included file LICENSE for details.
7  */
8
9 #ifndef ION_IONCORE_REGBIND_H
10 #define ION_IONCORE_REGBIND_H
11
12 #include "global.h"
13 #include "common.h"
14 #include "region.h"
15 #include "binding.h"
16
17
18 DECLSTRUCT(WSubmapState){
19     uint key, state;
20     WSubmapState *next;
21     /* ExtlFn leave; */
22     /* Watch leave_reg; */
23 };
24
25
26 extern bool region_add_bindmap(WRegion *reg, WBindmap *bindmap);
27 extern void region_remove_bindmap(WRegion *reg, WBindmap *bindmap);
28
29 extern void region_remove_bindings(WRegion *reg);
30
31 extern WBinding *region_lookup_keybinding(WRegion *reg, 
32                                           int act, uint state, uint kcb, 
33                                           const WSubmapState *sc,
34                                           WRegion **binding_owner_ret);
35 extern WBinding *region_lookup_binding(WRegion *reg, int act, uint state,
36                                             uint kcb, int area);
37
38 extern void rbind_binding_added(const WRegBindingInfo *rbind, 
39                                 const WBinding *binding,
40                                 const WBindmap *bindmap);
41 extern void rbind_binding_removed(const WRegBindingInfo *rbind, 
42                                   const WBinding *binding,
43                                   const WBindmap *bindmap);
44
45 extern void region_update_owned_grabs(WRegion *reg);
46 extern void region_do_update_owned_grabs(WRegion *reg);
47
48 #endif /* ION_IONCORE_REGBIND_H */
49