]> git.decadent.org.uk Git - ion3.git/blob - ioncore/framedpholder.h
[svn-inject] Installing original source of ion3
[ion3.git] / ioncore / framedpholder.h
1 /*
2  * ion/ioncore/framedpholder.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_FRAMEDPHOLDER_H
13 #define ION_IONCORE_FRAMEDPHOLDER_H
14
15 #include "common.h"
16 #include "pholder.h"
17 #include "attach.h"
18
19 INTRCLASS(WFramedPHolder);
20 INTRSTRUCT(WFramedParam);
21
22
23 #define FRAMEDPARAM_INIT {0, 0, {0, 0, 0, 0}, NULL}
24
25
26 DECLSTRUCT(WFramedParam){
27     uint inner_geom_gravity_set:1;
28     int gravity;
29     WRectangle inner_geom;
30     WRegionSimpleCreateFn *mkframe;
31 };
32
33
34 DECLCLASS(WFramedPHolder){
35     WPHolder ph;
36     WPHolder *cont;
37     WFramedParam param;
38 };
39
40
41 extern WFramedPHolder *create_framedpholder(WPHolder *cont,
42                                             const WFramedParam *param);
43
44 extern bool framedpholder_init(WFramedPHolder *ph, WPHolder *cont,
45                                const WFramedParam *param);
46
47 extern void framedpholder_deinit(WFramedPHolder *ph);
48
49 extern bool framedpholder_do_goto(WFramedPHolder *ph);
50
51 extern WRegion *framedpholder_do_target(WFramedPHolder *ph);
52
53 extern WRegion *framedpholder_do_attach(WFramedPHolder *ph, int flags,
54                                         WRegionAttachData *data);
55
56 extern WRegion *region_attach_framed(WRegion *reg, WFramedParam *param,
57                                      WRegionAttachFn *fn, void *fn_param,
58                                      WRegionAttachData *data);
59
60 #endif /* ION_IONCORE_FRAMEDPHOLDER_H */