]> git.decadent.org.uk Git - ion3.git/blob - ioncore/window.h
[svn-inject] Installing original source of ion3
[ion3.git] / ioncore / window.h
1 /*
2  * ion/ioncore/window.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-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_WINDOW_H
13 #define ION_IONCORE_WINDOW_H
14
15 #include "common.h"
16 #include "region.h"
17 #include "binding.h"
18 #include "rectangle.h"
19
20
21 DECLCLASS(WWindow){
22     WRegion region;
23     Window win;
24     XIC xic;
25     long event_mask;
26     WStacking *stacking;
27 };
28
29
30 extern bool window_init(WWindow *p, WWindow *parent, 
31                         const WFitParams *fp);
32 extern bool window_do_init(WWindow *p, WWindow *parent, Window win, 
33                            const WFitParams *fp);
34 extern void window_deinit(WWindow *win);
35
36 DYNFUN void window_draw(WWindow *wwin, bool complete);
37 DYNFUN void window_insstr(WWindow *wwin, const char *buf, size_t n);
38 DYNFUN int window_press(WWindow *wwin, XButtonEvent *ev, WRegion **reg_ret);
39 DYNFUN void window_release(WWindow *wwin);
40
41 /* Only to be used by regions that inherit this */
42 extern void window_map(WWindow *wwin);
43 extern void window_unmap(WWindow *wwin);
44
45 extern void window_do_set_focus(WWindow *wwin, bool warp);
46
47 extern void window_do_fitrep(WWindow *wwin, WWindow *parent,
48                              const WRectangle *geom);
49 extern bool window_fitrep(WWindow *wwin, WWindow *parent, 
50                           const WFitParams *fp);
51 extern void window_notify_subs_move(WWindow *wwin);
52
53 extern void window_restack(WWindow *wwin, Window other, int mode);
54
55 extern void window_select_input(WWindow *wwin, long event_mask);
56
57 #endif /* ION_IONCORE_WINDOW_H */