chiark / gitweb /
Imported Debian patch 1.0.0-5
[e16] / src / ecompmgr.h
1 /*
2  * Copyright (C) 2004-2008 Kim Woelders
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to
6  * deal in the Software without restriction, including without limitation the
7  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8  * sell copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies of the Software, its documentation and marketing & publicity
13  * materials, and acknowledgment shall be given in the documentation, materials
14  * and software packages that this Software was used.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  */
23 #ifndef _ECOMPMGR_H
24 #define _ECOMPMGR_H
25
26 #if USE_COMPOSITE
27
28 #include "eobj.h"
29 #include "etypes.h"
30
31 typedef struct {
32    char                enable;
33    int                 shadow;
34    char                fading;
35    int                 fade_speed;
36    int                 opacity_focused;
37    int                 opacity_unfocused;
38    int                 opacity_override;
39 } cfg_composite;
40
41 int                 ECompMgrIsActive(void);
42
43 int                 ECompMgrDeskConfigure(Desk * dsk);
44
45 Pixmap              ECompMgrGetRootBuffer(void);
46
47 void                ECompMgrWinNew(EObj * eo);
48 void                ECompMgrWinDel(EObj * eo);
49 void                ECompMgrWinMap(EObj * eo);
50 void                ECompMgrWinUnmap(EObj * eo);
51 void                ECompMgrWinMoveResize(EObj * eo, int change_xy,
52                                           int change_wh, int change_bw);
53 void                ECompMgrWinDamageArea(EObj * eo, int x, int y, int w,
54                                           int h);
55 void                ECompMgrWinReparent(EObj * eo, Desk * dsk, int change_xy);
56 void                ECompMgrWinRaiseLower(EObj * eo, int delta);
57 void                ECompMgrWinChangeShape(EObj * eo);
58 void                ECompMgrWinChangeOpacity(EObj * eo, unsigned int opacity);
59 void                ECompMgrWinChangeShadow(EObj * eo, int shadow);
60 Pixmap              ECompMgrWinGetPixmap(const EObj * eo);
61 void                ECompMgrWinClipToGC(EObj * eo, GC gc);
62
63 void                ECompMgrConfigGet(cfg_composite * cfg);
64 void                ECompMgrConfigSet(const cfg_composite * cfg);
65
66 void                ECompMgrMoveResizeFix(EObj * eo, int x, int y, int w,
67                                           int h);
68
69 void                ECompMgrRepaint(void);
70
71 #else
72
73 #define ECompMgrIsActive()          0
74
75 #define ECompMgrDeskConfigure(dsk)  0
76
77 #define ECompMgrGetRootBuffer()     None
78
79 #endif
80
81 #endif /* _ECOMPMGR_H */