Revert "Declaration on top"
[notion.git] / ioncore / attach.h
blobfe89217360ad59ed8beab12ef1c16c4694c8be95
1 /*
2 * ion/ioncore/attach.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #ifndef ION_IONCORE_ATTACH_H
10 #define ION_IONCORE_ATTACH_H
12 #include "region.h"
13 #include "reginfo.h"
14 #include "window.h"
17 typedef WRegion *WRegionCreateFn(WWindow *parent,
18 const WFitParams *fp,
19 void *param);
21 typedef WRegion *WRegionAttachFn(WRegion *reg,
22 void *param,
23 WRegionAttachData *data);
26 typedef enum{
27 REGION_ATTACH_REPARENT,
28 REGION_ATTACH_NEW,
29 REGION_ATTACH_LOAD
30 } WRegionAttachType;
33 DECLSTRUCT(WRegionAttachData){
34 WRegionAttachType type;
35 union{
36 WRegion *reg;
37 struct{
38 WRegionCreateFn *fn;
39 void *param;
40 } n;
41 ExtlTab tab;
42 } u;
46 typedef bool WRegionDoAttachFn(WRegion *reg, WRegion *sub, void *param);
47 typedef bool WRegionDoAttachFnSimple(WRegion *reg, WRegion *sub);
49 extern WRegion *region_attach_helper(WRegion *mgr,
50 WWindow *par, const WFitParams *fp,
51 WRegionDoAttachFn *fn, void *fn_param,
52 const WRegionAttachData *data);
54 extern WRegion *region_attach_load_helper(WRegion *mgr,
55 WWindow *par, const WFitParams *fp,
56 WRegionDoAttachFn *fn, void *fn_param,
57 ExtlTab tab, WPHolder **sm_ph);
59 extern bool region_ancestor_check(WRegion *dst, WRegion *reg);
61 extern void region_postdetach_dispose(WRegion *reg, WRegion *disposeroot);
64 #endif /* ION_IONCORE_ATTACH_H */