]> git.decadent.org.uk Git - ion3.git/blob - ioncore/regbind.h
ad1fe6d968718a83bc1e4710cf506876e926869e
[ion3.git] / ioncore / regbind.h
1 /*
2  * ion/ioncore/regbind.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2007. 
5  *
6  * Ion is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  */
11
12 #ifndef ION_IONCORE_REGBIND_H
13 #define ION_IONCORE_REGBIND_H
14
15 #include "global.h"
16 #include "common.h"
17 #include "region.h"
18 #include "binding.h"
19
20
21 DECLSTRUCT(WSubmapState){
22     uint key, state;
23     WSubmapState *next;
24 };
25
26
27 extern bool region_add_bindmap(WRegion *reg, WBindmap *bindmap);
28 extern void region_remove_bindmap(WRegion *reg, WBindmap *bindmap);
29
30 extern void region_remove_bindings(WRegion *reg);
31
32 extern WBinding *region_lookup_keybinding(WRegion *reg, const XKeyEvent *ev,
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