Merge lp:~mc-return/compiz/compiz.merge-replace-defines into lp:compiz/0.9.8
- compiz.merge-replace-defines
- Merge into 0.9.8
Status: | Merged |
---|---|
Approved by: | Sam Spilsbury |
Approved revision: | 3353 |
Merged at revision: | 3358 |
Proposed branch: | lp:~mc-return/compiz/compiz.merge-replace-defines |
Merge into: | lp:compiz/0.9.8 |
Diff against target: |
1482 lines (+298/-160) 84 files modified
gtk/window-decorator/gtk-window-decorator.c (+17/-0) gtk/window-decorator/gtk-window-decorator.h (+13/-13) include/core/screen.h (+9/-9) kde/window-decorator-kde4/decorator.cpp (+11/-4) kde/window-decorator-kde4/decorator.h (+5/-5) libdecoration/decoration.c (+1/-1) plugins/animation/include/animation/animation.h (+2/-1) plugins/animation/src/animation.cpp (+5/-1) plugins/animation/src/private.h (+1/-1) plugins/animationaddon/src/animationaddon.cpp (+3/-0) plugins/animationaddon/src/polygon.cpp (+2/-2) plugins/animationaddon/src/private.h (+1/-1) plugins/bench/src/bench.cpp (+2/-2) plugins/blur/src/blur.cpp (+7/-1) plugins/blur/src/blur.h (+4/-4) plugins/ccp/src/ccp.cpp (+2/-2) plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h (+2/-2) plugins/compiztoolbox/src/compiztoolbox.cpp (+3/-0) plugins/copytex/src/copytex.cpp (+3/-0) plugins/copytex/src/copytex.h (+2/-2) plugins/cubeaddon/src/cubeaddon.cpp (+10/-0) plugins/cubeaddon/src/cubeaddon.h (+9/-9) plugins/dbus/src/dbus.h (+4/-4) plugins/decor/src/decor.h (+3/-3) plugins/expo/src/expo.cpp (+1/-1) plugins/firepaint/src/firepaint.cpp (+2/-0) plugins/firepaint/src/firepaint.h (+1/-1) plugins/grid/src/grid.h (+1/-1) plugins/group/src/glow.cpp (+10/-0) plugins/group/src/glow.h (+9/-9) plugins/group/src/group.cpp (+3/-1) plugins/group/src/group.h (+1/-1) plugins/group/src/tab.cpp (+1/-1) plugins/imgpng/src/imgpng.cpp (+2/-0) plugins/imgpng/src/imgpng.h (+1/-1) plugins/maximumize/src/maximumize.cpp (+4/-0) plugins/maximumize/src/maximumize.h (+3/-3) plugins/mousepoll/src/mousepoll.cpp (+3/-0) plugins/mousepoll/src/private.h (+2/-2) plugins/move/src/move.cpp (+5/-0) plugins/move/src/move.h (+3/-3) plugins/notification/src/notification.cpp (+3/-1) plugins/notification/src/notification.h (+1/-1) plugins/obs/src/obs.cpp (+4/-0) plugins/obs/src/obs.h (+4/-4) plugins/opacify/src/opacify.cpp (+2/-0) plugins/opacify/src/opacify.h (+1/-1) plugins/opengl/include/opengl/opengl.h (+7/-7) plugins/opengl/src/opengl.cpp (+10/-0) plugins/place/src/place.cpp (+2/-2) plugins/place/src/smart/src/smart.cpp (+3/-3) plugins/put/src/put.cpp (+4/-4) plugins/resize/src/logic/include/resize-defs.h (+2/-2) plugins/resize/src/logic/src/resize-logic.cpp (+4/-4) plugins/resizeinfo/src/resizeinfo.cpp (+5/-0) plugins/resizeinfo/src/resizeinfo.h (+3/-3) plugins/ring/src/ring.cpp (+4/-0) plugins/ring/src/ring.h (+2/-2) plugins/rotate/src/rotate.cpp (+1/-1) plugins/scaleaddon/src/scaleaddon.cpp (+1/-1) plugins/shelf/src/shelf.cpp (+2/-0) plugins/shelf/src/shelf.h (+1/-1) plugins/shift/src/shift.cpp (+2/-0) plugins/shift/src/shift.h (+1/-1) plugins/showdesktop/src/showdesktop.cpp (+5/-0) plugins/showdesktop/src/showdesktop.h (+4/-4) plugins/splash/src/splash.cpp (+3/-0) plugins/splash/src/splash.h (+2/-2) plugins/staticswitcher/src/staticswitcher.cpp (+3/-0) plugins/staticswitcher/src/staticswitcher.h (+2/-2) plugins/switcher/src/switcher.cpp (+6/-0) plugins/switcher/src/switcher.h (+4/-4) plugins/td/src/3d.cpp (+2/-0) plugins/td/src/3d.h (+1/-1) plugins/text/src/text.cpp (+1/-1) plugins/thumbnail/src/thumbnail.cpp (+2/-0) plugins/thumbnail/src/thumbnail.h (+1/-1) plugins/wall/src/wall.cpp (+4/-4) plugins/water/src/water.cpp (+4/-0) plugins/water/src/water.h (+2/-2) plugins/wobbly/src/wobbly.h (+1/-1) src/event.cpp (+3/-3) src/screen.cpp (+5/-5) src/timer/src/timer.cpp (+1/-1) |
To merge this branch: | bzr merge lp:~mc-return/compiz/compiz.merge-replace-defines |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sam Spilsbury | Approve | ||
MC Return | Needs Resubmitting | ||
Review via email: mp+122865@code.launchpad.net |
Commit message
Replaced #defines of standard variable types
Description of the change
Replaces #defines of standard variable types
MC Return (mc-return) wrote : | # |
Sam Spilsbury (smspillaz) wrote : | # |
I vote continue. Daniel?
MC Return (mc-return) wrote : | # |
Ready for review so far.
I've left out converting stuff like ABI_VERSION and may have missed some others - also for now I did replace just the #defines of short, int and string types, but this compiles and *should* work.
Daniel van Vugt (vanvugt) wrote : | # |
I think PI should be defined as value M_PI (from #include <math.h>). And *ABI* macros have to stay as macros so they can be used in preprocessing:
#if SOMETHING_ABI >= N
Daniel van Vugt (vanvugt) wrote : | # |
Scratch that. M_PI is not technically a C/C++ standard, so don't use it.
MC Return (mc-return) wrote : | # |
> And *ABI*
> macros have to stay as macros so they can be used in preprocessing:
> #if SOMETHING_ABI >= N
Okay, did not touch any of the ABI #defines.
MC Return (mc-return) wrote : | # |
> Scratch that. M_PI is not technically a C/C++ standard, so don't use it.
For now I did just change #defines of PI to "static const double PI = 3.14159265359f;".
MC Return (mc-return) wrote : | # |
CI test start, please :)
Sam Spilsbury (smspillaz) : | # |
Preview Diff
1 | === modified file 'gtk/window-decorator/gtk-window-decorator.c' | |||
2 | --- gtk/window-decorator/gtk-window-decorator.c 2012-08-27 15:40:30 +0000 | |||
3 | +++ gtk/window-decorator/gtk-window-decorator.c 2012-09-08 00:13:22 +0000 | |||
4 | @@ -43,6 +43,23 @@ | |||
5 | 43 | 43 | ||
6 | 44 | #define SWITCHER_SPACE 40 | 44 | #define SWITCHER_SPACE 40 |
7 | 45 | 45 | ||
8 | 46 | const float STROKE_ALPHA = 0.6f; | ||
9 | 47 | |||
10 | 48 | const unsigned short ICON_SPACE = 20; | ||
11 | 49 | |||
12 | 50 | const float DOUBLE_CLICK_DISTANCE = 8.0f; | ||
13 | 51 | |||
14 | 52 | const float SHADOW_RADIUS = 8.0f; | ||
15 | 53 | const float SHADOW_OPACITY = 0.5f; | ||
16 | 54 | const unsigned short SHADOW_OFFSET_X = 1; | ||
17 | 55 | const unsigned short SHADOW_OFFSET_Y = 1; | ||
18 | 56 | |||
19 | 57 | const float META_OPACITY = 0.75f; | ||
20 | 58 | |||
21 | 59 | const float META_ACTIVE_OPACITY = 1.0f; | ||
22 | 60 | |||
23 | 61 | guint cmdline_options = 0; | ||
24 | 62 | |||
25 | 46 | GdkPixmap *decor_normal_pixmap = NULL; | 63 | GdkPixmap *decor_normal_pixmap = NULL; |
26 | 47 | GdkPixmap *decor_active_pixmap = NULL; | 64 | GdkPixmap *decor_active_pixmap = NULL; |
27 | 48 | 65 | ||
28 | 49 | 66 | ||
29 | === modified file 'gtk/window-decorator/gtk-window-decorator.h' | |||
30 | --- gtk/window-decorator/gtk-window-decorator.h 2012-08-28 04:45:17 +0000 | |||
31 | +++ gtk/window-decorator/gtk-window-decorator.h 2012-09-08 00:13:22 +0000 | |||
32 | @@ -172,11 +172,11 @@ | |||
33 | 172 | #define DBUS_INTERFACE "org.freedesktop.compiz" | 172 | #define DBUS_INTERFACE "org.freedesktop.compiz" |
34 | 173 | #define DBUS_METHOD_GET "get" | 173 | #define DBUS_METHOD_GET "get" |
35 | 174 | 174 | ||
41 | 175 | #define STROKE_ALPHA 0.6 | 175 | extern const float STROKE_ALPHA; |
42 | 176 | 176 | ||
43 | 177 | #define ICON_SPACE 20 | 177 | extern const unsigned short ICON_SPACE; |
44 | 178 | 178 | ||
45 | 179 | #define DOUBLE_CLICK_DISTANCE 8.0 | 179 | extern const float DOUBLE_CLICK_DISTANCE; |
46 | 180 | 180 | ||
47 | 181 | #define WM_MOVERESIZE_SIZE_TOPLEFT 0 | 181 | #define WM_MOVERESIZE_SIZE_TOPLEFT 0 |
48 | 182 | #define WM_MOVERESIZE_SIZE_TOP 1 | 182 | #define WM_MOVERESIZE_SIZE_TOP 1 |
49 | @@ -190,18 +190,18 @@ | |||
50 | 190 | #define WM_MOVERESIZE_SIZE_KEYBOARD 9 | 190 | #define WM_MOVERESIZE_SIZE_KEYBOARD 9 |
51 | 191 | #define WM_MOVERESIZE_MOVE_KEYBOARD 10 | 191 | #define WM_MOVERESIZE_MOVE_KEYBOARD 10 |
52 | 192 | 192 | ||
57 | 193 | #define SHADOW_RADIUS 8.0 | 193 | extern const float SHADOW_RADIUS; |
58 | 194 | #define SHADOW_OPACITY 0.5 | 194 | extern const float SHADOW_OPACITY; |
59 | 195 | #define SHADOW_OFFSET_X 1 | 195 | extern const unsigned short SHADOW_OFFSET_X; |
60 | 196 | #define SHADOW_OFFSET_Y 1 | 196 | extern const unsigned short SHADOW_OFFSET_Y; |
61 | 197 | #define SHADOW_COLOR_RED 0x0000 | 197 | #define SHADOW_COLOR_RED 0x0000 |
62 | 198 | #define SHADOW_COLOR_GREEN 0x0000 | 198 | #define SHADOW_COLOR_GREEN 0x0000 |
63 | 199 | #define SHADOW_COLOR_BLUE 0x0000 | 199 | #define SHADOW_COLOR_BLUE 0x0000 |
64 | 200 | 200 | ||
69 | 201 | #define META_OPACITY 0.75 | 201 | extern const float META_OPACITY; |
70 | 202 | #define META_SHADE_OPACITY TRUE | 202 | #define META_SHADE_OPACITY TRUE; |
71 | 203 | #define META_ACTIVE_OPACITY 1.0 | 203 | extern const float META_ACTIVE_OPACITY; |
72 | 204 | #define META_ACTIVE_SHADE_OPACITY TRUE | 204 | #define META_ACTIVE_SHADE_OPACITY TRUE; |
73 | 205 | 205 | ||
74 | 206 | #define META_MAXIMIZED (WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY | \ | 206 | #define META_MAXIMIZED (WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY | \ |
75 | 207 | WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY) | 207 | WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY) |
76 | 208 | 208 | ||
77 | === modified file 'include/core/screen.h' | |||
78 | --- include/core/screen.h 2012-06-24 09:00:27 +0000 | |||
79 | +++ include/core/screen.h 2012-09-08 00:13:22 +0000 | |||
80 | @@ -69,15 +69,15 @@ | |||
81 | 69 | #define NOTIFY_MOVE_MASK (1 << 2) | 69 | #define NOTIFY_MOVE_MASK (1 << 2) |
82 | 70 | #define NOTIFY_MODIFY_MASK (1 << 3) | 70 | #define NOTIFY_MODIFY_MASK (1 << 3) |
83 | 71 | 71 | ||
93 | 72 | #define SCREEN_EDGE_LEFT 0 | 72 | #define SCREEN_EDGE_LEFT 0 |
94 | 73 | #define SCREEN_EDGE_RIGHT 1 | 73 | #define SCREEN_EDGE_RIGHT 1 |
95 | 74 | #define SCREEN_EDGE_TOP 2 | 74 | #define SCREEN_EDGE_TOP 2 |
96 | 75 | #define SCREEN_EDGE_BOTTOM 3 | 75 | #define SCREEN_EDGE_BOTTOM 3 |
97 | 76 | #define SCREEN_EDGE_TOPLEFT 4 | 76 | #define SCREEN_EDGE_TOPLEFT 4 |
98 | 77 | #define SCREEN_EDGE_TOPRIGHT 5 | 77 | #define SCREEN_EDGE_TOPRIGHT 5 |
99 | 78 | #define SCREEN_EDGE_BOTTOMLEFT 6 | 78 | #define SCREEN_EDGE_BOTTOMLEFT 6 |
100 | 79 | #define SCREEN_EDGE_BOTTOMRIGHT 7 | 79 | #define SCREEN_EDGE_BOTTOMRIGHT 7 |
101 | 80 | #define SCREEN_EDGE_NUM 8 | 80 | #define SCREEN_EDGE_NUM 8 |
102 | 81 | 81 | ||
103 | 82 | typedef boost::function<void (short int)> FdWatchCallBack; | 82 | typedef boost::function<void (short int)> FdWatchCallBack; |
104 | 83 | typedef boost::function<void (const char *)> FileWatchCallBack; | 83 | typedef boost::function<void (const char *)> FileWatchCallBack; |
105 | 84 | 84 | ||
106 | === modified file 'kde/window-decorator-kde4/decorator.cpp' | |||
107 | --- kde/window-decorator-kde4/decorator.cpp 2012-05-27 04:32:55 +0000 | |||
108 | +++ kde/window-decorator-kde4/decorator.cpp 2012-09-08 00:13:22 +0000 | |||
109 | @@ -46,10 +46,17 @@ | |||
110 | 46 | 46 | ||
111 | 47 | #include <stdio.h> | 47 | #include <stdio.h> |
112 | 48 | 48 | ||
117 | 49 | #define SHADOW_RADIUS 8.0 | 49 | const unsigned int ROOT_OFF_X = 8192; |
118 | 50 | #define SHADOW_OPACITY 0.5 | 50 | const unsigned int ROOT_OFF_Y = 8192; |
119 | 51 | #define SHADOW_OFFSET_X 1 | 51 | |
120 | 52 | #define SHADOW_OFFSET_Y 1 | 52 | const unsigned short BLUR_TYPE_NONE = 0; |
121 | 53 | const unsigned short BLUR_TYPE_TITLEBAR = 1; | ||
122 | 54 | const unsigned short BLUR_TYPE_ALL = 2; | ||
123 | 55 | |||
124 | 56 | static const float SHADOW_RADIUS = 8.0f; | ||
125 | 57 | static const float SHADOW_OPACITY = 0.5f; | ||
126 | 58 | static const unsigned short SHADOW_OFFSET_X = 1; | ||
127 | 59 | static const unsigned short SHADOW_OFFSET_Y = 1; | ||
128 | 53 | #define SHADOW_COLOR_RED 0x0000 | 60 | #define SHADOW_COLOR_RED 0x0000 |
129 | 54 | #define SHADOW_COLOR_GREEN 0x0000 | 61 | #define SHADOW_COLOR_GREEN 0x0000 |
130 | 55 | #define SHADOW_COLOR_BLUE 0x0000 | 62 | #define SHADOW_COLOR_BLUE 0x0000 |
131 | 56 | 63 | ||
132 | === modified file 'kde/window-decorator-kde4/decorator.h' | |||
133 | --- kde/window-decorator-kde4/decorator.h 2011-10-13 11:31:37 +0000 | |||
134 | +++ kde/window-decorator-kde4/decorator.h 2012-09-08 00:13:22 +0000 | |||
135 | @@ -43,8 +43,8 @@ | |||
136 | 43 | #include "kdecoration_plugins.h" | 43 | #include "kdecoration_plugins.h" |
137 | 44 | #include "utils.h" | 44 | #include "utils.h" |
138 | 45 | 45 | ||
141 | 46 | #define ROOT_OFF_X 8192 | 46 | extern const unsigned int ROOT_OFF_X; |
142 | 47 | #define ROOT_OFF_Y 8192 | 47 | extern const unsigned int ROOT_OFF_Y; |
143 | 48 | 48 | ||
144 | 49 | #define C(name) { 0, XC_ ## name } | 49 | #define C(name) { 0, XC_ ## name } |
145 | 50 | 50 | ||
146 | @@ -55,9 +55,9 @@ | |||
147 | 55 | 55 | ||
148 | 56 | extern struct _cursor cursors[3][3]; | 56 | extern struct _cursor cursors[3][3]; |
149 | 57 | 57 | ||
153 | 58 | #define BLUR_TYPE_NONE 0 | 58 | extern const unsigned short BLUR_TYPE_NONE; |
154 | 59 | #define BLUR_TYPE_TITLEBAR 1 | 59 | extern const unsigned short BLUR_TYPE_TITLEBAR; |
155 | 60 | #define BLUR_TYPE_ALL 2 | 60 | extern const unsigned short BLUR_TYPE_ALL; |
156 | 61 | 61 | ||
157 | 62 | extern int blurType; | 62 | extern int blurType; |
158 | 63 | 63 | ||
159 | 64 | 64 | ||
160 | === modified file 'libdecoration/decoration.c' | |||
161 | --- libdecoration/decoration.c 2012-08-20 05:40:55 +0000 | |||
162 | +++ libdecoration/decoration.c 2012-09-08 00:13:22 +0000 | |||
163 | @@ -3145,7 +3145,7 @@ | |||
164 | 3145 | Time dm_sn_timestamp) | 3145 | Time dm_sn_timestamp) |
165 | 3146 | { | 3146 | { |
166 | 3147 | 3147 | ||
168 | 3148 | #define N_TARGETS 4 | 3148 | static const unsigned short N_TARGETS = 4; |
169 | 3149 | 3149 | ||
170 | 3150 | Atom conversion_targets[N_TARGETS]; | 3150 | Atom conversion_targets[N_TARGETS]; |
171 | 3151 | 3151 | ||
172 | 3152 | 3152 | ||
173 | === modified file 'plugins/animation/include/animation/animation.h' | |||
174 | --- plugins/animation/include/animation/animation.h 2012-09-04 10:00:14 +0000 | |||
175 | +++ plugins/animation/include/animation/animation.h 2012-09-08 00:13:22 +0000 | |||
176 | @@ -39,7 +39,8 @@ | |||
177 | 39 | AnimDirectionRandom, | 39 | AnimDirectionRandom, |
178 | 40 | AnimDirectionAuto | 40 | AnimDirectionAuto |
179 | 41 | } AnimDirection; | 41 | } AnimDirection; |
181 | 42 | #define LAST_ANIM_DIRECTION 5 | 42 | |
182 | 43 | extern const unsigned short LAST_ANIM_DIRECTION; | ||
183 | 43 | 44 | ||
184 | 44 | class PrivateAnimScreen; | 45 | class PrivateAnimScreen; |
185 | 45 | class PrivateAnimWindow; | 46 | class PrivateAnimWindow; |
186 | 46 | 47 | ||
187 | === modified file 'plugins/animation/src/animation.cpp' | |||
188 | --- plugins/animation/src/animation.cpp 2012-09-05 08:17:59 +0000 | |||
189 | +++ plugins/animation/src/animation.cpp 2012-09-08 00:13:22 +0000 | |||
190 | @@ -103,7 +103,11 @@ | |||
191 | 103 | 103 | ||
192 | 104 | COMPIZ_PLUGIN_20090315 (animation, AnimPluginVTable); | 104 | COMPIZ_PLUGIN_20090315 (animation, AnimPluginVTable); |
193 | 105 | 105 | ||
195 | 106 | #define FAKE_ICON_SIZE 4 | 106 | static const unsigned short FAKE_ICON_SIZE = 4; |
196 | 107 | |||
197 | 108 | const unsigned short LAST_ANIM_DIRECTION = 5; | ||
198 | 109 | |||
199 | 110 | const unsigned short NUM_EFFECTS = 16; | ||
200 | 107 | 111 | ||
201 | 108 | const char *eventNames[AnimEventNum] = | 112 | const char *eventNames[AnimEventNum] = |
202 | 109 | {"Open", "Close", "Minimize", "Unminimize", "Shade", "Focus"}; | 113 | {"Open", "Close", "Minimize", "Unminimize", "Shade", "Focus"}; |
203 | 110 | 114 | ||
204 | === modified file 'plugins/animation/src/private.h' | |||
205 | --- plugins/animation/src/private.h 2012-08-14 06:33:22 +0000 | |||
206 | +++ plugins/animation/src/private.h 2012-09-08 00:13:22 +0000 | |||
207 | @@ -89,7 +89,7 @@ | |||
208 | 89 | extern AnimEffect AnimEffectWave; | 89 | extern AnimEffect AnimEffectWave; |
209 | 90 | extern AnimEffect AnimEffectZoom; | 90 | extern AnimEffect AnimEffectZoom; |
210 | 91 | 91 | ||
212 | 92 | #define NUM_EFFECTS 16 | 92 | extern const unsigned short NUM_EFFECTS; |
213 | 93 | 93 | ||
214 | 94 | extern int customOptionOptionIds[AnimEventNum]; | 94 | extern int customOptionOptionIds[AnimEventNum]; |
215 | 95 | 95 | ||
216 | 96 | 96 | ||
217 | === modified file 'plugins/animationaddon/src/animationaddon.cpp' | |||
218 | --- plugins/animationaddon/src/animationaddon.cpp 2012-08-20 14:24:34 +0000 | |||
219 | +++ plugins/animationaddon/src/animationaddon.cpp 2012-09-08 00:13:22 +0000 | |||
220 | @@ -90,6 +90,9 @@ | |||
221 | 90 | 90 | ||
222 | 91 | COMPIZ_PLUGIN_20090315 (animationaddon, AnimAddonPluginVTable); | 91 | COMPIZ_PLUGIN_20090315 (animationaddon, AnimAddonPluginVTable); |
223 | 92 | 92 | ||
224 | 93 | // TODO Update this for each added animation effect! (total: 11) | ||
225 | 94 | const unsigned short NUM_EFFECTS = 11; | ||
226 | 95 | |||
227 | 93 | AnimEffect animEffects[NUM_EFFECTS]; | 96 | AnimEffect animEffects[NUM_EFFECTS]; |
228 | 94 | 97 | ||
229 | 95 | ExtensionPluginAnimAddon animAddonExtPluginInfo (CompString ("animationaddon"), | 98 | ExtensionPluginAnimAddon animAddonExtPluginInfo (CompString ("animationaddon"), |
230 | 96 | 99 | ||
231 | === modified file 'plugins/animationaddon/src/polygon.cpp' | |||
232 | --- plugins/animationaddon/src/polygon.cpp 2012-05-21 08:50:26 +0000 | |||
233 | +++ plugins/animationaddon/src/polygon.cpp 2012-09-08 00:13:22 +0000 | |||
234 | @@ -37,7 +37,7 @@ | |||
235 | 37 | #include <GL/glu.h> | 37 | #include <GL/glu.h> |
236 | 38 | #include "private.h" | 38 | #include "private.h" |
237 | 39 | 39 | ||
239 | 40 | #define MIN_WINDOW_GRID_SIZE 10 | 40 | static const unsigned short MIN_WINDOW_GRID_SIZE = 10; |
240 | 41 | 41 | ||
241 | 42 | PolygonAnim::PolygonAnim (CompWindow *w, | 42 | PolygonAnim::PolygonAnim (CompWindow *w, |
242 | 43 | WindowEvent curWindowEvent, | 43 | WindowEvent curWindowEvent, |
243 | @@ -1902,7 +1902,7 @@ | |||
244 | 1902 | 1902 | ||
245 | 1903 | float zradius = radius / ::screen->width (); | 1903 | float zradius = radius / ::screen->width (); |
246 | 1904 | 1904 | ||
248 | 1905 | #define N_POINTS 8 | 1905 | static const unsigned short N_POINTS = 8; |
249 | 1906 | // Corners of bounding cube | 1906 | // Corners of bounding cube |
250 | 1907 | Point3d cubeCorners[N_POINTS]; | 1907 | Point3d cubeCorners[N_POINTS]; |
251 | 1908 | cubeCorners[0].set (center.x () - radius, center.y () - radius, | 1908 | cubeCorners[0].set (center.x () - radius, center.y () - radius, |
252 | 1909 | 1909 | ||
253 | === modified file 'plugins/animationaddon/src/private.h' | |||
254 | --- plugins/animationaddon/src/private.h 2010-10-23 15:41:30 +0000 | |||
255 | +++ plugins/animationaddon/src/private.h 2012-09-08 00:13:22 +0000 | |||
256 | @@ -29,7 +29,7 @@ | |||
257 | 29 | extern AnimEffect AnimEffectSkewer; | 29 | extern AnimEffect AnimEffectSkewer; |
258 | 30 | 30 | ||
259 | 31 | // TODO Update this for each added animation effect! (total: 11) | 31 | // TODO Update this for each added animation effect! (total: 11) |
261 | 32 | #define NUM_EFFECTS 11 | 32 | extern const unsigned short NUM_EFFECTS; |
262 | 33 | 33 | ||
263 | 34 | // This must have the value of the first "effect setting" above | 34 | // This must have the value of the first "effect setting" above |
264 | 35 | // in AnimAddonScreenOptions | 35 | // in AnimAddonScreenOptions |
265 | 36 | 36 | ||
266 | === modified file 'plugins/bench/src/bench.cpp' | |||
267 | --- plugins/bench/src/bench.cpp 2012-09-04 15:33:44 +0000 | |||
268 | +++ plugins/bench/src/bench.cpp 2012-09-08 00:13:22 +0000 | |||
269 | @@ -29,8 +29,8 @@ | |||
270 | 29 | 29 | ||
271 | 30 | COMPIZ_PLUGIN_20090315 (bench, BenchPluginVTable) | 30 | COMPIZ_PLUGIN_20090315 (bench, BenchPluginVTable) |
272 | 31 | 31 | ||
275 | 32 | #define TEX_WIDTH 512 | 32 | static const unsigned int TEX_WIDTH = 512; |
276 | 33 | #define TEX_HEIGHT 256 | 33 | static const unsigned short TEX_HEIGHT = 256; |
277 | 34 | 34 | ||
278 | 35 | void | 35 | void |
279 | 36 | BenchScreen::preparePaint (int msSinceLastPaint) | 36 | BenchScreen::preparePaint (int msSinceLastPaint) |
280 | 37 | 37 | ||
281 | === modified file 'plugins/blur/src/blur.cpp' | |||
282 | --- plugins/blur/src/blur.cpp 2010-10-24 14:42:07 +0000 | |||
283 | +++ plugins/blur/src/blur.cpp 2012-09-08 00:13:22 +0000 | |||
284 | @@ -27,6 +27,12 @@ | |||
285 | 27 | 27 | ||
286 | 28 | COMPIZ_PLUGIN_20090315 (blur, BlurPluginVTable) | 28 | COMPIZ_PLUGIN_20090315 (blur, BlurPluginVTable) |
287 | 29 | 29 | ||
288 | 30 | const unsigned short BLUR_GAUSSIAN_RADIUS_MAX = 15; | ||
289 | 31 | |||
290 | 32 | const unsigned short BLUR_STATE_CLIENT = 0; | ||
291 | 33 | const unsigned short BLUR_STATE_DECOR = 1; | ||
292 | 34 | const unsigned short BLUR_STATE_NUM = 2; | ||
293 | 35 | |||
294 | 30 | /* pascal triangle based kernel generator */ | 36 | /* pascal triangle based kernel generator */ |
295 | 31 | static int | 37 | static int |
296 | 32 | blurCreateGaussianLinearKernel (int radius, | 38 | blurCreateGaussianLinearKernel (int radius, |
297 | @@ -1210,7 +1216,7 @@ | |||
298 | 1210 | return true; | 1216 | return true; |
299 | 1211 | } | 1217 | } |
300 | 1212 | 1218 | ||
302 | 1213 | #define MAX_VERTEX_PROJECT_COUNT 20 | 1219 | static const unsigned short MAX_VERTEX_PROJECT_COUNT = 20; |
303 | 1214 | 1220 | ||
304 | 1215 | void | 1221 | void |
305 | 1216 | BlurWindow::projectRegion (CompOutput *output, | 1222 | BlurWindow::projectRegion (CompOutput *output, |
306 | 1217 | 1223 | ||
307 | === modified file 'plugins/blur/src/blur.h' | |||
308 | --- plugins/blur/src/blur.h 2012-01-18 16:26:45 +0000 | |||
309 | +++ plugins/blur/src/blur.h 2012-09-08 00:13:22 +0000 | |||
310 | @@ -38,7 +38,7 @@ | |||
311 | 38 | #include <GL/glu.h> | 38 | #include <GL/glu.h> |
312 | 39 | 39 | ||
313 | 40 | 40 | ||
315 | 41 | #define BLUR_GAUSSIAN_RADIUS_MAX 15 | 41 | extern const unsigned short BLUR_GAUSSIAN_RADIUS_MAX; |
316 | 42 | 42 | ||
317 | 43 | struct BlurFunction { | 43 | struct BlurFunction { |
318 | 44 | 44 | ||
319 | @@ -56,9 +56,9 @@ | |||
320 | 56 | decor_point_t p2; | 56 | decor_point_t p2; |
321 | 57 | }; | 57 | }; |
322 | 58 | 58 | ||
326 | 59 | #define BLUR_STATE_CLIENT 0 | 59 | extern const unsigned short BLUR_STATE_CLIENT; |
327 | 60 | #define BLUR_STATE_DECOR 1 | 60 | extern const unsigned short BLUR_STATE_DECOR; |
328 | 61 | #define BLUR_STATE_NUM 2 | 61 | extern const unsigned short BLUR_STATE_NUM; |
329 | 62 | 62 | ||
330 | 63 | struct BlurState { | 63 | struct BlurState { |
331 | 64 | int threshold; | 64 | int threshold; |
332 | 65 | 65 | ||
333 | === modified file 'plugins/ccp/src/ccp.cpp' | |||
334 | --- plugins/ccp/src/ccp.cpp 2012-08-15 02:17:36 +0000 | |||
335 | +++ plugins/ccp/src/ccp.cpp 2012-09-08 00:13:22 +0000 | |||
336 | @@ -22,8 +22,8 @@ | |||
337 | 22 | 22 | ||
338 | 23 | COMPIZ_PLUGIN_20090315 (ccp, CcpPluginVTable) | 23 | COMPIZ_PLUGIN_20090315 (ccp, CcpPluginVTable) |
339 | 24 | 24 | ||
342 | 25 | #define CCP_UPDATE_MIN_TIMEOUT 250 | 25 | static const unsigned short CCP_UPDATE_MIN_TIMEOUT = 250; |
343 | 26 | #define CCP_UPDATE_MAX_TIMEOUT 4000 | 26 | static const unsigned short CCP_UPDATE_MAX_TIMEOUT = 4000; |
344 | 27 | #define CORE_VTABLE_NAME "core" | 27 | #define CORE_VTABLE_NAME "core" |
345 | 28 | 28 | ||
346 | 29 | 29 | ||
347 | 30 | 30 | ||
348 | === modified file 'plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h' | |||
349 | --- plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h 2012-01-31 17:01:32 +0000 | |||
350 | +++ plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h 2012-09-08 00:13:22 +0000 | |||
351 | @@ -161,7 +161,7 @@ | |||
352 | 161 | CompWindow *window; | 161 | CompWindow *window; |
353 | 162 | }; | 162 | }; |
354 | 163 | 163 | ||
357 | 164 | #define ICON_SIZE 48 | 164 | extern const unsigned short ICON_SIZE; |
358 | 165 | #define MAX_ICON_SIZE 256 | 165 | extern const unsigned int MAX_ICON_SIZE; |
359 | 166 | 166 | ||
360 | 167 | #endif | 167 | #endif |
361 | 168 | 168 | ||
362 | === modified file 'plugins/compiztoolbox/src/compiztoolbox.cpp' | |||
363 | --- plugins/compiztoolbox/src/compiztoolbox.cpp 2012-08-14 06:33:22 +0000 | |||
364 | +++ plugins/compiztoolbox/src/compiztoolbox.cpp 2012-09-08 00:13:22 +0000 | |||
365 | @@ -29,6 +29,9 @@ | |||
366 | 29 | #include <core/abiversion.h> | 29 | #include <core/abiversion.h> |
367 | 30 | #include <core/propertywriter.h> | 30 | #include <core/propertywriter.h> |
368 | 31 | 31 | ||
369 | 32 | const unsigned short ICON_SIZE = 48; | ||
370 | 33 | const unsigned int MAX_ICON_SIZE = 256; | ||
371 | 34 | |||
372 | 32 | bool openGLAvailable; | 35 | bool openGLAvailable; |
373 | 33 | 36 | ||
374 | 34 | class CompizToolboxScreen : | 37 | class CompizToolboxScreen : |
375 | 35 | 38 | ||
376 | === modified file 'plugins/copytex/src/copytex.cpp' | |||
377 | --- plugins/copytex/src/copytex.cpp 2012-07-03 18:16:28 +0000 | |||
378 | +++ plugins/copytex/src/copytex.cpp 2012-09-08 00:13:22 +0000 | |||
379 | @@ -27,6 +27,9 @@ | |||
380 | 27 | 27 | ||
381 | 28 | COMPIZ_PLUGIN_20090315 (copytex, CopytexPluginVTable) | 28 | COMPIZ_PLUGIN_20090315 (copytex, CopytexPluginVTable) |
382 | 29 | 29 | ||
383 | 30 | const int MAX_SUB_TEX = 2048; | ||
384 | 31 | const unsigned int SHM_SIZE = MAX_SUB_TEX * MAX_SUB_TEX * 4; | ||
385 | 32 | |||
386 | 30 | static GLTexture::Matrix _identity_matrix = { | 33 | static GLTexture::Matrix _identity_matrix = { |
387 | 31 | 1.0f, 0.0f, | 34 | 1.0f, 0.0f, |
388 | 32 | 0.0f, 1.0f, | 35 | 0.0f, 1.0f, |
389 | 33 | 36 | ||
390 | === modified file 'plugins/copytex/src/copytex.h' | |||
391 | --- plugins/copytex/src/copytex.h 2012-01-18 16:26:45 +0000 | |||
392 | +++ plugins/copytex/src/copytex.h 2012-09-08 00:13:22 +0000 | |||
393 | @@ -34,8 +34,8 @@ | |||
394 | 34 | #include <sys/shm.h> | 34 | #include <sys/shm.h> |
395 | 35 | #include <sys/ipc.h> | 35 | #include <sys/ipc.h> |
396 | 36 | 36 | ||
399 | 37 | #define MAX_SUB_TEX 2048 | 37 | extern const int MAX_SUB_TEX; |
400 | 38 | #define SHM_SIZE MAX_SUB_TEX * MAX_SUB_TEX * 4 | 38 | extern const unsigned int SHM_SIZE; |
401 | 39 | 39 | ||
402 | 40 | class CopyTexture; | 40 | class CopyTexture; |
403 | 41 | 41 | ||
404 | 42 | 42 | ||
405 | === modified file 'plugins/cubeaddon/src/cubeaddon.cpp' | |||
406 | --- plugins/cubeaddon/src/cubeaddon.cpp 2012-07-30 14:27:55 +0000 | |||
407 | +++ plugins/cubeaddon/src/cubeaddon.cpp 2012-09-08 00:13:22 +0000 | |||
408 | @@ -27,6 +27,16 @@ | |||
409 | 27 | 27 | ||
410 | 28 | COMPIZ_PLUGIN_20090315 (cubeaddon, CubeaddonPluginVTable); | 28 | COMPIZ_PLUGIN_20090315 (cubeaddon, CubeaddonPluginVTable); |
411 | 29 | 29 | ||
412 | 30 | const unsigned short CUBEADDON_GRID_SIZE = 100; | ||
413 | 31 | const unsigned short CAP_ELEMENTS = 15; | ||
414 | 32 | const unsigned int CAP_NVERTEX = (((CAP_ELEMENTS * (CAP_ELEMENTS + 1)) + 2) * 3); | ||
415 | 33 | const unsigned int CAP_NIDX = (CAP_ELEMENTS * (CAP_ELEMENTS - 1) * 4); | ||
416 | 34 | |||
417 | 35 | const unsigned int CAP_NIMGVERTEX = (((CAP_ELEMENTS + 1) * (CAP_ELEMENTS + 1)) * 5); | ||
418 | 36 | const unsigned int CAP_NIMGIDX = (CAP_ELEMENTS * CAP_ELEMENTS * 4); | ||
419 | 37 | |||
420 | 38 | const float RAD2I1024 = 162.9746617f; | ||
421 | 39 | |||
422 | 30 | /* | 40 | /* |
423 | 31 | * Initiate a CubeCap | 41 | * Initiate a CubeCap |
424 | 32 | */ | 42 | */ |
425 | 33 | 43 | ||
426 | === modified file 'plugins/cubeaddon/src/cubeaddon.h' | |||
427 | --- plugins/cubeaddon/src/cubeaddon.h 2010-09-30 11:47:10 +0000 | |||
428 | +++ plugins/cubeaddon/src/cubeaddon.h 2012-09-08 00:13:22 +0000 | |||
429 | @@ -39,15 +39,15 @@ | |||
430 | 39 | 39 | ||
431 | 40 | #include "cubeaddon_options.h" | 40 | #include "cubeaddon_options.h" |
432 | 41 | 41 | ||
442 | 42 | #define CUBEADDON_GRID_SIZE 100 | 42 | extern const unsigned short CUBEADDON_GRID_SIZE; |
443 | 43 | #define CAP_ELEMENTS 15 | 43 | extern const unsigned short CAP_ELEMENTS; |
444 | 44 | #define CAP_NVERTEX (((CAP_ELEMENTS * (CAP_ELEMENTS + 1)) + 2) * 3) | 44 | extern const unsigned int CAP_NVERTEX; |
445 | 45 | #define CAP_NIDX (CAP_ELEMENTS * (CAP_ELEMENTS - 1) * 4) | 45 | extern const unsigned int CAP_NIDX; |
446 | 46 | 46 | ||
447 | 47 | #define CAP_NIMGVERTEX (((CAP_ELEMENTS + 1) * (CAP_ELEMENTS + 1)) * 5) | 47 | extern const unsigned int CAP_NIMGVERTEX; |
448 | 48 | #define CAP_NIMGIDX (CAP_ELEMENTS * CAP_ELEMENTS * 4) | 48 | extern const unsigned int CAP_NIMGIDX; |
449 | 49 | 49 | ||
450 | 50 | #define RAD2I1024 162.9746617 | 50 | extern const float RAD2I1024 = 162.9746617f; |
451 | 51 | 51 | ||
452 | 52 | class CubeaddonScreen : | 52 | class CubeaddonScreen : |
453 | 53 | public CompositeScreenInterface, | 53 | public CompositeScreenInterface, |
454 | 54 | 54 | ||
455 | === modified file 'plugins/dbus/src/dbus.h' | |||
456 | --- plugins/dbus/src/dbus.h 2012-06-24 09:00:27 +0000 | |||
457 | +++ plugins/dbus/src/dbus.h 2012-09-08 00:13:22 +0000 | |||
458 | @@ -53,10 +53,10 @@ | |||
459 | 53 | #define COMPIZ_DBUS_CHANGED_SIGNAL_NAME "changed" | 53 | #define COMPIZ_DBUS_CHANGED_SIGNAL_NAME "changed" |
460 | 54 | #define COMPIZ_DBUS_PLUGINS_CHANGED_SIGNAL_NAME "pluginsChanged" | 54 | #define COMPIZ_DBUS_PLUGINS_CHANGED_SIGNAL_NAME "pluginsChanged" |
461 | 55 | 55 | ||
466 | 56 | #define DBUS_FILE_WATCH_CURRENT 0 | 56 | #define DBUS_FILE_WATCH_CURRENT 0 |
467 | 57 | #define DBUS_FILE_WATCH_PLUGIN 1 | 57 | #define DBUS_FILE_WATCH_PLUGIN 1 |
468 | 58 | #define DBUS_FILE_WATCH_HOME 2 | 58 | #define DBUS_FILE_WATCH_HOME 2 |
469 | 59 | #define DBUS_FILE_WATCH_NUM 3 | 59 | #define DBUS_FILE_WATCH_NUM 3 |
470 | 60 | 60 | ||
471 | 61 | class DbusScreen : | 61 | class DbusScreen : |
472 | 62 | public PluginClassHandler <DbusScreen, CompScreen>, | 62 | public PluginClassHandler <DbusScreen, CompScreen>, |
473 | 63 | 63 | ||
474 | === modified file 'plugins/decor/src/decor.h' | |||
475 | --- plugins/decor/src/decor.h 2012-07-30 07:10:52 +0000 | |||
476 | +++ plugins/decor/src/decor.h 2012-09-08 00:13:22 +0000 | |||
477 | @@ -50,9 +50,9 @@ | |||
478 | 50 | }; | 50 | }; |
479 | 51 | 51 | ||
480 | 52 | /* FIXME: Remove */ | 52 | /* FIXME: Remove */ |
484 | 53 | #define DECOR_BARE 0 | 53 | #define DECOR_BARE 0 |
485 | 54 | #define DECOR_ACTIVE 1 | 54 | #define DECOR_ACTIVE 1 |
486 | 55 | #define DECOR_NUM 2 | 55 | #define DECOR_NUM 2 |
487 | 56 | 56 | ||
488 | 57 | using namespace compiz::decor; | 57 | using namespace compiz::decor; |
489 | 58 | 58 | ||
490 | 59 | 59 | ||
491 | === modified file 'plugins/expo/src/expo.cpp' | |||
492 | --- plugins/expo/src/expo.cpp 2012-08-22 01:21:08 +0000 | |||
493 | +++ plugins/expo/src/expo.cpp 2012-09-08 00:13:22 +0000 | |||
494 | @@ -1290,7 +1290,7 @@ | |||
495 | 1290 | return gWindow->glDraw (transform, eAttrib, region, mask); | 1290 | return gWindow->glDraw (transform, eAttrib, region, mask); |
496 | 1291 | } | 1291 | } |
497 | 1292 | 1292 | ||
499 | 1293 | #define EXPO_GRID_SIZE 100 | 1293 | static const unsigned short EXPO_GRID_SIZE = 100; |
500 | 1294 | 1294 | ||
501 | 1295 | void | 1295 | void |
502 | 1296 | ExpoWindow::glAddGeometry (const GLTexture::MatrixList& matrices, | 1296 | ExpoWindow::glAddGeometry (const GLTexture::MatrixList& matrices, |
503 | 1297 | 1297 | ||
504 | === modified file 'plugins/firepaint/src/firepaint.cpp' | |||
505 | --- plugins/firepaint/src/firepaint.cpp 2012-09-04 15:33:44 +0000 | |||
506 | +++ plugins/firepaint/src/firepaint.cpp 2012-09-08 00:13:22 +0000 | |||
507 | @@ -23,6 +23,8 @@ | |||
508 | 23 | 23 | ||
509 | 24 | COMPIZ_PLUGIN_20090315 (firepaint, FirePluginVTable); | 24 | COMPIZ_PLUGIN_20090315 (firepaint, FirePluginVTable); |
510 | 25 | 25 | ||
511 | 26 | const unsigned int NUM_ADD_POINTS = 1000; | ||
512 | 27 | |||
513 | 26 | Particle::Particle () : | 28 | Particle::Particle () : |
514 | 27 | life (0), | 29 | life (0), |
515 | 28 | fade (0), | 30 | fade (0), |
516 | 29 | 31 | ||
517 | === modified file 'plugins/firepaint/src/firepaint.h' | |||
518 | --- plugins/firepaint/src/firepaint.h 2012-09-04 15:33:44 +0000 | |||
519 | +++ plugins/firepaint/src/firepaint.h 2012-09-08 00:13:22 +0000 | |||
520 | @@ -107,7 +107,7 @@ | |||
521 | 107 | finiParticles (); | 107 | finiParticles (); |
522 | 108 | }; | 108 | }; |
523 | 109 | 109 | ||
525 | 110 | #define NUM_ADD_POINTS 1000 | 110 | extern const unsigned int NUM_ADD_POINTS; |
526 | 111 | 111 | ||
527 | 112 | class FireScreen: | 112 | class FireScreen: |
528 | 113 | public PluginClassHandler <FireScreen, CompScreen>, | 113 | public PluginClassHandler <FireScreen, CompScreen>, |
529 | 114 | 114 | ||
530 | === modified file 'plugins/grid/src/grid.h' | |||
531 | --- plugins/grid/src/grid.h 2012-05-27 04:32:55 +0000 | |||
532 | +++ plugins/grid/src/grid.h 2012-09-08 00:13:22 +0000 | |||
533 | @@ -30,7 +30,7 @@ | |||
534 | 30 | 30 | ||
535 | 31 | #include "grid_options.h" | 31 | #include "grid_options.h" |
536 | 32 | 32 | ||
538 | 33 | #define SNAPOFF_THRESHOLD 50 | 33 | static const unsigned short SNAPOFF_THRESHOLD = 50; |
539 | 34 | 34 | ||
540 | 35 | namespace GridWindowType | 35 | namespace GridWindowType |
541 | 36 | { | 36 | { |
542 | 37 | 37 | ||
543 | === modified file 'plugins/group/src/glow.cpp' | |||
544 | --- plugins/group/src/glow.cpp 2011-03-14 15:58:39 +0000 | |||
545 | +++ plugins/group/src/glow.cpp 2012-09-08 00:13:22 +0000 | |||
546 | @@ -27,6 +27,16 @@ | |||
547 | 27 | #include "group.h" | 27 | #include "group.h" |
548 | 28 | #include "group_glow.h" | 28 | #include "group_glow.h" |
549 | 29 | 29 | ||
550 | 30 | const unsigned short GLOWQUAD_TOPLEFT = 0; | ||
551 | 31 | const unsigned short GLOWQUAD_TOPRIGHT = 1; | ||
552 | 32 | const unsigned short GLOWQUAD_BOTTOMLEFT = 2; | ||
553 | 33 | const unsigned short GLOWQUAD_BOTTOMRIGHT = 3; | ||
554 | 34 | const unsigned short GLOWQUAD_TOP = 4; | ||
555 | 35 | const unsigned short GLOWQUAD_BOTTOM = 5; | ||
556 | 36 | const unsigned short GLOWQUAD_LEFT = 6; | ||
557 | 37 | const unsigned short GLOWQUAD_RIGHT = 7; | ||
558 | 38 | const unsigned short NUM_GLOWQUADS = 8; | ||
559 | 39 | |||
560 | 30 | const GlowTextureProperties glowTextureProperties[2] = { | 40 | const GlowTextureProperties glowTextureProperties[2] = { |
561 | 31 | /* GlowTextureRectangular */ | 41 | /* GlowTextureRectangular */ |
562 | 32 | {glowTexRect, 32, 21}, | 42 | {glowTexRect, 32, 21}, |
563 | 33 | 43 | ||
564 | === modified file 'plugins/group/src/glow.h' | |||
565 | --- plugins/group/src/glow.h 2010-10-15 03:57:18 +0000 | |||
566 | +++ plugins/group/src/glow.h 2012-09-08 00:13:22 +0000 | |||
567 | @@ -29,15 +29,15 @@ | |||
568 | 29 | 29 | ||
569 | 30 | #include "group.h" | 30 | #include "group.h" |
570 | 31 | 31 | ||
580 | 32 | #define GLOWQUAD_TOPLEFT 0 | 32 | extern const unsigned short GLOWQUAD_TOPLEFT; |
581 | 33 | #define GLOWQUAD_TOPRIGHT 1 | 33 | extern const unsigned short GLOWQUAD_TOPRIGHT; |
582 | 34 | #define GLOWQUAD_BOTTOMLEFT 2 | 34 | extern const unsigned short GLOWQUAD_BOTTOMLEFT; |
583 | 35 | #define GLOWQUAD_BOTTOMRIGHT 3 | 35 | extern const unsigned short GLOWQUAD_BOTTOMRIGHT; |
584 | 36 | #define GLOWQUAD_TOP 4 | 36 | extern const unsigned short GLOWQUAD_TOP; |
585 | 37 | #define GLOWQUAD_BOTTOM 5 | 37 | extern const unsigned short GLOWQUAD_BOTTOM; |
586 | 38 | #define GLOWQUAD_LEFT 6 | 38 | extern const unsigned short GLOWQUAD_LEFT; |
587 | 39 | #define GLOWQUAD_RIGHT 7 | 39 | extern const unsigned short GLOWQUAD_RIGHT; |
588 | 40 | #define NUM_GLOWQUADS 8 | 40 | extern const unsigned short NUM_GLOWQUADS; |
589 | 41 | 41 | ||
590 | 42 | /* Represents a particular glow texture, so here | 42 | /* Represents a particular glow texture, so here |
591 | 43 | * we have hardcoded in the texture data, the offset | 43 | * we have hardcoded in the texture data, the offset |
592 | 44 | 44 | ||
593 | === modified file 'plugins/group/src/group.cpp' | |||
594 | --- plugins/group/src/group.cpp 2012-07-30 09:53:16 +0000 | |||
595 | +++ plugins/group/src/group.cpp 2012-09-08 00:13:22 +0000 | |||
596 | @@ -26,6 +26,8 @@ | |||
597 | 26 | 26 | ||
598 | 27 | #include "group.h" | 27 | #include "group.h" |
599 | 28 | 28 | ||
600 | 29 | const double PI = 3.14159265359f; | ||
601 | 30 | |||
602 | 29 | /* | 31 | /* |
603 | 30 | * GroupExp class | 32 | * GroupExp class |
604 | 31 | * | 33 | * |
605 | @@ -1559,7 +1561,7 @@ | |||
606 | 1559 | */ | 1561 | */ |
607 | 1560 | 1562 | ||
608 | 1561 | /* the radius to determine if it was a click or a drag */ | 1563 | /* the radius to determine if it was a click or a drag */ |
610 | 1562 | #define RADIUS 5 | 1564 | static const unsigned short RADIUS = 5; |
611 | 1563 | 1565 | ||
612 | 1564 | void | 1566 | void |
613 | 1565 | GroupScreen::handleMotionEvent (int xRoot, int yRoot) | 1567 | GroupScreen::handleMotionEvent (int xRoot, int yRoot) |
614 | 1566 | 1568 | ||
615 | === modified file 'plugins/group/src/group.h' | |||
616 | --- plugins/group/src/group.h 2012-09-04 15:33:44 +0000 | |||
617 | +++ plugins/group/src/group.h 2012-09-08 00:13:22 +0000 | |||
618 | @@ -85,7 +85,7 @@ | |||
619 | 85 | * Constants | 85 | * Constants |
620 | 86 | * | 86 | * |
621 | 87 | */ | 87 | */ |
623 | 88 | #define PI 3.1415926535897 | 88 | extern const double PI; |
624 | 89 | 89 | ||
625 | 90 | /* | 90 | /* |
626 | 91 | * Helpers | 91 | * Helpers |
627 | 92 | 92 | ||
628 | === modified file 'plugins/group/src/tab.cpp' | |||
629 | --- plugins/group/src/tab.cpp 2012-07-30 12:58:44 +0000 | |||
630 | +++ plugins/group/src/tab.cpp 2012-09-08 00:13:22 +0000 | |||
631 | @@ -2187,7 +2187,7 @@ | |||
632 | 2187 | properly - however the best way would be if slot->mRegion was | 2187 | properly - however the best way would be if slot->mRegion was |
633 | 2188 | sized including the border */ | 2188 | sized including the border */ |
634 | 2189 | 2189 | ||
636 | 2190 | #define DAMAGE_BUFFER 20 | 2190 | static const unsigned short DAMAGE_BUFFER = 20; |
637 | 2191 | 2191 | ||
638 | 2192 | /* If there is a front slot in this bar, then we need to damage | 2192 | /* If there is a front slot in this bar, then we need to damage |
639 | 2193 | * areas just outside where the slot might be sitting */ | 2193 | * areas just outside where the slot might be sitting */ |
640 | 2194 | 2194 | ||
641 | === modified file 'plugins/imgpng/src/imgpng.cpp' | |||
642 | --- plugins/imgpng/src/imgpng.cpp 2012-01-18 16:26:45 +0000 | |||
643 | +++ plugins/imgpng/src/imgpng.cpp 2012-09-08 00:13:22 +0000 | |||
644 | @@ -36,6 +36,8 @@ | |||
645 | 36 | 36 | ||
646 | 37 | COMPIZ_PLUGIN_20090315 (imgpng, PngPluginVTable) | 37 | COMPIZ_PLUGIN_20090315 (imgpng, PngPluginVTable) |
647 | 38 | 38 | ||
648 | 39 | const unsigned short PNG_SIG_SIZE = 8; | ||
649 | 40 | |||
650 | 39 | PngScreen::PngScreen (CompScreen *screen) : | 41 | PngScreen::PngScreen (CompScreen *screen) : |
651 | 40 | PluginClassHandler<PngScreen, CompScreen> (screen) | 42 | PluginClassHandler<PngScreen, CompScreen> (screen) |
652 | 41 | { | 43 | { |
653 | 42 | 44 | ||
654 | === modified file 'plugins/imgpng/src/imgpng.h' | |||
655 | --- plugins/imgpng/src/imgpng.h 2012-01-18 16:26:45 +0000 | |||
656 | +++ plugins/imgpng/src/imgpng.h 2012-09-08 00:13:22 +0000 | |||
657 | @@ -34,7 +34,7 @@ | |||
658 | 34 | 34 | ||
659 | 35 | #include <iosfwd> | 35 | #include <iosfwd> |
660 | 36 | 36 | ||
662 | 37 | #define PNG_SIG_SIZE 8 | 37 | extern const unsigned short PNG_SIG_SIZE; |
663 | 38 | 38 | ||
664 | 39 | class PngScreen : | 39 | class PngScreen : |
665 | 40 | public ScreenInterface, | 40 | public ScreenInterface, |
666 | 41 | 41 | ||
667 | === modified file 'plugins/maximumize/src/maximumize.cpp' | |||
668 | --- plugins/maximumize/src/maximumize.cpp 2011-03-14 16:04:58 +0000 | |||
669 | +++ plugins/maximumize/src/maximumize.cpp 2012-09-08 00:13:22 +0000 | |||
670 | @@ -31,6 +31,10 @@ | |||
671 | 31 | 31 | ||
672 | 32 | COMPIZ_PLUGIN_20090315 (maximumize, MaximumizePluginVTable); | 32 | COMPIZ_PLUGIN_20090315 (maximumize, MaximumizePluginVTable); |
673 | 33 | 33 | ||
674 | 34 | /* Convenience constants to make the code more readable (hopefully) */ | ||
675 | 35 | const short REDUCE = -1; | ||
676 | 36 | const unsigned short INCREASE = 1; | ||
677 | 37 | |||
678 | 34 | /* Returns true if rectangles a and b intersect by at least 40 in both | 38 | /* Returns true if rectangles a and b intersect by at least 40 in both |
679 | 35 | * directions | 39 | * directions |
680 | 36 | */ | 40 | */ |
681 | 37 | 41 | ||
682 | === modified file 'plugins/maximumize/src/maximumize.h' | |||
683 | --- plugins/maximumize/src/maximumize.h 2009-03-20 07:58:25 +0000 | |||
684 | +++ plugins/maximumize/src/maximumize.h 2012-09-08 00:13:22 +0000 | |||
685 | @@ -31,9 +31,9 @@ | |||
686 | 31 | 31 | ||
687 | 32 | #include "maximumize_options.h" | 32 | #include "maximumize_options.h" |
688 | 33 | 33 | ||
692 | 34 | /* Convenience macros to make the code more readable (hopefully) */ | 34 | /* Convenience constants to make the code more readable (hopefully) */ |
693 | 35 | #define REDUCE -1 | 35 | extern const short REDUCE; |
694 | 36 | #define INCREASE 1 | 36 | extern const unsigned short INCREASE; |
695 | 37 | 37 | ||
696 | 38 | typedef struct | 38 | typedef struct |
697 | 39 | { | 39 | { |
698 | 40 | 40 | ||
699 | === modified file 'plugins/mousepoll/src/mousepoll.cpp' | |||
700 | --- plugins/mousepoll/src/mousepoll.cpp 2012-07-30 09:53:16 +0000 | |||
701 | +++ plugins/mousepoll/src/mousepoll.cpp 2012-09-08 00:13:22 +0000 | |||
702 | @@ -24,6 +24,9 @@ | |||
703 | 24 | 24 | ||
704 | 25 | COMPIZ_PLUGIN_20090315 (mousepoll, MousepollPluginVTable); | 25 | COMPIZ_PLUGIN_20090315 (mousepoll, MousepollPluginVTable); |
705 | 26 | 26 | ||
706 | 27 | const unsigned short MP_OPTION_MOUSE_POLL_INTERVAL = 0; | ||
707 | 28 | const unsigned short MP_OPTION_NUM = 1; | ||
708 | 29 | |||
709 | 27 | bool | 30 | bool |
710 | 28 | MousepollScreen::getMousePosition () | 31 | MousepollScreen::getMousePosition () |
711 | 29 | { | 32 | { |
712 | 30 | 33 | ||
713 | === modified file 'plugins/mousepoll/src/private.h' | |||
714 | --- plugins/mousepoll/src/private.h 2009-03-16 05:20:59 +0000 | |||
715 | +++ plugins/mousepoll/src/private.h 2012-09-08 00:13:22 +0000 | |||
716 | @@ -34,8 +34,8 @@ | |||
717 | 34 | MP_DISPLAY_OPTION_NUM | 34 | MP_DISPLAY_OPTION_NUM |
718 | 35 | } MousepollDisplayOptions; | 35 | } MousepollDisplayOptions; |
719 | 36 | 36 | ||
722 | 37 | #define MP_OPTION_MOUSE_POLL_INTERVAL 0 | 37 | extern const unsigned short MP_OPTION_MOUSE_POLL_INTERVAL; |
723 | 38 | #define MP_OPTION_NUM 1 | 38 | extern const unsigned short MP_OPTION_NUM; |
724 | 39 | 39 | ||
725 | 40 | class MousepollScreen : | 40 | class MousepollScreen : |
726 | 41 | public PluginClassHandler <MousepollScreen, CompScreen, COMPIZ_MOUSEPOLL_ABI>, | 41 | public PluginClassHandler <MousepollScreen, CompScreen, COMPIZ_MOUSEPOLL_ABI>, |
727 | 42 | 42 | ||
728 | === modified file 'plugins/move/src/move.cpp' | |||
729 | --- plugins/move/src/move.cpp 2012-04-19 12:06:05 +0000 | |||
730 | +++ plugins/move/src/move.cpp 2012-09-08 00:13:22 +0000 | |||
731 | @@ -34,6 +34,11 @@ | |||
732 | 34 | 34 | ||
733 | 35 | COMPIZ_PLUGIN_20090315 (move, MovePluginVTable) | 35 | COMPIZ_PLUGIN_20090315 (move, MovePluginVTable) |
734 | 36 | 36 | ||
735 | 37 | const unsigned short KEY_MOVE_INC = 24; | ||
736 | 38 | |||
737 | 39 | const unsigned short SNAP_BACK = 20; | ||
738 | 40 | const unsigned short SNAP_OFF = 100; | ||
739 | 41 | |||
740 | 37 | static bool | 42 | static bool |
741 | 38 | moveInitiate (CompAction *action, | 43 | moveInitiate (CompAction *action, |
742 | 39 | CompAction::State state, | 44 | CompAction::State state, |
743 | 40 | 45 | ||
744 | === modified file 'plugins/move/src/move.h' | |||
745 | --- plugins/move/src/move.h 2012-02-01 17:49:07 +0000 | |||
746 | +++ plugins/move/src/move.h 2012-09-08 00:13:22 +0000 | |||
747 | @@ -34,10 +34,10 @@ | |||
748 | 34 | 34 | ||
749 | 35 | #define NUM_KEYS (sizeof (mKeys) / sizeof (mKeys[0])) | 35 | #define NUM_KEYS (sizeof (mKeys) / sizeof (mKeys[0])) |
750 | 36 | 36 | ||
752 | 37 | #define KEY_MOVE_INC 24 | 37 | extern const unsigned short KEY_MOVE_INC; |
753 | 38 | 38 | ||
756 | 39 | #define SNAP_BACK 20 | 39 | extern const unsigned short SNAP_BACK; |
757 | 40 | #define SNAP_OFF 100 | 40 | extern const unsigned short SNAP_OFF; |
758 | 41 | 41 | ||
759 | 42 | struct _MoveKeys { | 42 | struct _MoveKeys { |
760 | 43 | const char *name; | 43 | const char *name; |
761 | 44 | 44 | ||
762 | === modified file 'plugins/notification/src/notification.cpp' | |||
763 | --- plugins/notification/src/notification.cpp 2012-05-18 06:52:20 +0000 | |||
764 | +++ plugins/notification/src/notification.cpp 2012-09-08 00:13:22 +0000 | |||
765 | @@ -26,6 +26,8 @@ | |||
766 | 26 | 26 | ||
767 | 27 | COMPIZ_PLUGIN_20090315 (notification, NotificationPluginVTable); | 27 | COMPIZ_PLUGIN_20090315 (notification, NotificationPluginVTable); |
768 | 28 | 28 | ||
769 | 29 | const std::string IMAGE_DIR(".compiz/images"); | ||
770 | 30 | |||
771 | 29 | /* libnotify 0.7 introduced proper NOTIFY_CHECK_VERSION macro */ | 31 | /* libnotify 0.7 introduced proper NOTIFY_CHECK_VERSION macro */ |
772 | 30 | #if defined(NOTIFY_CHECK_VERSION) && !defined(HAVE_LIBNOTIFY_0_6_1) | 32 | #if defined(NOTIFY_CHECK_VERSION) && !defined(HAVE_LIBNOTIFY_0_6_1) |
773 | 31 | #if NOTIFY_CHECK_VERSION(0,6,1) | 33 | #if NOTIFY_CHECK_VERSION(0,6,1) |
774 | @@ -58,7 +60,7 @@ | |||
775 | 58 | in $PREFIX/share/compiz, not in the home dir */ | 60 | in $PREFIX/share/compiz, not in the home dir */ |
776 | 59 | iconUri = "file://"; | 61 | iconUri = "file://"; |
777 | 60 | iconUri += homeDir; | 62 | iconUri += homeDir; |
779 | 61 | iconUri += "/" IMAGE_DIR "/compiz.png"; | 63 | iconUri += "/" + IMAGE_DIR + "/compiz.png"; |
780 | 62 | logLevel = (char *) logLevelToString (level); | 64 | logLevel = (char *) logLevelToString (level); |
781 | 63 | 65 | ||
782 | 64 | n = notify_notification_new (logLevel, message, | 66 | n = notify_notification_new (logLevel, message, |
783 | 65 | 67 | ||
784 | === modified file 'plugins/notification/src/notification.h' | |||
785 | --- plugins/notification/src/notification.h 2009-03-16 01:57:00 +0000 | |||
786 | +++ plugins/notification/src/notification.h 2012-09-08 00:13:22 +0000 | |||
787 | @@ -29,7 +29,7 @@ | |||
788 | 29 | 29 | ||
789 | 30 | #include "notification_options.h" | 30 | #include "notification_options.h" |
790 | 31 | 31 | ||
792 | 32 | #define IMAGE_DIR ".compiz/images" | 32 | extern const std::string IMAGE_DIR; |
793 | 33 | 33 | ||
794 | 34 | class NotificationScreen : | 34 | class NotificationScreen : |
795 | 35 | public PluginClassHandler <NotificationScreen, CompScreen>, | 35 | public PluginClassHandler <NotificationScreen, CompScreen>, |
796 | 36 | 36 | ||
797 | === modified file 'plugins/obs/src/obs.cpp' | |||
798 | --- plugins/obs/src/obs.cpp 2012-09-04 15:33:44 +0000 | |||
799 | +++ plugins/obs/src/obs.cpp 2012-09-08 00:13:22 +0000 | |||
800 | @@ -27,6 +27,10 @@ | |||
801 | 27 | 27 | ||
802 | 28 | COMPIZ_PLUGIN_20090315 (obs, ObsPluginVTable); | 28 | COMPIZ_PLUGIN_20090315 (obs, ObsPluginVTable); |
803 | 29 | 29 | ||
804 | 30 | const unsigned short MODIFIER_OPACITY = 0; | ||
805 | 31 | const unsigned short MODIFIER_SATURATION = 1; | ||
806 | 32 | const unsigned short MODIFIER_BRIGHTNESS = 2; | ||
807 | 33 | |||
808 | 30 | void | 34 | void |
809 | 31 | ObsWindow::changePaintModifier (unsigned int modifier, | 35 | ObsWindow::changePaintModifier (unsigned int modifier, |
810 | 32 | int direction) | 36 | int direction) |
811 | 33 | 37 | ||
812 | === modified file 'plugins/obs/src/obs.h' | |||
813 | --- plugins/obs/src/obs.h 2012-09-04 15:33:44 +0000 | |||
814 | +++ plugins/obs/src/obs.h 2012-09-08 00:13:22 +0000 | |||
815 | @@ -31,10 +31,10 @@ | |||
816 | 31 | 31 | ||
817 | 32 | #include "obs_options.h" | 32 | #include "obs_options.h" |
818 | 33 | 33 | ||
823 | 34 | #define MODIFIER_OPACITY 0 | 34 | extern const unsigned short MODIFIER_OPACITY; |
824 | 35 | #define MODIFIER_SATURATION 1 | 35 | extern const unsigned short MODIFIER_SATURATION; |
825 | 36 | #define MODIFIER_BRIGHTNESS 2 | 36 | extern const unsigned short MODIFIER_BRIGHTNESS; |
826 | 37 | #define MODIFIER_COUNT 3 | 37 | #define MODIFIER_COUNT 3 |
827 | 38 | 38 | ||
828 | 39 | class ObsScreen : | 39 | class ObsScreen : |
829 | 40 | public ScreenInterface, | 40 | public ScreenInterface, |
830 | 41 | 41 | ||
831 | === modified file 'plugins/opacify/src/opacify.cpp' | |||
832 | --- plugins/opacify/src/opacify.cpp 2012-09-04 15:33:44 +0000 | |||
833 | +++ plugins/opacify/src/opacify.cpp 2012-09-08 00:13:22 +0000 | |||
834 | @@ -28,6 +28,8 @@ | |||
835 | 28 | 28 | ||
836 | 29 | COMPIZ_PLUGIN_20090315 (opacify, OpacifyPluginVTable); | 29 | COMPIZ_PLUGIN_20090315 (opacify, OpacifyPluginVTable); |
837 | 30 | 30 | ||
838 | 31 | const unsigned short MAX_WINDOWS = 64; | ||
839 | 32 | |||
840 | 31 | void | 33 | void |
841 | 32 | setFunctions (bool enabled) | 34 | setFunctions (bool enabled) |
842 | 33 | { | 35 | { |
843 | 34 | 36 | ||
844 | === modified file 'plugins/opacify/src/opacify.h' | |||
845 | --- plugins/opacify/src/opacify.h 2012-09-04 15:33:44 +0000 | |||
846 | +++ plugins/opacify/src/opacify.h 2012-09-08 00:13:22 +0000 | |||
847 | @@ -31,7 +31,7 @@ | |||
848 | 31 | #include "opacify_options.h" | 31 | #include "opacify_options.h" |
849 | 32 | 32 | ||
850 | 33 | /* Size of the Window array storing passive windows. */ | 33 | /* Size of the Window array storing passive windows. */ |
852 | 34 | #define MAX_WINDOWS 64 | 34 | extern const unsigned short MAX_WINDOWS; |
853 | 35 | 35 | ||
854 | 36 | class OpacifyScreen : | 36 | class OpacifyScreen : |
855 | 37 | public PluginClassHandler <OpacifyScreen, CompScreen>, | 37 | public PluginClassHandler <OpacifyScreen, CompScreen>, |
856 | 38 | 38 | ||
857 | === modified file 'plugins/opengl/include/opengl/opengl.h' | |||
858 | --- plugins/opengl/include/opengl/opengl.h 2012-08-14 08:42:15 +0000 | |||
859 | +++ plugins/opengl/include/opengl/opengl.h 2012-09-08 00:13:22 +0000 | |||
860 | @@ -78,11 +78,11 @@ | |||
861 | 78 | /** | 78 | /** |
862 | 79 | * camera distance from screen, 0.5 * tan (FOV) | 79 | * camera distance from screen, 0.5 * tan (FOV) |
863 | 80 | */ | 80 | */ |
865 | 81 | #define DEFAULT_Z_CAMERA 0.866025404f | 81 | extern const float DEFAULT_Z_CAMERA; |
866 | 82 | 82 | ||
870 | 83 | #define RED_SATURATION_WEIGHT 0.30f | 83 | extern const float RED_SATURATION_WEIGHT; |
871 | 84 | #define GREEN_SATURATION_WEIGHT 0.59f | 84 | extern const float GREEN_SATURATION_WEIGHT; |
872 | 85 | #define BLUE_SATURATION_WEIGHT 0.11f | 85 | extern const float BLUE_SATURATION_WEIGHT; |
873 | 86 | 86 | ||
874 | 87 | class PrivateGLScreen; | 87 | class PrivateGLScreen; |
875 | 88 | class PrivateGLWindow; | 88 | class PrivateGLWindow; |
876 | @@ -571,9 +571,9 @@ | |||
877 | 571 | }; | 571 | }; |
878 | 572 | #endif | 572 | #endif |
879 | 573 | 573 | ||
883 | 574 | #define NOTHING_TRANS_FILTER 0 | 574 | extern const unsigned short NOTHING_TRANS_FILTER; |
884 | 575 | #define SCREEN_TRANS_FILTER 1 | 575 | extern const unsigned short SCREEN_TRANS_FILTER; |
885 | 576 | #define WINDOW_TRANS_FILTER 2 | 576 | extern const unsigned short WINDOW_TRANS_FILTER; |
886 | 577 | 577 | ||
887 | 578 | 578 | ||
888 | 579 | extern GLScreenPaintAttrib defaultScreenPaintAttrib; | 579 | extern GLScreenPaintAttrib defaultScreenPaintAttrib; |
889 | 580 | 580 | ||
890 | === modified file 'plugins/opengl/src/opengl.cpp' | |||
891 | --- plugins/opengl/src/opengl.cpp 2012-01-18 16:26:45 +0000 | |||
892 | +++ plugins/opengl/src/opengl.cpp 2012-09-08 00:13:22 +0000 | |||
893 | @@ -28,6 +28,16 @@ | |||
894 | 28 | #include <core/pluginclasshandler.h> | 28 | #include <core/pluginclasshandler.h> |
895 | 29 | #include "privates.h" | 29 | #include "privates.h" |
896 | 30 | 30 | ||
897 | 31 | const float DEFAULT_Z_CAMERA = 0.866025404f; | ||
898 | 32 | |||
899 | 33 | const float RED_SATURATION_WEIGHT = 0.30f; | ||
900 | 34 | const float GREEN_SATURATION_WEIGHT = 0.59f; | ||
901 | 35 | const float BLUE_SATURATION_WEIGHT = 0.11f; | ||
902 | 36 | |||
903 | 37 | const unsigned short NOTHING_TRANS_FILTER = 0; | ||
904 | 38 | const unsigned short SCREEN_TRANS_FILTER = 1; | ||
905 | 39 | const unsigned short WINDOW_TRANS_FILTER = 2; | ||
906 | 40 | |||
907 | 31 | CompOption::Vector & | 41 | CompOption::Vector & |
908 | 32 | GLScreen::getOptions () | 42 | GLScreen::getOptions () |
909 | 33 | { | 43 | { |
910 | 34 | 44 | ||
911 | === modified file 'plugins/place/src/place.cpp' | |||
912 | --- plugins/place/src/place.cpp 2012-09-05 23:54:21 +0000 | |||
913 | +++ plugins/place/src/place.cpp 2012-09-08 00:13:22 +0000 | |||
914 | @@ -943,7 +943,7 @@ | |||
915 | 943 | /* arbitrary-ish threshold, honors user attempts to | 943 | /* arbitrary-ish threshold, honors user attempts to |
916 | 944 | * manually cascade. | 944 | * manually cascade. |
917 | 945 | */ | 945 | */ |
919 | 946 | #define CASCADE_FUZZ 15 | 946 | static const unsigned short CASCADE_FUZZ = 15; |
920 | 947 | 947 | ||
921 | 948 | xThreshold = MAX (this->extents ().left, CASCADE_FUZZ); | 948 | xThreshold = MAX (this->extents ().left, CASCADE_FUZZ); |
922 | 949 | yThreshold = MAX (this->extents ().top, CASCADE_FUZZ); | 949 | yThreshold = MAX (this->extents ().top, CASCADE_FUZZ); |
923 | @@ -988,7 +988,7 @@ | |||
924 | 988 | cascadeX = MAX (0, workArea.x ()); | 988 | cascadeX = MAX (0, workArea.x ()); |
925 | 989 | cascadeY = MAX (0, workArea.y ()); | 989 | cascadeY = MAX (0, workArea.y ()); |
926 | 990 | 990 | ||
928 | 991 | #define CASCADE_INTERVAL 50 /* space between top-left corners of cascades */ | 991 | static const unsigned short CASCADE_INTERVAL = 50; /* space between top-left corners of cascades */ |
929 | 992 | 992 | ||
930 | 993 | cascadeStage += 1; | 993 | cascadeStage += 1; |
931 | 994 | cascadeX += CASCADE_INTERVAL * cascadeStage; | 994 | cascadeX += CASCADE_INTERVAL * cascadeStage; |
932 | 995 | 995 | ||
933 | === modified file 'plugins/place/src/smart/src/smart.cpp' | |||
934 | --- plugins/place/src/smart/src/smart.cpp 2012-02-02 17:01:15 +0000 | |||
935 | +++ plugins/place/src/smart/src/smart.cpp 2012-09-08 00:13:22 +0000 | |||
936 | @@ -6,9 +6,9 @@ | |||
937 | 6 | #endif | 6 | #endif |
938 | 7 | 7 | ||
939 | 8 | /* overlap types */ | 8 | /* overlap types */ |
943 | 9 | #define NONE 0 | 9 | static const unsigned short NONE = 0; |
944 | 10 | #define H_WRONG -1 | 10 | static const short H_WRONG = -1; |
945 | 11 | #define W_WRONG -2 | 11 | static const short W_WRONG = -2; |
946 | 12 | 12 | ||
947 | 13 | namespace compiz | 13 | namespace compiz |
948 | 14 | { | 14 | { |
949 | 15 | 15 | ||
950 | === modified file 'plugins/put/src/put.cpp' | |||
951 | --- plugins/put/src/put.cpp 2011-03-14 15:53:05 +0000 | |||
952 | +++ plugins/put/src/put.cpp 2012-09-08 00:13:22 +0000 | |||
953 | @@ -106,10 +106,10 @@ | |||
954 | 106 | * PS: Decorations are icky. | 106 | * PS: Decorations are icky. |
955 | 107 | */ | 107 | */ |
956 | 108 | 108 | ||
961 | 109 | #define LEFT 0 | 109 | static const unsigned short LEFT = 0; |
962 | 110 | #define RIGHT 1 | 110 | static const unsigned short RIGHT = 1; |
963 | 111 | #define TOP 2 | 111 | static const unsigned short TOP = 2; |
964 | 112 | #define BOTTOM 3 | 112 | static const unsigned short BOTTOM = 3; |
965 | 113 | 113 | ||
966 | 114 | inline void | 114 | inline void |
967 | 115 | addToCorner (CompRect& rect, | 115 | addToCorner (CompRect& rect, |
968 | 116 | 116 | ||
969 | === modified file 'plugins/resize/src/logic/include/resize-defs.h' | |||
970 | --- plugins/resize/src/logic/include/resize-defs.h 2012-08-15 21:36:40 +0000 | |||
971 | +++ plugins/resize/src/logic/include/resize-defs.h 2012-09-08 00:13:22 +0000 | |||
972 | @@ -36,7 +36,7 @@ | |||
973 | 36 | 36 | ||
974 | 37 | #define NUM_KEYS 4 | 37 | #define NUM_KEYS 4 |
975 | 38 | 38 | ||
978 | 39 | #define MIN_KEY_WIDTH_INC 24 | 39 | #define MIN_KEY_WIDTH_INC 24 |
979 | 40 | #define MIN_KEY_HEIGHT_INC 24 | 40 | #define MIN_KEY_HEIGHT_INC 24 |
980 | 41 | 41 | ||
981 | 42 | #endif /* RESIZEDEFS_H */ | 42 | #endif /* RESIZEDEFS_H */ |
982 | 43 | 43 | ||
983 | === modified file 'plugins/resize/src/logic/src/resize-logic.cpp' | |||
984 | --- plugins/resize/src/logic/src/resize-logic.cpp 2012-09-03 21:21:12 +0000 | |||
985 | +++ plugins/resize/src/logic/src/resize-logic.cpp 2012-09-08 00:13:22 +0000 | |||
986 | @@ -43,10 +43,10 @@ | |||
987 | 43 | 43 | ||
988 | 44 | #define XWINDOWCHANGES_INIT {0, 0, 0, 0, 0, None, 0} | 44 | #define XWINDOWCHANGES_INIT {0, 0, 0, 0, 0, None, 0} |
989 | 45 | 45 | ||
994 | 46 | #define TOUCH_LEFT 1 | 46 | static const unsigned short TOUCH_LEFT = 1; |
995 | 47 | #define TOUCH_RIGHT 2 | 47 | static const unsigned short TOUCH_RIGHT = 2; |
996 | 48 | #define TOUCH_TOP 3 | 48 | static const unsigned short TOUCH_TOP = 3; |
997 | 49 | #define TOUCH_BOTTOM 4 | 49 | static const unsigned short TOUCH_BOTTOM = 4; |
998 | 50 | 50 | ||
999 | 51 | using namespace resize; | 51 | using namespace resize; |
1000 | 52 | 52 | ||
1001 | 53 | 53 | ||
1002 | === modified file 'plugins/resizeinfo/src/resizeinfo.cpp' | |||
1003 | --- plugins/resizeinfo/src/resizeinfo.cpp 2012-07-30 07:10:52 +0000 | |||
1004 | +++ plugins/resizeinfo/src/resizeinfo.cpp 2012-09-08 00:13:22 +0000 | |||
1005 | @@ -25,6 +25,11 @@ | |||
1006 | 25 | 25 | ||
1007 | 26 | COMPIZ_PLUGIN_20090315 (resizeinfo, InfoPluginVTable); | 26 | COMPIZ_PLUGIN_20090315 (resizeinfo, InfoPluginVTable); |
1008 | 27 | 27 | ||
1009 | 28 | const unsigned short RESIZE_POPUP_WIDTH = 85; | ||
1010 | 29 | const unsigned short RESIZE_POPUP_HEIGHT = 50; | ||
1011 | 30 | |||
1012 | 31 | const double PI = 3.14159265359f; | ||
1013 | 32 | |||
1014 | 28 | /* Set up an InfoLayer to build a cairo->opengl texture pipeline */ | 33 | /* Set up an InfoLayer to build a cairo->opengl texture pipeline */ |
1015 | 29 | InfoLayer::~InfoLayer () | 34 | InfoLayer::~InfoLayer () |
1016 | 30 | { | 35 | { |
1017 | 31 | 36 | ||
1018 | === modified file 'plugins/resizeinfo/src/resizeinfo.h' | |||
1019 | --- plugins/resizeinfo/src/resizeinfo.h 2012-07-30 07:10:52 +0000 | |||
1020 | +++ plugins/resizeinfo/src/resizeinfo.h 2012-09-08 00:13:22 +0000 | |||
1021 | @@ -34,10 +34,10 @@ | |||
1022 | 34 | 34 | ||
1023 | 35 | #include "resizeinfo_options.h" | 35 | #include "resizeinfo_options.h" |
1024 | 36 | 36 | ||
1027 | 37 | #define RESIZE_POPUP_WIDTH 85 | 37 | extern const unsigned short RESIZE_POPUP_WIDTH; |
1028 | 38 | #define RESIZE_POPUP_HEIGHT 50 | 38 | extern const unsigned short RESIZE_POPUP_HEIGHT; |
1029 | 39 | 39 | ||
1031 | 40 | #define PI 3.1415926 | 40 | extern const double PI; |
1032 | 41 | 41 | ||
1033 | 42 | /* Cairo helper class */ | 42 | /* Cairo helper class */ |
1034 | 43 | 43 | ||
1035 | 44 | 44 | ||
1036 | === modified file 'plugins/ring/src/ring.cpp' | |||
1037 | --- plugins/ring/src/ring.cpp 2012-08-14 06:33:22 +0000 | |||
1038 | +++ plugins/ring/src/ring.cpp 2012-09-08 00:13:22 +0000 | |||
1039 | @@ -31,6 +31,10 @@ | |||
1040 | 31 | 31 | ||
1041 | 32 | COMPIZ_PLUGIN_20090315 (ring, RingPluginVTable); | 32 | COMPIZ_PLUGIN_20090315 (ring, RingPluginVTable); |
1042 | 33 | 33 | ||
1043 | 34 | const double PI = 3.14159265359f; | ||
1044 | 35 | |||
1045 | 36 | const unsigned short ICON_SIZE = 64; | ||
1046 | 37 | |||
1047 | 34 | bool textAvailable; | 38 | bool textAvailable; |
1048 | 35 | 39 | ||
1049 | 36 | static void | 40 | static void |
1050 | 37 | 41 | ||
1051 | === modified file 'plugins/ring/src/ring.h' | |||
1052 | --- plugins/ring/src/ring.h 2012-05-22 13:55:35 +0000 | |||
1053 | +++ plugins/ring/src/ring.h 2012-09-08 00:13:22 +0000 | |||
1054 | @@ -246,10 +246,10 @@ | |||
1055 | 246 | adjustVelocity (); | 246 | adjustVelocity (); |
1056 | 247 | }; | 247 | }; |
1057 | 248 | 248 | ||
1059 | 249 | #define PI 3.1415926 | 249 | extern const double PI; |
1060 | 250 | #define DIST_ROT (3600 / mWindows.size ()) | 250 | #define DIST_ROT (3600 / mWindows.size ()) |
1061 | 251 | #define DIST_ROT_w (3600 / rs->mWindows.size ()) | 251 | #define DIST_ROT_w (3600 / rs->mWindows.size ()) |
1063 | 252 | #define ICON_SIZE 64 | 252 | extern const unsigned short ICON_SIZE; |
1064 | 253 | 253 | ||
1065 | 254 | #define RING_SCREEN(s) \ | 254 | #define RING_SCREEN(s) \ |
1066 | 255 | RingScreen *rs = RingScreen::get (s) | 255 | RingScreen *rs = RingScreen::get (s) |
1067 | 256 | 256 | ||
1068 | === modified file 'plugins/rotate/src/rotate.cpp' | |||
1069 | --- plugins/rotate/src/rotate.cpp 2012-01-18 16:26:45 +0000 | |||
1070 | +++ plugins/rotate/src/rotate.cpp 2012-09-08 00:13:22 +0000 | |||
1071 | @@ -28,7 +28,7 @@ | |||
1072 | 28 | 28 | ||
1073 | 29 | #include <math.h> | 29 | #include <math.h> |
1074 | 30 | 30 | ||
1076 | 31 | #define ROTATE_POINTER_SENSITIVITY_FACTOR 0.05f | 31 | static const float ROTATE_POINTER_SENSITIVITY_FACTOR = 0.05f; |
1077 | 32 | 32 | ||
1078 | 33 | COMPIZ_PLUGIN_20090315 (rotate, RotatePluginVTable) | 33 | COMPIZ_PLUGIN_20090315 (rotate, RotatePluginVTable) |
1079 | 34 | 34 | ||
1080 | 35 | 35 | ||
1081 | === modified file 'plugins/scaleaddon/src/scaleaddon.cpp' | |||
1082 | --- plugins/scaleaddon/src/scaleaddon.cpp 2012-07-30 07:10:52 +0000 | |||
1083 | +++ plugins/scaleaddon/src/scaleaddon.cpp 2012-09-08 00:13:22 +0000 | |||
1084 | @@ -545,8 +545,8 @@ | |||
1085 | 545 | * inspired by smallwindows (smallwindows.sf.net) by Jens Egeblad | 545 | * inspired by smallwindows (smallwindows.sf.net) by Jens Egeblad |
1086 | 546 | * FIXME: broken. | 546 | * FIXME: broken. |
1087 | 547 | * */ | 547 | * */ |
1088 | 548 | #define ORGANIC_STEP 0.05 | ||
1089 | 549 | #if 0 | 548 | #if 0 |
1090 | 549 | static const double ORGANIC_STEP = 0.05f; | ||
1091 | 550 | static int | 550 | static int |
1092 | 551 | organicCompareWindows (const void *elem1, | 551 | organicCompareWindows (const void *elem1, |
1093 | 552 | const void *elem2) | 552 | const void *elem2) |
1094 | 553 | 553 | ||
1095 | === modified file 'plugins/shelf/src/shelf.cpp' | |||
1096 | --- plugins/shelf/src/shelf.cpp 2012-05-18 06:52:20 +0000 | |||
1097 | +++ plugins/shelf/src/shelf.cpp 2012-09-08 00:13:22 +0000 | |||
1098 | @@ -36,6 +36,8 @@ | |||
1099 | 36 | 36 | ||
1100 | 37 | COMPIZ_PLUGIN_20090315 (shelf, ShelfPluginVTable); | 37 | COMPIZ_PLUGIN_20090315 (shelf, ShelfPluginVTable); |
1101 | 38 | 38 | ||
1102 | 39 | const float SHELF_MIN_SIZE = 50.0f; // Minimum pixelsize a window can be scaled to | ||
1103 | 40 | |||
1104 | 39 | /* Enables / Disables screen paint functions */ | 41 | /* Enables / Disables screen paint functions */ |
1105 | 40 | static void | 42 | static void |
1106 | 41 | toggleScreenFunctions (bool enabled) | 43 | toggleScreenFunctions (bool enabled) |
1107 | 42 | 44 | ||
1108 | === modified file 'plugins/shelf/src/shelf.h' | |||
1109 | --- plugins/shelf/src/shelf.h 2010-08-04 16:09:38 +0000 | |||
1110 | +++ plugins/shelf/src/shelf.h 2012-09-08 00:13:22 +0000 | |||
1111 | @@ -221,7 +221,7 @@ | |||
1112 | 221 | #define SHELF_SCREEN(w) \ | 221 | #define SHELF_SCREEN(w) \ |
1113 | 222 | ShelfScreen *ss = ShelfScreen::get (w) | 222 | ShelfScreen *ss = ShelfScreen::get (w) |
1114 | 223 | 223 | ||
1116 | 224 | #define SHELF_MIN_SIZE 50.0f // Minimum pixelsize a window can be scaled to | 224 | extern const float SHELF_MIN_SIZE; // Minimum pixelsize a window can be scaled to |
1117 | 225 | 225 | ||
1118 | 226 | 226 | ||
1119 | 227 | class ShelfPluginVTable : | 227 | class ShelfPluginVTable : |
1120 | 228 | 228 | ||
1121 | === modified file 'plugins/shift/src/shift.cpp' | |||
1122 | --- plugins/shift/src/shift.cpp 2012-08-14 06:33:22 +0000 | |||
1123 | +++ plugins/shift/src/shift.cpp 2012-09-08 00:13:22 +0000 | |||
1124 | @@ -37,6 +37,8 @@ | |||
1125 | 37 | 37 | ||
1126 | 38 | COMPIZ_PLUGIN_20090315 (shift, ShiftPluginVTable); | 38 | COMPIZ_PLUGIN_20090315 (shift, ShiftPluginVTable); |
1127 | 39 | 39 | ||
1128 | 40 | const double PI = 3.14159265359f; | ||
1129 | 41 | |||
1130 | 40 | bool textAvailable = false; | 42 | bool textAvailable = false; |
1131 | 41 | 43 | ||
1132 | 42 | void | 44 | void |
1133 | 43 | 45 | ||
1134 | === modified file 'plugins/shift/src/shift.h' | |||
1135 | --- plugins/shift/src/shift.h 2012-05-22 13:58:31 +0000 | |||
1136 | +++ plugins/shift/src/shift.h 2012-09-08 00:13:22 +0000 | |||
1137 | @@ -305,7 +305,7 @@ | |||
1138 | 305 | 305 | ||
1139 | 306 | }; | 306 | }; |
1140 | 307 | 307 | ||
1142 | 308 | #define PI 3.1415926 | 308 | extern const double PI; |
1143 | 309 | 309 | ||
1144 | 310 | #define SHIFT_WINDOW(w) \ | 310 | #define SHIFT_WINDOW(w) \ |
1145 | 311 | ShiftWindow *sw = ShiftWindow::get (w) | 311 | ShiftWindow *sw = ShiftWindow::get (w) |
1146 | 312 | 312 | ||
1147 | === modified file 'plugins/showdesktop/src/showdesktop.cpp' | |||
1148 | --- plugins/showdesktop/src/showdesktop.cpp 2012-05-18 06:52:20 +0000 | |||
1149 | +++ plugins/showdesktop/src/showdesktop.cpp 2012-09-08 00:13:22 +0000 | |||
1150 | @@ -37,6 +37,11 @@ | |||
1151 | 37 | 37 | ||
1152 | 38 | COMPIZ_PLUGIN_20090315 (showdesktop, ShowdesktopPluginVTable); | 38 | COMPIZ_PLUGIN_20090315 (showdesktop, ShowdesktopPluginVTable); |
1153 | 39 | 39 | ||
1154 | 40 | const unsigned short SD_STATE_OFF = 0; | ||
1155 | 41 | const unsigned short SD_STATE_ACTIVATING = 1; | ||
1156 | 42 | const unsigned short SD_STATE_ON = 2; | ||
1157 | 43 | const unsigned short SD_STATE_DEACTIVATING = 3; | ||
1158 | 44 | |||
1159 | 40 | /* non interfacing code, aka the logic of the plugin */ | 45 | /* non interfacing code, aka the logic of the plugin */ |
1160 | 41 | bool | 46 | bool |
1161 | 42 | ShowdesktopWindow::is () | 47 | ShowdesktopWindow::is () |
1162 | 43 | 48 | ||
1163 | === modified file 'plugins/showdesktop/src/showdesktop.h' | |||
1164 | --- plugins/showdesktop/src/showdesktop.h 2011-03-14 15:47:56 +0000 | |||
1165 | +++ plugins/showdesktop/src/showdesktop.h 2012-09-08 00:13:22 +0000 | |||
1166 | @@ -54,10 +54,10 @@ | |||
1167 | 54 | #define MOVE_LEFT(w) ((WIN_X (w) + (WIN_W (w) / 2)) < (screen->width () / 2)) | 54 | #define MOVE_LEFT(w) ((WIN_X (w) + (WIN_W (w) / 2)) < (screen->width () / 2)) |
1168 | 55 | #define MOVE_UP(w) ((WIN_Y (w) + (WIN_H (w) / 2)) < (screen->height () / 2)) | 55 | #define MOVE_UP(w) ((WIN_Y (w) + (WIN_H (w) / 2)) < (screen->height () / 2)) |
1169 | 56 | 56 | ||
1174 | 57 | #define SD_STATE_OFF 0 | 57 | extern const unsigned short SD_STATE_OFF; |
1175 | 58 | #define SD_STATE_ACTIVATING 1 | 58 | extern const unsigned short SD_STATE_ACTIVATING; |
1176 | 59 | #define SD_STATE_ON 2 | 59 | extern const unsigned short SD_STATE_ON; |
1177 | 60 | #define SD_STATE_DEACTIVATING 3 | 60 | extern const unsigned short SD_STATE_DEACTIVATING; |
1178 | 61 | 61 | ||
1179 | 62 | class ShowdesktopPlacer | 62 | class ShowdesktopPlacer |
1180 | 63 | { | 63 | { |
1181 | 64 | 64 | ||
1182 | === modified file 'plugins/splash/src/splash.cpp' | |||
1183 | --- plugins/splash/src/splash.cpp 2011-02-24 06:28:27 +0000 | |||
1184 | +++ plugins/splash/src/splash.cpp 2012-09-08 00:13:22 +0000 | |||
1185 | @@ -23,6 +23,9 @@ | |||
1186 | 23 | 23 | ||
1187 | 24 | COMPIZ_PLUGIN_20090315 (splash, SplashPluginVTable); | 24 | COMPIZ_PLUGIN_20090315 (splash, SplashPluginVTable); |
1188 | 25 | 25 | ||
1189 | 26 | const std::string SPLASH_BACKGROUND_DEFAULT(""); | ||
1190 | 27 | const std::string SPLASH_LOGO_DEFAULT(""); | ||
1191 | 28 | |||
1192 | 26 | void | 29 | void |
1193 | 27 | SplashScreen::preparePaint (int ms) | 30 | SplashScreen::preparePaint (int ms) |
1194 | 28 | { | 31 | { |
1195 | 29 | 32 | ||
1196 | === modified file 'plugins/splash/src/splash.h' | |||
1197 | --- plugins/splash/src/splash.h 2009-03-16 01:58:28 +0000 | |||
1198 | +++ plugins/splash/src/splash.h 2012-09-08 00:13:22 +0000 | |||
1199 | @@ -34,8 +34,8 @@ | |||
1200 | 34 | #define MESH_W 16 | 34 | #define MESH_W 16 |
1201 | 35 | #define MESH_H 16 | 35 | #define MESH_H 16 |
1202 | 36 | 36 | ||
1205 | 37 | #define SPLASH_BACKGROUND_DEFAULT "" | 37 | extern const std::string SPLASH_BACKGROUND_DEFAULT; |
1206 | 38 | #define SPLASH_LOGO_DEFAULT "" | 38 | extern const std::string SPLASH_LOGO_DEFAULT; |
1207 | 39 | 39 | ||
1208 | 40 | class SplashScreen : | 40 | class SplashScreen : |
1209 | 41 | public PluginClassHandler <SplashScreen, CompScreen>, | 41 | public PluginClassHandler <SplashScreen, CompScreen>, |
1210 | 42 | 42 | ||
1211 | === modified file 'plugins/staticswitcher/src/staticswitcher.cpp' | |||
1212 | --- plugins/staticswitcher/src/staticswitcher.cpp 2012-08-08 08:54:15 +0000 | |||
1213 | +++ plugins/staticswitcher/src/staticswitcher.cpp 2012-09-08 00:13:22 +0000 | |||
1214 | @@ -27,6 +27,9 @@ | |||
1215 | 27 | 27 | ||
1216 | 28 | COMPIZ_PLUGIN_20090315 (staticswitcher, StaticSwitchPluginVTable) | 28 | COMPIZ_PLUGIN_20090315 (staticswitcher, StaticSwitchPluginVTable) |
1217 | 29 | 29 | ||
1218 | 30 | const unsigned short PREVIEWSIZE = 150; | ||
1219 | 31 | const unsigned short BORDER = 10; | ||
1220 | 32 | |||
1221 | 30 | void | 33 | void |
1222 | 31 | StaticSwitchScreen::updatePopupWindow () | 34 | StaticSwitchScreen::updatePopupWindow () |
1223 | 32 | { | 35 | { |
1224 | 33 | 36 | ||
1225 | === modified file 'plugins/staticswitcher/src/staticswitcher.h' | |||
1226 | --- plugins/staticswitcher/src/staticswitcher.h 2012-07-30 07:10:52 +0000 | |||
1227 | +++ plugins/staticswitcher/src/staticswitcher.h 2012-09-08 00:13:22 +0000 | |||
1228 | @@ -159,8 +159,8 @@ | |||
1229 | 159 | 159 | ||
1230 | 160 | #define MAX_ICON_SIZE 256 | 160 | #define MAX_ICON_SIZE 256 |
1231 | 161 | 161 | ||
1234 | 162 | #define PREVIEWSIZE 150 | 162 | extern const unsigned short PREVIEWSIZE; |
1235 | 163 | #define BORDER 10 | 163 | extern const unsigned short BORDER; |
1236 | 164 | 164 | ||
1237 | 165 | #define SWITCH_SCREEN(s) \ | 165 | #define SWITCH_SCREEN(s) \ |
1238 | 166 | StaticSwitchScreen *ss = StaticSwitchScreen::get (s) | 166 | StaticSwitchScreen *ss = StaticSwitchScreen::get (s) |
1239 | 167 | 167 | ||
1240 | === modified file 'plugins/switcher/src/switcher.cpp' | |||
1241 | --- plugins/switcher/src/switcher.cpp 2012-08-06 01:36:00 +0000 | |||
1242 | +++ plugins/switcher/src/switcher.cpp 2012-09-08 00:13:22 +0000 | |||
1243 | @@ -27,6 +27,12 @@ | |||
1244 | 27 | 27 | ||
1245 | 28 | COMPIZ_PLUGIN_20090315 (switcher, SwitchPluginVTable) | 28 | COMPIZ_PLUGIN_20090315 (switcher, SwitchPluginVTable) |
1246 | 29 | 29 | ||
1247 | 30 | const unsigned short WIDTH = 212; | ||
1248 | 31 | const unsigned short HEIGHT = 192; | ||
1249 | 32 | const unsigned short SPACE = 10; | ||
1250 | 33 | |||
1251 | 34 | const unsigned short BOX_WIDTH = 3; | ||
1252 | 35 | |||
1253 | 30 | #define XWINDOWCHANGES_INIT {0, 0, 0, 0, 0, None, 0} | 36 | #define XWINDOWCHANGES_INIT {0, 0, 0, 0, 0, None, 0} |
1254 | 31 | 37 | ||
1255 | 32 | static float _boxVertices[] = | 38 | static float _boxVertices[] = |
1256 | 33 | 39 | ||
1257 | === modified file 'plugins/switcher/src/switcher.h' | |||
1258 | --- plugins/switcher/src/switcher.h 2010-12-07 15:25:17 +0000 | |||
1259 | +++ plugins/switcher/src/switcher.h 2012-09-08 00:13:22 +0000 | |||
1260 | @@ -154,11 +154,11 @@ | |||
1261 | 154 | unsigned long decorations; | 154 | unsigned long decorations; |
1262 | 155 | } MwmHints; | 155 | } MwmHints; |
1263 | 156 | 156 | ||
1267 | 157 | #define WIDTH 212 | 157 | extern const unsigned short WIDTH; |
1268 | 158 | #define HEIGHT 192 | 158 | extern const unsigned short HEIGHT; |
1269 | 159 | #define SPACE 10 | 159 | extern const unsigned short SPACE; |
1270 | 160 | 160 | ||
1272 | 161 | #define BOX_WIDTH 3 | 161 | extern const unsigned short BOX_WIDTH; |
1273 | 162 | 162 | ||
1274 | 163 | #define WINDOW_WIDTH(count) (WIDTH * (count) + (SPACE << 1)) | 163 | #define WINDOW_WIDTH(count) (WIDTH * (count) + (SPACE << 1)) |
1275 | 164 | #define WINDOW_HEIGHT (HEIGHT + (SPACE << 1)) | 164 | #define WINDOW_HEIGHT (HEIGHT + (SPACE << 1)) |
1276 | 165 | 165 | ||
1277 | === modified file 'plugins/td/src/3d.cpp' | |||
1278 | --- plugins/td/src/3d.cpp 2012-07-30 10:15:41 +0000 | |||
1279 | +++ plugins/td/src/3d.cpp 2012-09-08 00:13:22 +0000 | |||
1280 | @@ -2,6 +2,8 @@ | |||
1281 | 2 | 2 | ||
1282 | 3 | COMPIZ_PLUGIN_20090315 (td, TdPluginVTable); | 3 | COMPIZ_PLUGIN_20090315 (td, TdPluginVTable); |
1283 | 4 | 4 | ||
1284 | 5 | const double PI = 3.14159265359f; | ||
1285 | 6 | |||
1286 | 5 | void | 7 | void |
1287 | 6 | setFunctions (bool enabled) | 8 | setFunctions (bool enabled) |
1288 | 7 | { | 9 | { |
1289 | 8 | 10 | ||
1290 | === modified file 'plugins/td/src/3d.h' | |||
1291 | --- plugins/td/src/3d.h 2010-08-15 10:01:46 +0000 | |||
1292 | +++ plugins/td/src/3d.h 2012-09-08 00:13:22 +0000 | |||
1293 | @@ -43,7 +43,7 @@ | |||
1294 | 43 | 43 | ||
1295 | 44 | #include "td_options.h" | 44 | #include "td_options.h" |
1296 | 45 | 45 | ||
1298 | 46 | #define PI 3.14159265359f | 46 | extern const double PI; |
1299 | 47 | 47 | ||
1300 | 48 | class TdScreen : | 48 | class TdScreen : |
1301 | 49 | public PluginClassHandler <TdScreen, CompScreen>, | 49 | public PluginClassHandler <TdScreen, CompScreen>, |
1302 | 50 | 50 | ||
1303 | === modified file 'plugins/text/src/text.cpp' | |||
1304 | --- plugins/text/src/text.cpp 2012-07-30 07:10:52 +0000 | |||
1305 | +++ plugins/text/src/text.cpp 2012-09-08 00:13:22 +0000 | |||
1306 | @@ -27,7 +27,7 @@ | |||
1307 | 27 | 27 | ||
1308 | 28 | #include "private.h" | 28 | #include "private.h" |
1309 | 29 | 29 | ||
1311 | 30 | #define PI 3.14159265359f | 30 | static const double PI = 3.14159265359f; |
1312 | 31 | 31 | ||
1313 | 32 | COMPIZ_PLUGIN_20090315 (text, TextPluginVTable); | 32 | COMPIZ_PLUGIN_20090315 (text, TextPluginVTable); |
1314 | 33 | 33 | ||
1315 | 34 | 34 | ||
1316 | === modified file 'plugins/thumbnail/src/thumbnail.cpp' | |||
1317 | --- plugins/thumbnail/src/thumbnail.cpp 2012-08-06 01:36:00 +0000 | |||
1318 | +++ plugins/thumbnail/src/thumbnail.cpp 2012-09-08 00:13:22 +0000 | |||
1319 | @@ -32,6 +32,8 @@ | |||
1320 | 32 | 32 | ||
1321 | 33 | COMPIZ_PLUGIN_20090315 (thumbnail, ThumbPluginVTable); | 33 | COMPIZ_PLUGIN_20090315 (thumbnail, ThumbPluginVTable); |
1322 | 34 | 34 | ||
1323 | 35 | const unsigned short TEXT_DISTANCE = 10; | ||
1324 | 36 | |||
1325 | 35 | void | 37 | void |
1326 | 36 | ThumbScreen::freeThumbText (Thumbnail *t) | 38 | ThumbScreen::freeThumbText (Thumbnail *t) |
1327 | 37 | { | 39 | { |
1328 | 38 | 40 | ||
1329 | === modified file 'plugins/thumbnail/src/thumbnail.h' | |||
1330 | --- plugins/thumbnail/src/thumbnail.h 2012-07-30 07:10:52 +0000 | |||
1331 | +++ plugins/thumbnail/src/thumbnail.h 2012-09-08 00:13:22 +0000 | |||
1332 | @@ -58,7 +58,7 @@ | |||
1333 | 58 | #define WIN_W(w) ((w)->width () + (w)->border ().left + (w)->border ().right) | 58 | #define WIN_W(w) ((w)->width () + (w)->border ().left + (w)->border ().right) |
1334 | 59 | #define WIN_H(w) ((w)->height () + (w)->border ().top + (w)->border ().bottom) | 59 | #define WIN_H(w) ((w)->height () + (w)->border ().top + (w)->border ().bottom) |
1335 | 60 | 60 | ||
1337 | 61 | #define TEXT_DISTANCE 10 | 61 | extern const unsigned short TEXT_DISTANCE; |
1338 | 62 | 62 | ||
1339 | 63 | bool textPluginLoaded; | 63 | bool textPluginLoaded; |
1340 | 64 | 64 | ||
1341 | 65 | 65 | ||
1342 | === modified file 'plugins/wall/src/wall.cpp' | |||
1343 | --- plugins/wall/src/wall.cpp 2012-08-02 06:54:30 +0000 | |||
1344 | +++ plugins/wall/src/wall.cpp 2012-09-08 00:13:22 +0000 | |||
1345 | @@ -37,9 +37,9 @@ | |||
1346 | 37 | 37 | ||
1347 | 38 | #include "wall.h" | 38 | #include "wall.h" |
1348 | 39 | 39 | ||
1352 | 40 | #define PI 3.14159265359f | 40 | static const double PI = 3.14159265359f; |
1353 | 41 | #define VIEWPORT_SWITCHER_SIZE 100 | 41 | static const unsigned short VIEWPORT_SWITCHER_SIZE = 100; |
1354 | 42 | #define ARROW_SIZE 33 | 42 | static const unsigned short ARROW_SIZE = 33; |
1355 | 43 | 43 | ||
1356 | 44 | #define getColorRGBA(name) \ | 44 | #define getColorRGBA(name) \ |
1357 | 45 | r = optionGet##name##Red() / 65535.0f;\ | 45 | r = optionGet##name##Red() / 65535.0f;\ |
1358 | @@ -385,7 +385,7 @@ | |||
1359 | 385 | } | 385 | } |
1360 | 386 | 386 | ||
1361 | 387 | /* movement remainder that gets ignored for direction calculation */ | 387 | /* movement remainder that gets ignored for direction calculation */ |
1363 | 388 | #define IGNORE_REMAINDER 0.05 | 388 | static const float IGNORE_REMAINDER = 0.05f; |
1364 | 389 | 389 | ||
1365 | 390 | void | 390 | void |
1366 | 391 | WallScreen::determineMovementAngle () | 391 | WallScreen::determineMovementAngle () |
1367 | 392 | 392 | ||
1368 | === modified file 'plugins/water/src/water.cpp' | |||
1369 | --- plugins/water/src/water.cpp 2012-09-05 23:54:21 +0000 | |||
1370 | +++ plugins/water/src/water.cpp 2012-09-08 00:13:22 +0000 | |||
1371 | @@ -31,6 +31,10 @@ | |||
1372 | 31 | 31 | ||
1373 | 32 | COMPIZ_PLUGIN_20090315 (water, WaterPluginVTable) | 32 | COMPIZ_PLUGIN_20090315 (water, WaterPluginVTable) |
1374 | 33 | 33 | ||
1375 | 34 | const unsigned int TEXTURE_SIZE = 256; | ||
1376 | 35 | |||
1377 | 36 | const float K = 0.1964f; | ||
1378 | 37 | |||
1379 | 34 | static int waterLastPointerX = 0; | 38 | static int waterLastPointerX = 0; |
1380 | 35 | static int waterLastPointerY = 0; | 39 | static int waterLastPointerY = 0; |
1381 | 36 | 40 | ||
1382 | 37 | 41 | ||
1383 | === modified file 'plugins/water/src/water.h' | |||
1384 | --- plugins/water/src/water.h 2012-07-30 07:10:52 +0000 | |||
1385 | +++ plugins/water/src/water.h 2012-09-08 00:13:22 +0000 | |||
1386 | @@ -37,9 +37,9 @@ | |||
1387 | 37 | #define WATER_SCREEN(s) \ | 37 | #define WATER_SCREEN(s) \ |
1388 | 38 | WaterScreen *ws = WaterScreen::get (s) | 38 | WaterScreen *ws = WaterScreen::get (s) |
1389 | 39 | 39 | ||
1391 | 40 | #define TEXTURE_SIZE 256 | 40 | extern const unsigned int TEXTURE_SIZE; |
1392 | 41 | 41 | ||
1394 | 42 | #define K 0.1964f | 42 | extern const float K; |
1395 | 43 | 43 | ||
1396 | 44 | #define TEXTURE_NUM 3 | 44 | #define TEXTURE_NUM 3 |
1397 | 45 | #define PROG_NUM 3 | 45 | #define PROG_NUM 3 |
1398 | 46 | 46 | ||
1399 | === modified file 'plugins/wobbly/src/wobbly.h' | |||
1400 | --- plugins/wobbly/src/wobbly.h 2012-08-14 06:33:22 +0000 | |||
1401 | +++ plugins/wobbly/src/wobbly.h 2012-09-08 00:13:22 +0000 | |||
1402 | @@ -41,7 +41,7 @@ | |||
1403 | 41 | CompWindowTypeMenuMask | \ | 41 | CompWindowTypeMenuMask | \ |
1404 | 42 | CompWindowTypeUtilMask) | 42 | CompWindowTypeUtilMask) |
1405 | 43 | 43 | ||
1407 | 44 | #define GRID_WIDTH 4 | 44 | #define GRID_WIDTH 4 |
1408 | 45 | #define GRID_HEIGHT 4 | 45 | #define GRID_HEIGHT 4 |
1409 | 46 | 46 | ||
1410 | 47 | #define MODEL_MAX_SPRINGS (GRID_WIDTH * GRID_HEIGHT * 2) | 47 | #define MODEL_MAX_SPRINGS (GRID_WIDTH * GRID_HEIGHT * 2) |
1411 | 48 | 48 | ||
1412 | === modified file 'src/event.cpp' | |||
1413 | --- src/event.cpp 2012-08-07 04:17:07 +0000 | |||
1414 | +++ src/event.cpp 2012-09-08 00:13:22 +0000 | |||
1415 | @@ -1619,9 +1619,9 @@ | |||
1416 | 1619 | if (state & ~CompWindowStateHiddenMask) | 1619 | if (state & ~CompWindowStateHiddenMask) |
1417 | 1620 | { | 1620 | { |
1418 | 1621 | 1621 | ||
1422 | 1622 | #define _NET_WM_STATE_REMOVE 0 | 1622 | static const unsigned short _NET_WM_STATE_REMOVE = 0; |
1423 | 1623 | #define _NET_WM_STATE_ADD 1 | 1623 | static const unsigned short _NET_WM_STATE_ADD = 1; |
1424 | 1624 | #define _NET_WM_STATE_TOGGLE 2 | 1624 | static const unsigned short _NET_WM_STATE_TOGGLE = 2; |
1425 | 1625 | 1625 | ||
1426 | 1626 | switch (event->xclient.data.l[0]) { | 1626 | switch (event->xclient.data.l[0]) { |
1427 | 1627 | case _NET_WM_STATE_REMOVE: | 1627 | case _NET_WM_STATE_REMOVE: |
1428 | 1628 | 1628 | ||
1429 | === modified file 'src/screen.cpp' | |||
1430 | --- src/screen.cpp 2012-08-03 10:12:25 +0000 | |||
1431 | +++ src/screen.cpp 2012-09-08 00:13:22 +0000 | |||
1432 | @@ -80,7 +80,7 @@ | |||
1433 | 80 | 80 | ||
1434 | 81 | #define MwmHintsFunctions (1L << 0) | 81 | #define MwmHintsFunctions (1L << 0) |
1435 | 82 | #define MwmHintsDecorations (1L << 1) | 82 | #define MwmHintsDecorations (1L << 1) |
1437 | 83 | #define PropMotifWmHintElements 3 | 83 | static const unsigned short PropMotifWmHintElements = 3; |
1438 | 84 | 84 | ||
1439 | 85 | typedef struct { | 85 | typedef struct { |
1440 | 86 | unsigned long flags; | 86 | unsigned long flags; |
1441 | @@ -1148,7 +1148,7 @@ | |||
1442 | 1148 | Atom property) | 1148 | Atom property) |
1443 | 1149 | { | 1149 | { |
1444 | 1150 | 1150 | ||
1446 | 1151 | #define N_TARGETS 4 | 1151 | static const unsigned short N_TARGETS = 4; |
1447 | 1152 | 1152 | ||
1448 | 1153 | Atom conversionTargets[N_TARGETS]; | 1153 | Atom conversionTargets[N_TARGETS]; |
1449 | 1154 | 1154 | ||
1450 | @@ -1272,8 +1272,8 @@ | |||
1451 | 1272 | eventManager.quit (); | 1272 | eventManager.quit (); |
1452 | 1273 | } | 1273 | } |
1453 | 1274 | 1274 | ||
1456 | 1275 | #define IMAGEDIR "images" | 1275 | static const std::string IMAGEDIR("images"); |
1457 | 1276 | #define HOMECOMPIZDIR ".compiz-1" | 1276 | static const std::string HOMECOMPIZDIR(".compiz-1"); |
1458 | 1277 | 1277 | ||
1459 | 1278 | bool | 1278 | bool |
1460 | 1279 | CompScreenImpl::readImageFromFile (CompString &name, | 1279 | CompScreenImpl::readImageFromFile (CompString &name, |
1461 | @@ -2174,7 +2174,7 @@ | |||
1462 | 2174 | } | 2174 | } |
1463 | 2175 | } | 2175 | } |
1464 | 2176 | 2176 | ||
1466 | 2177 | #define STARTUP_TIMEOUT_DELAY 15000 | 2177 | static const unsigned int STARTUP_TIMEOUT_DELAY = 15000; |
1467 | 2178 | 2178 | ||
1468 | 2179 | bool | 2179 | bool |
1469 | 2180 | cps::StartupSequence::handleStartupSequenceTimeout () | 2180 | cps::StartupSequence::handleStartupSequenceTimeout () |
1470 | 2181 | 2181 | ||
1471 | === modified file 'src/timer/src/timer.cpp' | |||
1472 | --- src/timer/src/timer.cpp 2012-08-08 02:22:12 +0000 | |||
1473 | +++ src/timer/src/timer.cpp 2012-09-08 00:13:22 +0000 | |||
1474 | @@ -79,7 +79,7 @@ | |||
1475 | 79 | return new CompTimeoutSource (ctx); | 79 | return new CompTimeoutSource (ctx); |
1476 | 80 | } | 80 | } |
1477 | 81 | 81 | ||
1479 | 82 | #define COMPIZ_TIMEOUT_WAIT 15 | 82 | static const unsigned short COMPIZ_TIMEOUT_WAIT = 15; |
1480 | 83 | 83 | ||
1481 | 84 | bool | 84 | bool |
1482 | 85 | CompTimeoutSource::prepare (int &timeout) | 85 | CompTimeoutSource::prepare (int &timeout) |
If this is a good idea I could continue this...
I also noticed that PI for example is defined by several plug-ins. It could be made global, no ?