]> git.decadent.org.uk Git - ion3.git/blob - ioncore/pholder.h
[svn-inject] Installing original source of ion3
[ion3.git] / ioncore / pholder.h
1 /*
2  * ion/ioncore/pholder.h
3  *
4  * Copyright (c) Tuomo Valkonen 2005-2006. 
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_PHOLDER_H
13 #define ION_IONCORE_PHOLDER_H
14
15 #include "common.h"
16 #include "attach.h"
17 #include "extlconv.h"
18
19
20 #define PHOLDER_ATTACH_SWITCHTO 0x0001
21
22
23 /* Note: PHolders should be destroyed by their acquirer. */
24
25 DECLCLASS(WPHolder){
26     Obj obj;
27     WPHolder *redirect;
28 };
29
30
31 extern bool pholder_init(WPHolder *ph);
32 extern void pholder_deinit(WPHolder *ph);
33
34 DYNFUN WRegion *pholder_do_attach(WPHolder *ph, int flags,
35                                   WRegionAttachData *data);
36
37 extern WRegion *pholder_attach_(WPHolder *ph, int flags, 
38                                 WRegionAttachData *data);
39
40 extern bool pholder_attach(WPHolder *ph, int flags, WRegion *reg);
41
42 DYNFUN WRegion *pholder_do_target(WPHolder *ph);
43
44 extern WRegion *pholder_target(WPHolder *ph);
45
46 DYNFUN bool pholder_do_check_reparent(WPHolder *ph, WRegion *reg);
47
48 extern bool pholder_check_reparent(WPHolder *ph, WRegion *reg);
49
50 DYNFUN bool pholder_do_goto(WPHolder *ph);
51
52 extern bool pholder_goto(WPHolder *ph);
53
54 extern bool pholder_redirect(WPHolder *ph, WRegion *old_target);
55
56 extern WPHolder *pholder_either(WPHolder *a, WPHolder *b);
57
58 DYNFUN WPHolder *region_managed_get_pholder(WRegion *reg, WRegion *mgd);
59 DYNFUN WPHolder *region_get_rescue_pholder_for(WRegion *reg, WRegion *mgd);
60
61 extern WPHolder *region_get_rescue_pholder(WRegion *reg);
62
63 #endif /* ION_IONCORE_PHOLDER_H */