Merge lp:~compiz-team/compiz-expo-plugin/oneiric.actual_polish into lp:~compiz-team/compiz-expo-plugin/oneiric
- oneiric.actual_polish
- Merge into oneiric
Proposed by
Sam Spilsbury
Status: | Merged |
---|---|
Merged at revision: | 154 |
Proposed branch: | lp:~compiz-team/compiz-expo-plugin/oneiric.actual_polish |
Merge into: | lp:~compiz-team/compiz-expo-plugin/oneiric |
Diff against target: |
1748 lines (+1233/-160) 6 files modified
expo.xml.in (+15/-4) src/expo.cpp (+471/-155) src/expo.h (+56/-1) src/glow.cpp (+428/-0) src/glow.h (+66/-0) src/group_glow.h (+197/-0) |
To merge this branch: | bzr merge lp:~compiz-team/compiz-expo-plugin/oneiric.actual_polish |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jason Smith (community) | Approve | ||
Robert Carr | Pending | ||
Review via email: mp+75526@code.launchpad.net |
This proposal supersedes a proposal from 2011-09-02.
Commit message
Description of the change
Center the spread as per design
To post a comment you must log in.
Revision history for this message
Robert Carr (robertcarr) wrote : Posted in a previous version of this proposal | # |
review:
Approve
Revision history for this message
Jason Smith (jassmith) wrote : | # |
Looks fine, dupes some code but we dont care since we dont use the group plugin.
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'expo.xml.in' | |||
2 | --- expo.xml.in 2011-09-01 14:33:30 +0000 | |||
3 | +++ expo.xml.in 2011-09-15 12:36:24 +0000 | |||
4 | @@ -17,6 +17,7 @@ | |||
5 | 17 | <plugin>wobbly</plugin> | 17 | <plugin>wobbly</plugin> |
6 | 18 | <plugin>animation</plugin> | 18 | <plugin>animation</plugin> |
7 | 19 | <plugin>wallpaper</plugin> | 19 | <plugin>wallpaper</plugin> |
8 | 20 | <plugin>imgpng</plugin> | ||
9 | 20 | </relation> | 21 | </relation> |
10 | 21 | </deps> | 22 | </deps> |
11 | 22 | <options> | 23 | <options> |
12 | @@ -133,7 +134,7 @@ | |||
13 | 133 | <_long> Left Side screen space of expo in pixels</_long> | 134 | <_long> Left Side screen space of expo in pixels</_long> |
14 | 134 | <min>-1680</min> | 135 | <min>-1680</min> |
15 | 135 | <max>1680</max> | 136 | <max>1680</max> |
17 | 136 | <default>36</default> | 137 | <default>64</default> |
18 | 137 | </option> | 138 | </option> |
19 | 138 | <option name="y_offset" type="int"> | 139 | <option name="y_offset" type="int"> |
20 | 139 | <_short>Y Space</_short> | 140 | <_short>Y Space</_short> |
21 | @@ -145,7 +146,7 @@ | |||
22 | 145 | <option name="distance" type="float"> | 146 | <option name="distance" type="float"> |
23 | 146 | <_short>Distance</_short> | 147 | <_short>Distance</_short> |
24 | 147 | <_long>Distance of the expo wall</_long> | 148 | <_long>Distance of the expo wall</_long> |
26 | 148 | <default>0.0</default> | 149 | <default>0.005</default> |
27 | 149 | <min>0.0</min> | 150 | <min>0.0</min> |
28 | 150 | <max>1.0</max> | 151 | <max>1.0</max> |
29 | 151 | <precision>0.01</precision> | 152 | <precision>0.01</precision> |
30 | @@ -204,7 +205,7 @@ | |||
31 | 204 | <option name="vp_brightness" type="float"> | 205 | <option name="vp_brightness" type="float"> |
32 | 205 | <_short>Brightness</_short> | 206 | <_short>Brightness</_short> |
33 | 206 | <_long>Inactive viewport brightness.</_long> | 207 | <_long>Inactive viewport brightness.</_long> |
35 | 207 | <default>80.0</default> | 208 | <default>40.0</default> |
36 | 208 | <min>0.0</min> | 209 | <min>0.0</min> |
37 | 209 | <max>100.0</max> | 210 | <max>100.0</max> |
38 | 210 | <precision>0.1</precision> | 211 | <precision>0.1</precision> |
39 | @@ -212,11 +213,21 @@ | |||
40 | 212 | <option name="vp_saturation" type="float"> | 213 | <option name="vp_saturation" type="float"> |
41 | 213 | <_short>Saturation</_short> | 214 | <_short>Saturation</_short> |
42 | 214 | <_long>Inactive viewport saturation.</_long> | 215 | <_long>Inactive viewport saturation.</_long> |
44 | 215 | <default>100.0</default> | 216 | <default>40.0</default> |
45 | 216 | <min>0.0</min> | 217 | <min>0.0</min> |
46 | 217 | <max>100.0</max> | 218 | <max>100.0</max> |
47 | 218 | <precision>0.1</precision> | 219 | <precision>0.1</precision> |
48 | 219 | </option> | 220 | </option> |
49 | 221 | <option name="selected_color" type="color"> | ||
50 | 222 | <_short>Selected Color</_short> | ||
51 | 223 | <_long>Color to use when highlighting the selected viewport</_long> | ||
52 | 224 | <default> | ||
53 | 225 | <red>0xfbfb</red> | ||
54 | 226 | <green>0x8b8b</green> | ||
55 | 227 | <blue>0x0</blue> | ||
56 | 228 | <alpha>0xffff</alpha> | ||
57 | 229 | </default> | ||
58 | 230 | </option> | ||
59 | 220 | </subgroup> | 231 | </subgroup> |
60 | 221 | <subgroup> | 232 | <subgroup> |
61 | 222 | <short>Reflection</short> | 233 | <short>Reflection</short> |
62 | 223 | 234 | ||
63 | === added directory 'images' | |||
64 | === added file 'images/glow_outline.png' | |||
65 | 224 | Binary files images/glow_outline.png 1970-01-01 00:00:00 +0000 and images/glow_outline.png 2011-09-15 12:36:24 +0000 differ | 235 | Binary files images/glow_outline.png 1970-01-01 00:00:00 +0000 and images/glow_outline.png 2011-09-15 12:36:24 +0000 differ |
66 | === added file 'images/texture_tile.png' | |||
67 | 225 | Binary files images/texture_tile.png 1970-01-01 00:00:00 +0000 and images/texture_tile.png 2011-09-15 12:36:24 +0000 differ | 236 | Binary files images/texture_tile.png 1970-01-01 00:00:00 +0000 and images/texture_tile.png 2011-09-15 12:36:24 +0000 differ |
68 | === modified file 'src/expo.cpp' | |||
69 | --- src/expo.cpp 2011-09-01 14:33:30 +0000 | |||
70 | +++ src/expo.cpp 2011-09-15 12:36:24 +0000 | |||
71 | @@ -26,6 +26,7 @@ | |||
72 | 26 | #include "expo.h" | 26 | #include "expo.h" |
73 | 27 | #include <math.h> | 27 | #include <math.h> |
74 | 28 | #include <GL/glu.h> | 28 | #include <GL/glu.h> |
75 | 29 | #include <X11/cursorfont.h> | ||
76 | 29 | 30 | ||
77 | 30 | COMPIZ_PLUGIN_20090315 (expo, ExpoPluginVTable); | 31 | COMPIZ_PLUGIN_20090315 (expo, ExpoPluginVTable); |
78 | 31 | 32 | ||
79 | @@ -67,11 +68,10 @@ | |||
80 | 67 | 68 | ||
81 | 68 | if (dndState == DnDDuring || dndState == DnDStart) | 69 | if (dndState == DnDDuring || dndState == DnDStart) |
82 | 69 | { | 70 | { |
84 | 70 | if (dndWindow) | 71 | if (dndWindows.size ()) |
85 | 71 | finishWindowMovement (); | 72 | finishWindowMovement (); |
86 | 72 | 73 | ||
87 | 73 | dndState = DnDNone; | 74 | dndState = DnDNone; |
88 | 74 | dndWindow = NULL; | ||
89 | 75 | 75 | ||
90 | 76 | action->setState (action->state () & CompAction::StateInitButton); | 76 | action->setState (action->state () & CompAction::StateInitButton); |
91 | 77 | cScreen->damageScreen (); | 77 | cScreen->damageScreen (); |
92 | @@ -107,7 +107,6 @@ | |||
93 | 107 | clickTime = 0; | 107 | clickTime = 0; |
94 | 108 | 108 | ||
95 | 109 | dndState = DnDNone; | 109 | dndState = DnDNone; |
96 | 110 | dndWindow = NULL; | ||
97 | 111 | 110 | ||
98 | 112 | selectedVp = screen->vp (); | 111 | selectedVp = screen->vp (); |
99 | 113 | origVp = screen->vp (); | 112 | origVp = screen->vp (); |
100 | @@ -150,7 +149,6 @@ | |||
101 | 150 | vpUpdateMode = VPUpdateMouseOver; | 149 | vpUpdateMode = VPUpdateMouseOver; |
102 | 151 | 150 | ||
103 | 152 | dndState = DnDNone; | 151 | dndState = DnDNone; |
104 | 153 | dndWindow = NULL; | ||
105 | 154 | 152 | ||
106 | 155 | screen->removeAction (&optionGetDndButton ()); | 153 | screen->removeAction (&optionGetDndButton ()); |
107 | 156 | screen->removeAction (&optionGetExitButton ()); | 154 | screen->removeAction (&optionGetExitButton ()); |
108 | @@ -263,53 +261,39 @@ | |||
109 | 263 | void | 261 | void |
110 | 264 | ExpoScreen::finishWindowMovement () | 262 | ExpoScreen::finishWindowMovement () |
111 | 265 | { | 263 | { |
159 | 266 | dndWindow->syncPosition (); | 264 | foreach (CompWindow *dndWindow, dndWindows) |
160 | 267 | dndWindow->ungrabNotify (); | 265 | { |
161 | 268 | 266 | if (dndWindow->grabbed ()) | |
162 | 269 | screen->moveViewport (screen->vp ().x () - selectedVp.x (), | 267 | { |
163 | 270 | screen->vp ().y () - selectedVp.y (), true); | 268 | dndWindow->syncPosition (); |
164 | 271 | 269 | dndWindow->ungrabNotify (); | |
165 | 272 | /* update saved window attributes in case we moved the | 270 | |
166 | 273 | window to a new viewport */ | 271 | screen->updateGrab (grabIndex, None); |
167 | 274 | if (dndWindow->saveMask () & CWX) | 272 | |
168 | 275 | { | 273 | screen->moveViewport (screen->vp ().x () - selectedVp.x (), |
169 | 276 | dndWindow->saveWc ().x = dndWindow->saveWc ().x % screen->width (); | 274 | screen->vp ().y () - selectedVp.y (), true); |
170 | 277 | if (dndWindow->saveWc ().x < 0) | 275 | |
171 | 278 | dndWindow->saveWc ().x += screen->width (); | 276 | /* update saved window attributes in case we moved the |
172 | 279 | } | 277 | window to a new viewport */ |
173 | 280 | if (dndWindow->saveMask () & CWY) | 278 | if (dndWindow->saveMask () & CWX) |
174 | 281 | { | 279 | { |
175 | 282 | dndWindow->saveWc ().y = dndWindow->saveWc ().y % screen->height (); | 280 | dndWindow->saveWc ().x = dndWindow->saveWc ().x % screen->width (); |
176 | 283 | if (dndWindow->saveWc ().y < 0) | 281 | if (dndWindow->saveWc ().x < 0) |
177 | 284 | dndWindow->saveWc ().y += screen->height (); | 282 | dndWindow->saveWc ().x += screen->width (); |
178 | 285 | } | 283 | } |
179 | 286 | 284 | if (dndWindow->saveMask () & CWY) | |
180 | 287 | /* update window attibutes to make sure a moved maximized window | 285 | { |
181 | 288 | is properly snapped to the work area */ | 286 | dndWindow->saveWc ().y = dndWindow->saveWc ().y % screen->height (); |
182 | 289 | if (dndWindow->state () & MAXIMIZE_STATE) | 287 | if (dndWindow->saveWc ().y < 0) |
183 | 290 | dndWindow->updateAttributes (CompStackingUpdateModeNone); | 288 | dndWindow->saveWc ().y += screen->height (); |
184 | 291 | 289 | } | |
185 | 292 | #if 0 /* FIXME: obsolete in the meantime? */ | 290 | |
186 | 293 | { | 291 | /* update window attibutes to make sure a moved maximized window |
187 | 294 | int lastOutput; | 292 | is properly snapped to the work area */ |
188 | 295 | int centerX, centerY; | 293 | if (dndWindow->state () & MAXIMIZE_STATE) |
189 | 296 | 294 | dndWindow->updateAttributes (CompStackingUpdateModeNone); | |
190 | 297 | /* make sure we snap to the correct output */ | 295 | } |
191 | 298 | lastOutput = s->currentOutputDev; | 296 | } |
145 | 299 | centerX = (WIN_X (w) + WIN_W (w) / 2) % s->width; | ||
146 | 300 | if (centerX < 0) | ||
147 | 301 | centerX += s->width; | ||
148 | 302 | centerY = (WIN_Y (w) + WIN_H (w) / 2) % s->height; | ||
149 | 303 | if (centerY < 0) | ||
150 | 304 | centerY += s->height; | ||
151 | 305 | |||
152 | 306 | s->currentOutputDev = outputDeviceForPoint (s, centerX, centerY); | ||
153 | 307 | |||
154 | 308 | updateWindowAttributes (w, CompStackingUpdateModeNone); | ||
155 | 309 | |||
156 | 310 | s->currentOutputDev = lastOutput; | ||
157 | 311 | } | ||
158 | 312 | #endif | ||
192 | 313 | } | 297 | } |
193 | 314 | 298 | ||
194 | 315 | void | 299 | void |
195 | @@ -380,6 +364,26 @@ | |||
196 | 380 | screen->handleEvent (event); | 364 | screen->handleEvent (event); |
197 | 381 | } | 365 | } |
198 | 382 | 366 | ||
199 | 367 | bool | ||
200 | 368 | ExpoScreen::windowsOnVp (CompPoint &p) | ||
201 | 369 | { | ||
202 | 370 | foreach (CompWindow *w, screen->clientList (true)) | ||
203 | 371 | { | ||
204 | 372 | CompPoint viewport; | ||
205 | 373 | |||
206 | 374 | screen->viewportForGeometry (w->geometry (), viewport); | ||
207 | 375 | |||
208 | 376 | if (viewport == p&& | ||
209 | 377 | w->type () != CompWindowTypeDesktopMask && | ||
210 | 378 | w->type () != CompWindowTypeDockMask) | ||
211 | 379 | { | ||
212 | 380 | return true; | ||
213 | 381 | } | ||
214 | 382 | } | ||
215 | 383 | |||
216 | 384 | return false; | ||
217 | 385 | } | ||
218 | 386 | |||
219 | 383 | void | 387 | void |
220 | 384 | ExpoScreen::preparePaint (int msSinceLastPaint) | 388 | ExpoScreen::preparePaint (int msSinceLastPaint) |
221 | 385 | { | 389 | { |
222 | @@ -390,6 +394,29 @@ | |||
223 | 390 | else | 394 | else |
224 | 391 | expoCam = MAX (0.0, expoCam - val); | 395 | expoCam = MAX (0.0, expoCam - val); |
225 | 392 | 396 | ||
226 | 397 | if (dndState == DnDDuring) | ||
227 | 398 | { | ||
228 | 399 | foreach (CompWindow *w, dndWindows) | ||
229 | 400 | ExpoWindow::get (w)->dndOpacity = MIN (1.0, ExpoWindow::get (w)->dndOpacity + val); | ||
230 | 401 | } | ||
231 | 402 | else if (dndState == DnDNone) | ||
232 | 403 | { | ||
233 | 404 | CompWindowList::iterator it = dndWindows.begin (); | ||
234 | 405 | |||
235 | 406 | while (it != dndWindows.end ()) | ||
236 | 407 | { | ||
237 | 408 | ExpoWindow::get ((*it))->dndOpacity = MAX (0.0, ExpoWindow::get ((*it))->dndOpacity - val); | ||
238 | 409 | |||
239 | 410 | if (ExpoWindow::get ((*it))->dndOpacity <= 0.0f) | ||
240 | 411 | { | ||
241 | 412 | dndWindows.erase (it); | ||
242 | 413 | it = dndWindows.begin (); | ||
243 | 414 | } | ||
244 | 415 | else | ||
245 | 416 | it++; | ||
246 | 417 | } | ||
247 | 418 | } | ||
248 | 419 | |||
249 | 393 | if (expoCam) | 420 | if (expoCam) |
250 | 394 | { | 421 | { |
251 | 395 | unsigned int i, j, vp; | 422 | unsigned int i, j, vp; |
252 | @@ -408,8 +435,9 @@ | |||
253 | 408 | for (j = 0; j < (unsigned int) screen->vpSize ().height (); j++) | 435 | for (j = 0; j < (unsigned int) screen->vpSize ().height (); j++) |
254 | 409 | { | 436 | { |
255 | 410 | vp = (j * screen->vpSize ().width ()) + i; | 437 | vp = (j * screen->vpSize ().width ()) + i; |
256 | 438 | CompPoint vpPos = CompPoint (i, j); | ||
257 | 411 | 439 | ||
259 | 412 | if (CompPoint (i, j) == selectedVp) | 440 | if (windowsOnVp (vpPos)) |
260 | 413 | vpActivity[vp] = MIN (1.0, vpActivity[vp] + val); | 441 | vpActivity[vp] = MIN (1.0, vpActivity[vp] + val); |
261 | 414 | else | 442 | else |
262 | 415 | vpActivity[vp] = MAX (0.0, vpActivity[vp] - val); | 443 | vpActivity[vp] = MAX (0.0, vpActivity[vp] - val); |
263 | @@ -437,6 +465,7 @@ | |||
264 | 437 | screen->handleEventSetEnabled (this, enable); | 465 | screen->handleEventSetEnabled (this, enable); |
265 | 438 | cScreen->preparePaintSetEnabled (this, enable); | 466 | cScreen->preparePaintSetEnabled (this, enable); |
266 | 439 | cScreen->paintSetEnabled (this, enable); | 467 | cScreen->paintSetEnabled (this, enable); |
267 | 468 | cScreen->getWindowPaintListSetEnabled (this, false); | ||
268 | 440 | cScreen->donePaintSetEnabled (this, enable); | 469 | cScreen->donePaintSetEnabled (this, enable); |
269 | 441 | gScreen->glPaintOutputSetEnabled (this, enable); | 470 | gScreen->glPaintOutputSetEnabled (this, enable); |
270 | 442 | gScreen->glPaintTransformedOutputSetEnabled (this, enable); | 471 | gScreen->glPaintTransformedOutputSetEnabled (this, enable); |
271 | @@ -516,6 +545,11 @@ | |||
272 | 516 | foreach (float& vp, vpActivity) | 545 | foreach (float& vp, vpActivity) |
273 | 517 | if (vp != 0.0 && vp != 1.0) | 546 | if (vp != 0.0 && vp != 1.0) |
274 | 518 | cScreen->damageScreen (); | 547 | cScreen->damageScreen (); |
275 | 548 | |||
276 | 549 | foreach (CompWindow *w, dndWindows) | ||
277 | 550 | if (ExpoWindow::get (w)->dndOpacity != 0.0f && | ||
278 | 551 | ExpoWindow::get (w)->dndOpacity != 1.0f) | ||
279 | 552 | cScreen->damageScreen (); | ||
280 | 519 | } | 553 | } |
281 | 520 | 554 | ||
282 | 521 | if (grabIndex && expoCam <= 0.0f && !expoMode) | 555 | if (grabIndex && expoCam <= 0.0f && !expoMode) |
283 | @@ -530,10 +564,18 @@ | |||
284 | 530 | switch (dndState) { | 564 | switch (dndState) { |
285 | 531 | case DnDDuring: | 565 | case DnDDuring: |
286 | 532 | { | 566 | { |
291 | 533 | if (dndWindow) | 567 | if (dndWindows.size ()) |
292 | 534 | dndWindow->move (newCursor.x () - prevCursor.x (), | 568 | { |
293 | 535 | newCursor.y () - prevCursor.y (), | 569 | foreach (CompWindow *dndWindow, dndWindows) |
294 | 536 | optionGetExpoImmediateMove ()); | 570 | { |
295 | 571 | if (dndWindow->grabbed ()) | ||
296 | 572 | { | ||
297 | 573 | dndWindow->move (newCursor.x () - prevCursor.x (), | ||
298 | 574 | newCursor.y () - prevCursor.y (), | ||
299 | 575 | optionGetExpoImmediateMove ()); | ||
300 | 576 | } | ||
301 | 577 | } | ||
302 | 578 | } | ||
303 | 537 | 579 | ||
304 | 538 | prevCursor = newCursor; | 580 | prevCursor = newCursor; |
305 | 539 | cScreen->damageScreen (); | 581 | cScreen->damageScreen (); |
306 | @@ -598,12 +640,14 @@ | |||
307 | 598 | break; | 640 | break; |
308 | 599 | 641 | ||
309 | 600 | dndState = DnDDuring; | 642 | dndState = DnDDuring; |
311 | 601 | dndWindow = w; | 643 | dndWindows.push_back (w); |
312 | 602 | 644 | ||
313 | 603 | w->grabNotify (nx, ny, 0, | 645 | w->grabNotify (nx, ny, 0, |
314 | 604 | CompWindowGrabMoveMask | | 646 | CompWindowGrabMoveMask | |
315 | 605 | CompWindowGrabButtonMask); | 647 | CompWindowGrabButtonMask); |
316 | 606 | 648 | ||
317 | 649 | screen->updateGrab (grabIndex, mMoveCursor); | ||
318 | 650 | |||
319 | 607 | w->raise (); | 651 | w->raise (); |
320 | 608 | w->moveInputFocusTo (); | 652 | w->moveInputFocusTo (); |
321 | 609 | break; | 653 | break; |
322 | @@ -689,6 +733,121 @@ | |||
323 | 689 | } | 733 | } |
324 | 690 | 734 | ||
325 | 691 | void | 735 | void |
326 | 736 | ExpoScreen::paintViewport (const GLScreenPaintAttrib& attrib, | ||
327 | 737 | const GLMatrix& transform, | ||
328 | 738 | const CompRegion& region, | ||
329 | 739 | CompOutput *output, | ||
330 | 740 | unsigned int mask, | ||
331 | 741 | CompPoint vpPos, | ||
332 | 742 | GLVector &vpCamPos, | ||
333 | 743 | bool reflection) | ||
334 | 744 | { | ||
335 | 745 | GLMatrix sTransform (transform); | ||
336 | 746 | GLMatrix sTransform2, sTransform3; | ||
337 | 747 | float sx = (float) screen->width () / output->width (); | ||
338 | 748 | float sy = (float) screen->height () / output->height (); | ||
339 | 749 | float vpp; | ||
340 | 750 | float progress = sigmoidProgress (expoCam); | ||
341 | 751 | unsigned int vp; | ||
342 | 752 | CompPoint vpSize (screen->vpSize ().width (), screen->vpSize ().height ()); | ||
343 | 753 | |||
344 | 754 | const float gapY = optionGetVpDistance () * 0.1f * expoCam; | ||
345 | 755 | const float gapX = optionGetVpDistance () * 0.1f * screen->height () / | ||
346 | 756 | screen->width () * expoCam; | ||
347 | 757 | |||
348 | 758 | /* not sure this will work with different resolutions */ | ||
349 | 759 | sTransform.translate (0.0, MAX (0, vpPos.y ()) * -(sy + gapY), 0.0f); | ||
350 | 760 | |||
351 | 761 | sTransform2 = sTransform; | ||
352 | 762 | |||
353 | 763 | /* not sure this will work with different resolutions */ | ||
354 | 764 | if (optionGetDeform () != DeformCurve) | ||
355 | 765 | sTransform2.translate (MAX (0, vpPos.x ()) * (sx + gapX), 0.0f, 0.0); | ||
356 | 766 | |||
357 | 767 | |||
358 | 768 | if (optionGetExpoAnimation () == ExpoAnimationVortex) | ||
359 | 769 | sTransform2.rotate (360 * expoCam, | ||
360 | 770 | 0.0f, 1.0f, 2.0f * expoCam); | ||
361 | 771 | |||
362 | 772 | sTransform3 = sTransform2; | ||
363 | 773 | |||
364 | 774 | sTransform3.translate (output->x () / output->width (), | ||
365 | 775 | -output->y () / output->height (), 0.0); | ||
366 | 776 | |||
367 | 777 | cScreen->setWindowPaintOffset ((screen->vp ().x () - vpPos.x ()) * | ||
368 | 778 | screen->width (), | ||
369 | 779 | (screen->vp ().y () - vpPos.y ()) * | ||
370 | 780 | screen->height ()); | ||
371 | 781 | |||
372 | 782 | vp = (vpPos.y () * vpSize.x ()) + vpPos.x (); | ||
373 | 783 | |||
374 | 784 | vpp = (expoCam * vpActivity[vp]) + (1 - expoCam); | ||
375 | 785 | vpp = sigmoidProgress (vpp); | ||
376 | 786 | |||
377 | 787 | vpBrightness = vpp + ((1.0 - vpp) * | ||
378 | 788 | optionGetVpBrightness () / 100.0); | ||
379 | 789 | vpSaturation = vpp + ((1.0 - vpp) * | ||
380 | 790 | optionGetVpSaturation () / 100.0); | ||
381 | 791 | |||
382 | 792 | paintingVp = vpPos; | ||
383 | 793 | |||
384 | 794 | if (optionGetDeform () == DeformCurve) | ||
385 | 795 | { | ||
386 | 796 | float rotateX; | ||
387 | 797 | |||
388 | 798 | sTransform3.translate (-vpCamPos[GLVector::x], 0.0f, | ||
389 | 799 | curveDistance - DEFAULT_Z_CAMERA); | ||
390 | 800 | |||
391 | 801 | rotateX = -vpPos.x () + interpolate (((float) vpSize.x () / 2.0) - 0.5, | ||
392 | 802 | screen->vp ().x (), progress); | ||
393 | 803 | |||
394 | 804 | sTransform3.rotate (curveAngle * rotateX, 0.0, 1.0, 0.0); | ||
395 | 805 | |||
396 | 806 | sTransform3.translate (vpCamPos[GLVector::x], 0.0f, | ||
397 | 807 | DEFAULT_Z_CAMERA - curveDistance); | ||
398 | 808 | } | ||
399 | 809 | |||
400 | 810 | cScreen->getWindowPaintListSetEnabled (this, paintingDndWindow); | ||
401 | 811 | |||
402 | 812 | gScreen->glPaintTransformedOutput (attrib, sTransform3, | ||
403 | 813 | screen->region (), output, | ||
404 | 814 | mask); | ||
405 | 815 | |||
406 | 816 | cScreen->getWindowPaintListSetEnabled (this, !paintingDndWindow); | ||
407 | 817 | |||
408 | 818 | if (!reflection && !paintingDndWindow) | ||
409 | 819 | { | ||
410 | 820 | int cursor[2] = { pointerX, pointerY }; | ||
411 | 821 | |||
412 | 822 | invertTransformedVertex (attrib, sTransform3, | ||
413 | 823 | output, cursor); | ||
414 | 824 | |||
415 | 825 | if ((cursor[0] > 0) && (cursor[0] < (int) screen->width ()) && | ||
416 | 826 | (cursor[1] > 0) && (cursor[1] < (int) screen->height ())) | ||
417 | 827 | { | ||
418 | 828 | newCursor.setX (vpPos.x () * screen->width () + cursor[0]); | ||
419 | 829 | newCursor.setY (vpPos.y () * screen->height () + cursor[1]); | ||
420 | 830 | |||
421 | 831 | if (anyClick || dndState != DnDNone) | ||
422 | 832 | { | ||
423 | 833 | /* Used to save last viewport interaction was in */ | ||
424 | 834 | selectedVp = vpPos; | ||
425 | 835 | anyClick = false; | ||
426 | 836 | } | ||
427 | 837 | } | ||
428 | 838 | } | ||
429 | 839 | |||
430 | 840 | /* Calculate the current viewport size */ | ||
431 | 841 | int tl[2] = { 0, 0 }; | ||
432 | 842 | int br[2] = { screen->width (), screen->height () }; | ||
433 | 843 | |||
434 | 844 | invertTransformedVertex (attrib, sTransform3, output, tl); | ||
435 | 845 | invertTransformedVertex (attrib, sTransform3, output, br); | ||
436 | 846 | |||
437 | 847 | viewport_size = CompSize (br[0] - tl[0], br[1] - tl[1]); | ||
438 | 848 | } | ||
439 | 849 | |||
440 | 850 | void | ||
441 | 692 | ExpoScreen::paintWall (const GLScreenPaintAttrib& attrib, | 851 | ExpoScreen::paintWall (const GLScreenPaintAttrib& attrib, |
442 | 693 | const GLMatrix& transform, | 852 | const GLMatrix& transform, |
443 | 694 | const CompRegion& region, | 853 | const CompRegion& region, |
444 | @@ -697,13 +856,11 @@ | |||
445 | 697 | bool reflection) | 856 | bool reflection) |
446 | 698 | { | 857 | { |
447 | 699 | GLMatrix sTransformW, sTransform (transform); | 858 | GLMatrix sTransformW, sTransform (transform); |
448 | 700 | int i, j, vp; | ||
449 | 701 | GLenum oldFilter = gScreen->textureFilter (); | 859 | GLenum oldFilter = gScreen->textureFilter (); |
453 | 702 | 860 | float sx = (float) screen->width () / output->width (); | |
454 | 703 | float sx = (float) screen->width () / output->width (); | 861 | float sy = (float) screen->height () / output->height (); |
452 | 704 | float sy = (float) screen->height () / output->height (); | ||
455 | 705 | float biasZ; | 862 | float biasZ; |
457 | 706 | float oScale, rotation = 0.0f, progress, vpp; | 863 | float oScale, rotation = 0.0f, progress; |
458 | 707 | float aspectX = 1.0f, aspectY = 1.0f; | 864 | float aspectX = 1.0f, aspectY = 1.0f; |
459 | 708 | GLVector cam; | 865 | GLVector cam; |
460 | 709 | CompPoint vpSize (screen->vpSize ().width (), screen->vpSize ().height ()); | 866 | CompPoint vpSize (screen->vpSize ().width (), screen->vpSize ().height ()); |
461 | @@ -833,10 +990,23 @@ | |||
462 | 833 | sTransform.rotate (rotation, 0.0f, 1.0f, 0.0f); | 990 | sTransform.rotate (rotation, 0.0f, 1.0f, 0.0f); |
463 | 834 | sTransform.scale (aspectX, aspectY, 1.0); | 991 | sTransform.scale (aspectX, aspectY, 1.0); |
464 | 835 | 992 | ||
469 | 836 | float xoffset = ((vpSize.x () * sx) / ((float) screen->width ()) * optionGetXOffset ()) * sigmoidProgress (expoCam); | 993 | float xoffset = 0.0; |
470 | 837 | float yoffset = ((vpSize.y () * sy) / ((float) screen->height ()) * optionGetYOffset ()) * sigmoidProgress (expoCam); | 994 | float yoffset = 0.0; |
471 | 838 | float xadjs = 1.0f - ((float) optionGetXOffset () / (float) screen->width ()) * sigmoidProgress (expoCam); | 995 | float xadjs = 1.0f; |
472 | 839 | float yadjs = 1.0f - ((float) optionGetYOffset () / (float) screen->height ()) * sigmoidProgress (expoCam); | 996 | float yadjs = 1.0f; |
473 | 997 | |||
474 | 998 | if (output->left () == 0) | ||
475 | 999 | { | ||
476 | 1000 | xoffset = ((vpSize.x () * sx) / ((float) output->width ()) * (optionGetXOffset ()) * sigmoidProgress (expoCam)); | ||
477 | 1001 | xadjs = 1.0f - ((float) (optionGetXOffset ()) / (float) (output->width ())) * sigmoidProgress (expoCam); | ||
478 | 1002 | } | ||
479 | 1003 | |||
480 | 1004 | if (output->top () == 0) | ||
481 | 1005 | { | ||
482 | 1006 | yoffset = ((vpSize.y () * sy) / ((float) output->height ()) * (optionGetYOffset ()) * sigmoidProgress (expoCam)); | ||
483 | 1007 | |||
484 | 1008 | yadjs = 1.0f - ((float) (optionGetYOffset ()) / (float) output->height ()) * sigmoidProgress (expoCam); | ||
485 | 1009 | } | ||
486 | 840 | 1010 | ||
487 | 841 | /* translate expo to center */ | 1011 | /* translate expo to center */ |
488 | 842 | sTransform.translate (vpSize.x () * sx * -0.5 + xoffset, | 1012 | sTransform.translate (vpSize.x () * sx * -0.5 + xoffset, |
489 | @@ -865,89 +1035,29 @@ | |||
490 | 865 | 1035 | ||
491 | 866 | expoActive = true; | 1036 | expoActive = true; |
492 | 867 | 1037 | ||
494 | 868 | for (j = 0; j < vpSize.y (); j++) | 1038 | for (int j = 0; j < screen->vpSize ().height (); j++) |
495 | 1039 | for (int i = 0; i < screen->vpSize().width (); i++) | ||
496 | 1040 | paintViewport (attrib, sTransform, region, output, mask, CompPoint (i, j), vpCamPos, reflection); | ||
497 | 1041 | |||
498 | 1042 | paintingDndWindow = true; | ||
499 | 1043 | |||
500 | 1044 | foreach (CompWindow *dndWindow, dndWindows) | ||
501 | 869 | { | 1045 | { |
581 | 870 | GLMatrix sTransform2 (sTransform), sTransform3; | 1046 | CompPoint vp; |
582 | 871 | 1047 | ||
583 | 872 | for (i = 0; i < vpSize.x (); i++) | 1048 | screen->viewportForGeometry (dndWindow->geometry (), vp); |
584 | 873 | { | 1049 | |
585 | 874 | if (optionGetExpoAnimation () == ExpoAnimationVortex) | 1050 | while (vp.x () < 0) |
586 | 875 | sTransform2.rotate (360 * expoCam, | 1051 | vp.setX (screen->vpSize ().width () + vp.x ()); |
587 | 876 | 0.0f, 1.0f, 2.0f * expoCam); | 1052 | |
588 | 877 | 1053 | while (vp.y () < 0) | |
589 | 878 | sTransform3 = sTransform2; | 1054 | vp.setY (screen->vpSize ().height () + vp.y ()); |
590 | 879 | 1055 | ||
591 | 880 | sTransform3.translate (output->x () / output->width (), | 1056 | paintViewport (attrib, sTransform, infiniteRegion, output, mask, vp, vpCamPos, reflection); |
513 | 881 | -output->y () / output->height (), 0.0); | ||
514 | 882 | |||
515 | 883 | cScreen->setWindowPaintOffset ((screen->vp ().x () - i) * | ||
516 | 884 | screen->width (), | ||
517 | 885 | (screen->vp ().y () - j) * | ||
518 | 886 | screen->height ()); | ||
519 | 887 | |||
520 | 888 | vp = (j * vpSize.x ()) + i; | ||
521 | 889 | |||
522 | 890 | vpp = (expoCam * vpActivity[vp]) + (1 - expoCam); | ||
523 | 891 | vpp = sigmoidProgress (vpp); | ||
524 | 892 | |||
525 | 893 | vpBrightness = vpp + ((1.0 - vpp) * | ||
526 | 894 | optionGetVpBrightness () / 100.0); | ||
527 | 895 | vpSaturation = vpp + ((1.0 - vpp) * | ||
528 | 896 | optionGetVpSaturation () / 100.0); | ||
529 | 897 | |||
530 | 898 | paintingVp.set (i, j); | ||
531 | 899 | |||
532 | 900 | if (optionGetDeform () == DeformCurve) | ||
533 | 901 | { | ||
534 | 902 | float rotateX; | ||
535 | 903 | |||
536 | 904 | sTransform3.translate (-vpCamPos[GLVector::x], 0.0f, | ||
537 | 905 | curveDistance - DEFAULT_Z_CAMERA); | ||
538 | 906 | |||
539 | 907 | rotateX = -i + interpolate (((float) vpSize.x () / 2.0) - 0.5, | ||
540 | 908 | screen->vp ().x (), progress); | ||
541 | 909 | |||
542 | 910 | sTransform3.rotate (curveAngle * rotateX, 0.0, 1.0, 0.0); | ||
543 | 911 | |||
544 | 912 | sTransform3.translate (vpCamPos[GLVector::x], 0.0f, | ||
545 | 913 | DEFAULT_Z_CAMERA - curveDistance); | ||
546 | 914 | } | ||
547 | 915 | |||
548 | 916 | gScreen->glPaintTransformedOutput (attrib, sTransform3, | ||
549 | 917 | screen->region (), output, | ||
550 | 918 | mask); | ||
551 | 919 | |||
552 | 920 | if (!reflection) | ||
553 | 921 | { | ||
554 | 922 | int cursor[2] = { pointerX, pointerY }; | ||
555 | 923 | |||
556 | 924 | invertTransformedVertex (attrib, sTransform3, | ||
557 | 925 | output, cursor); | ||
558 | 926 | |||
559 | 927 | if ((cursor[0] > 0) && (cursor[0] < (int) screen->width ()) && | ||
560 | 928 | (cursor[1] > 0) && (cursor[1] < (int) screen->height ())) | ||
561 | 929 | { | ||
562 | 930 | newCursor.setX (i * screen->width () + cursor[0]); | ||
563 | 931 | newCursor.setY (j * screen->height () + cursor[1]); | ||
564 | 932 | |||
565 | 933 | if (anyClick || dndState != DnDNone) | ||
566 | 934 | { | ||
567 | 935 | /* Used to save last viewport interaction was in */ | ||
568 | 936 | selectedVp.set (i, j); | ||
569 | 937 | anyClick = false; | ||
570 | 938 | } | ||
571 | 939 | } | ||
572 | 940 | } | ||
573 | 941 | |||
574 | 942 | /* not sure this will work with different resolutions */ | ||
575 | 943 | if (optionGetDeform () != DeformCurve) | ||
576 | 944 | sTransform2.translate (sx + gapX, 0.0f, 0.0); | ||
577 | 945 | } | ||
578 | 946 | |||
579 | 947 | /* not sure this will work with different resolutions */ | ||
580 | 948 | sTransform.translate (0.0, -(sy + gapY), 0.0f); | ||
592 | 949 | } | 1057 | } |
593 | 950 | 1058 | ||
594 | 1059 | paintingDndWindow = false; | ||
595 | 1060 | |||
596 | 951 | glNormal3f (0.0, 0.0, -1.0); | 1061 | glNormal3f (0.0, 0.0, -1.0); |
597 | 952 | 1062 | ||
598 | 953 | if (reflection) | 1063 | if (reflection) |
599 | @@ -1025,6 +1135,12 @@ | |||
600 | 1025 | gScreen->setTextureFilter (oldFilter); | 1135 | gScreen->setTextureFilter (oldFilter); |
601 | 1026 | } | 1136 | } |
602 | 1027 | 1137 | ||
603 | 1138 | const CompWindowList & | ||
604 | 1139 | ExpoScreen::getWindowPaintList () | ||
605 | 1140 | { | ||
606 | 1141 | return dndWindows; | ||
607 | 1142 | } | ||
608 | 1143 | |||
609 | 1028 | bool | 1144 | bool |
610 | 1029 | ExpoScreen::glPaintOutput (const GLScreenPaintAttrib& attrib, | 1145 | ExpoScreen::glPaintOutput (const GLScreenPaintAttrib& attrib, |
611 | 1030 | const GLMatrix& transform, | 1146 | const GLMatrix& transform, |
612 | @@ -1079,6 +1195,11 @@ | |||
613 | 1079 | const CompRegion& region, | 1195 | const CompRegion& region, |
614 | 1080 | unsigned int mask) | 1196 | unsigned int mask) |
615 | 1081 | { | 1197 | { |
616 | 1198 | GLMatrix wTransform (transform); | ||
617 | 1199 | CompPoint vp; | ||
618 | 1200 | |||
619 | 1201 | screen->viewportForGeometry (window->geometry (), vp); | ||
620 | 1202 | |||
621 | 1082 | if (eScreen->expoCam == 0.0f) | 1203 | if (eScreen->expoCam == 0.0f) |
622 | 1083 | return gWindow->glDraw (transform, fragment, region, mask); | 1204 | return gWindow->glDraw (transform, fragment, region, mask); |
623 | 1084 | 1205 | ||
624 | @@ -1107,8 +1228,11 @@ | |||
625 | 1107 | } | 1228 | } |
626 | 1108 | } | 1229 | } |
627 | 1109 | 1230 | ||
630 | 1110 | fA.setBrightness (fragment.getBrightness () * eScreen->vpBrightness); | 1231 | if (vp == eScreen->paintingVp || window->onAllViewports ()) |
631 | 1111 | fA.setSaturation (fragment.getSaturation () * eScreen->vpSaturation); | 1232 | { |
632 | 1233 | fA.setBrightness (fragment.getBrightness () * eScreen->vpBrightness); | ||
633 | 1234 | fA.setSaturation (fragment.getSaturation () * eScreen->vpSaturation); | ||
634 | 1235 | } | ||
635 | 1112 | } | 1236 | } |
636 | 1113 | else | 1237 | else |
637 | 1114 | { | 1238 | { |
638 | @@ -1119,7 +1243,82 @@ | |||
639 | 1119 | (1 - sigmoidProgress (eScreen->expoCam))); | 1243 | (1 - sigmoidProgress (eScreen->expoCam))); |
640 | 1120 | } | 1244 | } |
641 | 1121 | 1245 | ||
643 | 1122 | return gWindow->glDraw (transform, fA, region, mask); | 1246 | bool status = gWindow->glDraw (wTransform, fA, region, mask); |
644 | 1247 | |||
645 | 1248 | if (window->type () & CompWindowTypeDesktopMask) | ||
646 | 1249 | { | ||
647 | 1250 | /* We want to set the geometry of the polka dots to the window | ||
648 | 1251 | * region */ | ||
649 | 1252 | CompRegion reg = CompRegion (0, 0, window->width (), window->height ()); | ||
650 | 1253 | |||
651 | 1254 | foreach(GLTexture * tex, eScreen->polkadots_texture) | ||
652 | 1255 | { | ||
653 | 1256 | GLTexture::MatrixList matl; | ||
654 | 1257 | GLTexture::Matrix mat = tex->matrix(); | ||
655 | 1258 | CompRegion paintRegion(region); | ||
656 | 1259 | |||
657 | 1260 | /* We can reset the window geometry since it will be | ||
658 | 1261 | * re-added later */ | ||
659 | 1262 | gWindow->geometry().reset(); | ||
660 | 1263 | |||
661 | 1264 | float xScale = screen->width () / (float) eScreen->viewport_size.width (); | ||
662 | 1265 | float yScale = screen->height () / (float) eScreen->viewport_size.height (); | ||
663 | 1266 | |||
664 | 1267 | mat.xx *= xScale; | ||
665 | 1268 | mat.yy *= yScale; | ||
666 | 1269 | |||
667 | 1270 | /* Not sure what this does, but it is necessary | ||
668 | 1271 | * (adjusts for scale?) */ | ||
669 | 1272 | mat.x0 -= mat.xx * reg.boundingRect().x1(); | ||
670 | 1273 | mat.y0 -= mat.yy * reg.boundingRect().y1(); | ||
671 | 1274 | |||
672 | 1275 | matl.push_back(mat); | ||
673 | 1276 | |||
674 | 1277 | if (mask & PAINT_WINDOW_TRANSFORMED_MASK) | ||
675 | 1278 | paintRegion = infiniteRegion; | ||
676 | 1279 | |||
677 | 1280 | /* Now allow plugins to mess with the geometry of our | ||
678 | 1281 | * dim (so we get a nice render for things like | ||
679 | 1282 | * wobbly etc etc */ | ||
680 | 1283 | gWindow->glAddGeometry(matl, reg, paintRegion); | ||
681 | 1284 | |||
682 | 1285 | /* Did it succeed? */ | ||
683 | 1286 | if (gWindow->geometry().vertices) | ||
684 | 1287 | { | ||
685 | 1288 | unsigned int glDrawTextureIndex = gWindow->glDrawTextureGetCurrentIndex(); | ||
686 | 1289 | fA.setOpacity (fragment.getOpacity () * (((1.0 - eScreen->vpBrightness) + (1.0 - eScreen->vpSaturation) / 2.0))); | ||
687 | 1290 | /* Texture rendering set-up */ | ||
688 | 1291 | eScreen->gScreen->setTexEnvMode(GL_MODULATE); | ||
689 | 1292 | glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); | ||
690 | 1293 | /* Draw the dim texture with all of it's modified | ||
691 | 1294 | * geometry glory */ | ||
692 | 1295 | gWindow->glDrawTextureSetCurrentIndex(MAXSHORT); | ||
693 | 1296 | gWindow->glDrawTexture(tex, fA, mask | PAINT_WINDOW_BLEND_MASK | ||
694 | 1297 | | PAINT_WINDOW_TRANSLUCENT_MASK | | ||
695 | 1298 | PAINT_WINDOW_TRANSFORMED_MASK); | ||
696 | 1299 | gWindow->glDrawTextureSetCurrentIndex(glDrawTextureIndex); | ||
697 | 1300 | /* Texture rendering tear-down */ | ||
698 | 1301 | glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); | ||
699 | 1302 | eScreen->gScreen->setTexEnvMode(GL_REPLACE); | ||
700 | 1303 | } | ||
701 | 1304 | } | ||
702 | 1305 | |||
703 | 1306 | /* Paint the outline */ | ||
704 | 1307 | if (mGlowQuads && eScreen->paintingVp == eScreen->selectedVp) | ||
705 | 1308 | { | ||
706 | 1309 | if (region.numRects ()) | ||
707 | 1310 | { | ||
708 | 1311 | /* reset geometry and paint */ | ||
709 | 1312 | gWindow->geometry ().reset (); | ||
710 | 1313 | |||
711 | 1314 | paintGlow (fragment, infiniteRegion, mask); | ||
712 | 1315 | } | ||
713 | 1316 | } | ||
714 | 1317 | |||
715 | 1318 | } | ||
716 | 1319 | |||
717 | 1320 | return status; | ||
718 | 1321 | |||
719 | 1123 | } | 1322 | } |
720 | 1124 | 1323 | ||
721 | 1125 | #define EXPO_GRID_SIZE 100 | 1324 | #define EXPO_GRID_SIZE 100 |
722 | @@ -1261,6 +1460,12 @@ | |||
723 | 1261 | const CompRegion& region, | 1460 | const CompRegion& region, |
724 | 1262 | unsigned int mask) | 1461 | unsigned int mask) |
725 | 1263 | { | 1462 | { |
726 | 1463 | GLMatrix wTransform (transform); | ||
727 | 1464 | GLWindowPaintAttrib wAttrib (attrib); | ||
728 | 1465 | CompPoint vp; | ||
729 | 1466 | |||
730 | 1467 | screen->viewportForGeometry (window->geometry (), vp); | ||
731 | 1468 | |||
732 | 1264 | if (eScreen->expoActive) | 1469 | if (eScreen->expoActive) |
733 | 1265 | { | 1470 | { |
734 | 1266 | float opacity = 1.0; | 1471 | float opacity = 1.0; |
735 | @@ -1294,9 +1499,52 @@ | |||
736 | 1294 | 1499 | ||
737 | 1295 | if (opacity <= 0) | 1500 | if (opacity <= 0) |
738 | 1296 | mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK; | 1501 | mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK; |
742 | 1297 | } | 1502 | else |
743 | 1298 | 1503 | wAttrib.opacity = wAttrib.opacity * opacity; | |
744 | 1299 | return gWindow->glPaint (attrib, transform, region, mask); | 1504 | } |
745 | 1505 | |||
746 | 1506 | /* Stretch maximized windows a little so that you don't | ||
747 | 1507 | * have an awkward gap */ | ||
748 | 1508 | if (window->state () & MAXIMIZE_STATE) | ||
749 | 1509 | { | ||
750 | 1510 | CompOutput *o = &screen->outputDevs ()[screen->outputDeviceForGeometry(window->geometry())]; | ||
751 | 1511 | float yS = 1.0 + ((o->height () / (float) window->height ()) - 1.0f) * sigmoidProgress (eScreen->expoCam); | ||
752 | 1512 | wTransform.translate (window->x () + window->width () / 2, | ||
753 | 1513 | window->y () + window->height (), | ||
754 | 1514 | 0.0f); | ||
755 | 1515 | wTransform.scale (1.0f, yS, 1.0f); | ||
756 | 1516 | wTransform.translate (-(window->x () + window->width () / 2), | ||
757 | 1517 | -(window->y () + window->height ()), | ||
758 | 1518 | 0.0f); | ||
759 | 1519 | |||
760 | 1520 | if (eScreen->paintingVp != vp) | ||
761 | 1521 | mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK; | ||
762 | 1522 | |||
763 | 1523 | mask |= PAINT_WINDOW_TRANSFORMED_MASK; | ||
764 | 1524 | } | ||
765 | 1525 | |||
766 | 1526 | if (std::find (eScreen->dndWindows.begin(), eScreen->dndWindows.end (), window) != eScreen->dndWindows.end ()) | ||
767 | 1527 | { | ||
768 | 1528 | if (!eScreen->paintingDndWindow) | ||
769 | 1529 | { | ||
770 | 1530 | if ((1.0f - dndOpacity) <= 0.0f || (eScreen->paintingVp == vp && | ||
771 | 1531 | eScreen->dndState != ExpoScreen::DnDNone)) | ||
772 | 1532 | mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK; | ||
773 | 1533 | else if (!window->region ().subtracted (screen->region ()).isEmpty () && | ||
774 | 1534 | eScreen->paintingVp != vp) | ||
775 | 1535 | wAttrib.opacity = wAttrib.opacity * (1.0f - dndOpacity); | ||
776 | 1536 | } | ||
777 | 1537 | else | ||
778 | 1538 | { | ||
779 | 1539 | mask |= PAINT_WINDOW_TRANSFORMED_MASK; | ||
780 | 1540 | if (!window->region ().subtracted (screen->region ()).isEmpty ()) | ||
781 | 1541 | wAttrib.opacity = wAttrib.opacity * dndOpacity; | ||
782 | 1542 | } | ||
783 | 1543 | } | ||
784 | 1544 | |||
785 | 1545 | bool status = gWindow->glPaint (wAttrib, wTransform, region, mask); | ||
786 | 1546 | |||
787 | 1547 | return status; | ||
788 | 1300 | } | 1548 | } |
789 | 1301 | 1549 | ||
790 | 1302 | bool | 1550 | bool |
791 | @@ -1325,20 +1573,29 @@ | |||
792 | 1325 | expoActive (false), | 1573 | expoActive (false), |
793 | 1326 | expoMode (false), | 1574 | expoMode (false), |
794 | 1327 | dndState (DnDNone), | 1575 | dndState (DnDNone), |
796 | 1328 | dndWindow (NULL), | 1576 | dndWindows (0), |
797 | 1329 | origVp (s->vp ()), | 1577 | origVp (s->vp ()), |
798 | 1330 | selectedVp (s->vp ()), | 1578 | selectedVp (s->vp ()), |
799 | 1331 | vpUpdateMode (VPUpdateNone), | 1579 | vpUpdateMode (VPUpdateNone), |
800 | 1332 | clickTime (0), | 1580 | clickTime (0), |
801 | 1333 | doubleClick (false), | 1581 | doubleClick (false), |
802 | 1334 | vpNormals (360 * 3), | 1582 | vpNormals (360 * 3), |
804 | 1335 | grabIndex (0) | 1583 | grabIndex (0), |
805 | 1584 | paintingDndWindow (false), | ||
806 | 1585 | mGlowTextureProperties (&glowTextureProperties) | ||
807 | 1336 | { | 1586 | { |
808 | 1587 | CompString fname; | ||
809 | 1588 | CompString pname = "expo"; | ||
810 | 1589 | CompSize size; | ||
811 | 1590 | |||
812 | 1591 | |||
813 | 1337 | leftKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Left")); | 1592 | leftKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Left")); |
814 | 1338 | rightKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Right")); | 1593 | rightKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Right")); |
815 | 1339 | upKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Up")); | 1594 | upKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Up")); |
816 | 1340 | downKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Down")); | 1595 | downKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Down")); |
817 | 1341 | 1596 | ||
818 | 1597 | mMoveCursor = XCreateFontCursor (screen->dpy (), XC_fleur); | ||
819 | 1598 | |||
820 | 1342 | EXPOINITBIND (ExpoKey, doExpo); | 1599 | EXPOINITBIND (ExpoKey, doExpo); |
821 | 1343 | EXPOTERMBIND (ExpoKey, termExpo); | 1600 | EXPOTERMBIND (ExpoKey, termExpo); |
822 | 1344 | EXPOINITBIND (ExpoButton, doExpo); | 1601 | EXPOINITBIND (ExpoButton, doExpo); |
823 | @@ -1355,6 +1612,47 @@ | |||
824 | 1355 | ScreenInterface::setHandler (screen, false); | 1612 | ScreenInterface::setHandler (screen, false); |
825 | 1356 | CompositeScreenInterface::setHandler (cScreen, false); | 1613 | CompositeScreenInterface::setHandler (cScreen, false); |
826 | 1357 | GLScreenInterface::setHandler (gScreen, false); | 1614 | GLScreenInterface::setHandler (gScreen, false); |
827 | 1615 | |||
828 | 1616 | outline_texture = GLTexture::imageDataToTexture (mGlowTextureProperties->textureData, | ||
829 | 1617 | CompSize (mGlowTextureProperties->textureSize, | ||
830 | 1618 | mGlowTextureProperties->textureSize), | ||
831 | 1619 | GL_RGBA, GL_UNSIGNED_BYTE); | ||
832 | 1620 | fname = "texture_tile.png"; | ||
833 | 1621 | polkadots_texture = GLTexture::readImageToTexture (fname, pname, polkadots_texture_size); | ||
834 | 1622 | |||
835 | 1623 | if (polkadots_texture.empty ()) | ||
836 | 1624 | compLogMessage ("expo", CompLogLevelWarn, "failed to bind image to texture"); | ||
837 | 1625 | else | ||
838 | 1626 | { | ||
839 | 1627 | foreach (GLTexture *tex, polkadots_texture) | ||
840 | 1628 | { | ||
841 | 1629 | tex->enable (GLTexture::Good); | ||
842 | 1630 | glTexParameteri (tex->target (), GL_TEXTURE_WRAP_S, GL_REPEAT); | ||
843 | 1631 | glTexParameteri (tex->target (), GL_TEXTURE_WRAP_T, GL_REPEAT); | ||
844 | 1632 | tex->disable (); | ||
845 | 1633 | } | ||
846 | 1634 | } | ||
847 | 1635 | } | ||
848 | 1636 | |||
849 | 1637 | ExpoScreen::~ExpoScreen () | ||
850 | 1638 | { | ||
851 | 1639 | if (mMoveCursor) | ||
852 | 1640 | XFreeCursor (screen->dpy (), mMoveCursor); | ||
853 | 1641 | } | ||
854 | 1642 | |||
855 | 1643 | void | ||
856 | 1644 | ExpoWindow::resizeNotify(int dx, int dy, int dw, int dh) | ||
857 | 1645 | { | ||
858 | 1646 | window->resizeNotify (dx, dy, dw, dh); | ||
859 | 1647 | |||
860 | 1648 | /* mGlowQuads contains positional info, so we need to recalc that */ | ||
861 | 1649 | if (mGlowQuads) | ||
862 | 1650 | { | ||
863 | 1651 | /* FIXME: we need to find a more multitexture friendly way | ||
864 | 1652 | * of doing this */ | ||
865 | 1653 | GLTexture::Matrix tMat = eScreen->outline_texture.at (0)->matrix (); | ||
866 | 1654 | computeGlowQuads (&tMat); | ||
867 | 1655 | } | ||
868 | 1358 | } | 1656 | } |
869 | 1359 | 1657 | ||
870 | 1360 | ExpoWindow::ExpoWindow (CompWindow *w) : | 1658 | ExpoWindow::ExpoWindow (CompWindow *w) : |
871 | @@ -1362,10 +1660,28 @@ | |||
872 | 1362 | window (w), | 1660 | window (w), |
873 | 1363 | cWindow (CompositeWindow::get (w)), | 1661 | cWindow (CompositeWindow::get (w)), |
874 | 1364 | gWindow (GLWindow::get (w)), | 1662 | gWindow (GLWindow::get (w)), |
876 | 1365 | eScreen (ExpoScreen::get (screen)) | 1663 | eScreen (ExpoScreen::get (screen)), |
877 | 1664 | dndOpacity (0.0f), | ||
878 | 1665 | mGlowQuads (NULL) | ||
879 | 1366 | { | 1666 | { |
880 | 1367 | CompositeWindowInterface::setHandler (cWindow, false); | 1667 | CompositeWindowInterface::setHandler (cWindow, false); |
881 | 1368 | GLWindowInterface::setHandler (gWindow, false); | 1668 | GLWindowInterface::setHandler (gWindow, false); |
882 | 1669 | WindowInterface::setHandler (window, true); | ||
883 | 1670 | |||
884 | 1671 | if (window->type () & CompWindowTypeDesktopMask) | ||
885 | 1672 | { | ||
886 | 1673 | foreach (GLTexture *tex, eScreen->outline_texture) | ||
887 | 1674 | { | ||
888 | 1675 | GLTexture::Matrix mat = tex->matrix (); | ||
889 | 1676 | computeGlowQuads (&mat); | ||
890 | 1677 | } | ||
891 | 1678 | } | ||
892 | 1679 | } | ||
893 | 1680 | |||
894 | 1681 | ExpoWindow::~ExpoWindow () | ||
895 | 1682 | { | ||
896 | 1683 | eScreen->dndWindows.remove (window); | ||
897 | 1684 | computeGlowQuads (NULL); | ||
898 | 1369 | } | 1685 | } |
899 | 1370 | 1686 | ||
900 | 1371 | bool | 1687 | bool |
901 | 1372 | 1688 | ||
902 | === modified file 'src/expo.h' | |||
903 | --- src/expo.h 2011-09-01 14:33:30 +0000 | |||
904 | +++ src/expo.h 2011-09-15 12:36:24 +0000 | |||
905 | @@ -25,11 +25,21 @@ | |||
906 | 25 | 25 | ||
907 | 26 | #include <core/core.h> | 26 | #include <core/core.h> |
908 | 27 | #include <core/pluginclasshandler.h> | 27 | #include <core/pluginclasshandler.h> |
909 | 28 | #include <cairo.h> | ||
910 | 29 | #include <cairo-xlib-xrender.h> | ||
911 | 28 | 30 | ||
912 | 29 | #include <composite/composite.h> | 31 | #include <composite/composite.h> |
913 | 30 | #include <opengl/opengl.h> | 32 | #include <opengl/opengl.h> |
914 | 31 | 33 | ||
915 | 32 | #include "expo_options.h" | 34 | #include "expo_options.h" |
916 | 35 | #include "glow.h" | ||
917 | 36 | |||
918 | 37 | #define WIN_REAL_X(w) (w->x () - w->border ().left) | ||
919 | 38 | #define WIN_REAL_Y(w) (w->y () - w->border ().top) | ||
920 | 39 | #define WIN_REAL_WIDTH(w) (w->width () + 2 * w->geometry ().border () + \ | ||
921 | 40 | w->border ().left + w->border ().right) | ||
922 | 41 | #define WIN_REAL_HEIGHT(w) (w->height () + 2 * w->geometry ().border () + \ | ||
923 | 42 | w->border ().top + w->border ().bottom) | ||
924 | 33 | 43 | ||
925 | 34 | class ExpoScreen : | 44 | class ExpoScreen : |
926 | 35 | public ScreenInterface, | 45 | public ScreenInterface, |
927 | @@ -40,6 +50,7 @@ | |||
928 | 40 | { | 50 | { |
929 | 41 | public: | 51 | public: |
930 | 42 | ExpoScreen (CompScreen *); | 52 | ExpoScreen (CompScreen *); |
931 | 53 | ~ExpoScreen (); | ||
932 | 43 | 54 | ||
933 | 44 | void handleEvent (XEvent *); | 55 | void handleEvent (XEvent *); |
934 | 45 | 56 | ||
935 | @@ -53,6 +64,8 @@ | |||
936 | 53 | const GLMatrix&, const CompRegion&, | 64 | const GLMatrix&, const CompRegion&, |
937 | 54 | CompOutput *, unsigned int); | 65 | CompOutput *, unsigned int); |
938 | 55 | 66 | ||
939 | 67 | const CompWindowList & getWindowPaintList (); | ||
940 | 68 | |||
941 | 56 | bool dndInit (CompAction *, CompAction::State, CompOption::Vector&); | 69 | bool dndInit (CompAction *, CompAction::State, CompOption::Vector&); |
942 | 57 | bool dndFini (CompAction *, CompAction::State, CompOption::Vector&); | 70 | bool dndFini (CompAction *, CompAction::State, CompOption::Vector&); |
943 | 58 | bool doExpo (CompAction *, CompAction::State, CompOption::Vector&); | 71 | bool doExpo (CompAction *, CompAction::State, CompOption::Vector&); |
944 | @@ -61,6 +74,8 @@ | |||
945 | 61 | bool nextVp (CompAction *, CompAction::State, CompOption::Vector&); | 74 | bool nextVp (CompAction *, CompAction::State, CompOption::Vector&); |
946 | 62 | bool prevVp (CompAction *, CompAction::State, CompOption::Vector&); | 75 | bool prevVp (CompAction *, CompAction::State, CompOption::Vector&); |
947 | 63 | 76 | ||
948 | 77 | CompPoint currentViewport (); | ||
949 | 78 | |||
950 | 64 | typedef enum { | 79 | typedef enum { |
951 | 65 | DnDNone, | 80 | DnDNone, |
952 | 66 | DnDDuring, | 81 | DnDDuring, |
953 | @@ -81,7 +96,7 @@ | |||
954 | 81 | bool expoMode; | 96 | bool expoMode; |
955 | 82 | 97 | ||
956 | 83 | DnDState dndState; | 98 | DnDState dndState; |
958 | 84 | CompWindow *dndWindow; | 99 | CompWindowList dndWindows; |
959 | 85 | 100 | ||
960 | 86 | CompPoint prevCursor; | 101 | CompPoint prevCursor; |
961 | 87 | CompPoint newCursor; | 102 | CompPoint newCursor; |
962 | @@ -111,6 +126,17 @@ | |||
963 | 111 | 126 | ||
964 | 112 | CompScreen::GrabHandle grabIndex; | 127 | CompScreen::GrabHandle grabIndex; |
965 | 113 | 128 | ||
966 | 129 | GLTexture::List polkadots_texture; | ||
967 | 130 | CompSize polkadots_texture_size; | ||
968 | 131 | CompSize viewport_size; | ||
969 | 132 | |||
970 | 133 | GLTexture::List outline_texture; | ||
971 | 134 | CompSize outline_texture_size; | ||
972 | 135 | |||
973 | 136 | bool paintingDndWindow; | ||
974 | 137 | |||
975 | 138 | const GlowTextureProperties *mGlowTextureProperties; | ||
976 | 139 | |||
977 | 114 | private: | 140 | private: |
978 | 115 | void moveFocusViewport (int, int); | 141 | void moveFocusViewport (int, int); |
979 | 116 | void finishWindowMovement (); | 142 | void finishWindowMovement (); |
980 | @@ -121,22 +147,39 @@ | |||
981 | 121 | void paintWall (const GLScreenPaintAttrib&, const GLMatrix&, | 147 | void paintWall (const GLScreenPaintAttrib&, const GLMatrix&, |
982 | 122 | const CompRegion&, CompOutput *, unsigned int, bool); | 148 | const CompRegion&, CompOutput *, unsigned int, bool); |
983 | 123 | 149 | ||
984 | 150 | void paintViewport (const GLScreenPaintAttrib& attrib, | ||
985 | 151 | const GLMatrix& transform, | ||
986 | 152 | const CompRegion& region, | ||
987 | 153 | CompOutput *output, | ||
988 | 154 | unsigned int mask, | ||
989 | 155 | CompPoint vpPos, | ||
990 | 156 | GLVector &vpCamPos, | ||
991 | 157 | bool reflection); | ||
992 | 158 | |||
993 | 159 | bool windowsOnVp (CompPoint &p); | ||
994 | 160 | |||
995 | 124 | KeyCode leftKey; | 161 | KeyCode leftKey; |
996 | 125 | KeyCode rightKey; | 162 | KeyCode rightKey; |
997 | 126 | KeyCode upKey; | 163 | KeyCode upKey; |
998 | 127 | KeyCode downKey; | 164 | KeyCode downKey; |
999 | 165 | |||
1000 | 166 | Cursor mMoveCursor; | ||
1001 | 128 | }; | 167 | }; |
1002 | 129 | 168 | ||
1003 | 130 | class ExpoWindow : | 169 | class ExpoWindow : |
1004 | 131 | public CompositeWindowInterface, | 170 | public CompositeWindowInterface, |
1005 | 132 | public GLWindowInterface, | 171 | public GLWindowInterface, |
1006 | 172 | public WindowInterface, | ||
1007 | 133 | public PluginClassHandler<ExpoWindow, CompWindow> | 173 | public PluginClassHandler<ExpoWindow, CompWindow> |
1008 | 134 | { | 174 | { |
1009 | 135 | public: | 175 | public: |
1010 | 136 | ExpoWindow (CompWindow *); | 176 | ExpoWindow (CompWindow *); |
1011 | 177 | ~ExpoWindow (); | ||
1012 | 137 | 178 | ||
1013 | 138 | bool damageRect (bool, const CompRect&); | 179 | bool damageRect (bool, const CompRect&); |
1014 | 139 | 180 | ||
1015 | 181 | void resizeNotify (int dx, int dy, int dw, int dh); | ||
1016 | 182 | |||
1017 | 140 | bool glDraw (const GLMatrix&, GLFragment::Attrib&, | 183 | bool glDraw (const GLMatrix&, GLFragment::Attrib&, |
1018 | 141 | const CompRegion&, unsigned int); | 184 | const CompRegion&, unsigned int); |
1019 | 142 | bool glPaint (const GLWindowPaintAttrib&, const GLMatrix&, | 185 | bool glPaint (const GLWindowPaintAttrib&, const GLMatrix&, |
1020 | @@ -147,10 +190,22 @@ | |||
1021 | 147 | void glDrawTexture (GLTexture *, GLFragment::Attrib& attrib, | 190 | void glDrawTexture (GLTexture *, GLFragment::Attrib& attrib, |
1022 | 148 | unsigned int); | 191 | unsigned int); |
1023 | 149 | 192 | ||
1024 | 193 | void | ||
1025 | 194 | paintGlow (GLFragment::Attrib &attrib, | ||
1026 | 195 | const CompRegion &paintRegion, | ||
1027 | 196 | unsigned int mask); | ||
1028 | 197 | |||
1029 | 198 | void | ||
1030 | 199 | computeGlowQuads (GLTexture::Matrix *matrix); | ||
1031 | 200 | |||
1032 | 150 | CompWindow *window; | 201 | CompWindow *window; |
1033 | 151 | CompositeWindow *cWindow; | 202 | CompositeWindow *cWindow; |
1034 | 152 | GLWindow *gWindow; | 203 | GLWindow *gWindow; |
1035 | 153 | ExpoScreen *eScreen; | 204 | ExpoScreen *eScreen; |
1036 | 205 | |||
1037 | 206 | float dndOpacity; | ||
1038 | 207 | |||
1039 | 208 | GlowQuad *mGlowQuads; | ||
1040 | 154 | }; | 209 | }; |
1041 | 155 | 210 | ||
1042 | 156 | class ExpoPluginVTable : | 211 | class ExpoPluginVTable : |
1043 | 157 | 212 | ||
1044 | === added file 'src/glow.cpp' | |||
1045 | --- src/glow.cpp 1970-01-01 00:00:00 +0000 | |||
1046 | +++ src/glow.cpp 2011-09-15 12:36:24 +0000 | |||
1047 | @@ -0,0 +1,428 @@ | |||
1048 | 1 | /** | ||
1049 | 2 | * | ||
1050 | 3 | * Compiz group plugin | ||
1051 | 4 | * | ||
1052 | 5 | * glow.cpp | ||
1053 | 6 | * | ||
1054 | 7 | * Copyright : (C) 2006-2010 by Patrick Niklaus, Roi Cohen, | ||
1055 | 8 | * Danny Baumann, Sam Spilsbury | ||
1056 | 9 | * Authors: Patrick Niklaus <patrick.niklaus@googlemail.com> | ||
1057 | 10 | * Roi Cohen <roico.beryl@gmail.com> | ||
1058 | 11 | * Danny Baumann <maniac@opencompositing.org> | ||
1059 | 12 | * Sam Spilsbury <smspillaz@gmail.com> | ||
1060 | 13 | * | ||
1061 | 14 | * | ||
1062 | 15 | * This program is free software; you can redistribute it and/or | ||
1063 | 16 | * modify it under the terms of the GNU General Public License | ||
1064 | 17 | * as published by the Free Software Foundation; either version 2 | ||
1065 | 18 | * of the License, or (at your option) any later version. | ||
1066 | 19 | * | ||
1067 | 20 | * This program is distributed in the hope that it will be useful, | ||
1068 | 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1069 | 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1070 | 23 | * GNU General Public License for more details. | ||
1071 | 24 | * | ||
1072 | 25 | **/ | ||
1073 | 26 | |||
1074 | 27 | #include "expo.h" | ||
1075 | 28 | #include "group_glow.h" | ||
1076 | 29 | |||
1077 | 30 | const GlowTextureProperties glowTextureProperties = { | ||
1078 | 31 | /* GlowTextureRectangular */ | ||
1079 | 32 | glowTexRect, 32, 21 | ||
1080 | 33 | }; | ||
1081 | 34 | |||
1082 | 35 | /* | ||
1083 | 36 | * GroupWindow::paintGlow | ||
1084 | 37 | * | ||
1085 | 38 | * Takes our glow texture, stretches the appropriate positions in the glow texture, | ||
1086 | 39 | * adds those geometries (so plugins like wobby and deform this texture correctly) | ||
1087 | 40 | * and then draws the glow texture with this geometry (plugins like wobbly and friends | ||
1088 | 41 | * will automatically deform the texture based on our set geometry) | ||
1089 | 42 | */ | ||
1090 | 43 | |||
1091 | 44 | void | ||
1092 | 45 | ExpoWindow::paintGlow (GLFragment::Attrib &attrib, | ||
1093 | 46 | const CompRegion &paintRegion, | ||
1094 | 47 | unsigned int mask) | ||
1095 | 48 | { | ||
1096 | 49 | CompRegion reg; | ||
1097 | 50 | int i; | ||
1098 | 51 | |||
1099 | 52 | /* There are 8 glow parts of the glow texture which we wish to paint | ||
1100 | 53 | * separately with different transformations | ||
1101 | 54 | */ | ||
1102 | 55 | for (i = 0; i < NUM_GLOWQUADS; i++) | ||
1103 | 56 | { | ||
1104 | 57 | /* Using precalculated quads here */ | ||
1105 | 58 | reg = CompRegion (mGlowQuads[i].mBox); | ||
1106 | 59 | |||
1107 | 60 | if (reg.boundingRect ().x1 () < reg.boundingRect ().x2 () && | ||
1108 | 61 | reg.boundingRect ().y1 () < reg.boundingRect ().y2 ()) | ||
1109 | 62 | { | ||
1110 | 63 | GLTexture::MatrixList matl; | ||
1111 | 64 | reg = CompRegion (reg.boundingRect ().x1 (), | ||
1112 | 65 | reg.boundingRect ().y1 (), | ||
1113 | 66 | reg.boundingRect ().width (), | ||
1114 | 67 | reg.boundingRect ().height ()); | ||
1115 | 68 | |||
1116 | 69 | matl.push_back (mGlowQuads[i].mMatrix); | ||
1117 | 70 | gWindow->glAddGeometry (matl, reg, paintRegion); | ||
1118 | 71 | } | ||
1119 | 72 | } | ||
1120 | 73 | |||
1121 | 74 | /* If the geometry add succeeded */ | ||
1122 | 75 | if (gWindow->geometry ().vertices) | ||
1123 | 76 | { | ||
1124 | 77 | GLFragment::Attrib fAttrib (attrib); | ||
1125 | 78 | GLushort average; | ||
1126 | 79 | GLushort color[3] = {MAXSHORT, | ||
1127 | 80 | MAXSHORT, | ||
1128 | 81 | MAXSHORT}; | ||
1129 | 82 | |||
1130 | 83 | float alpha = (float) ExpoScreen::get (screen)->optionGetSelectedColorAlpha () / 65535.0f; | ||
1131 | 84 | |||
1132 | 85 | GLScreen::get (screen)->setTexEnvMode (GL_MODULATE); | ||
1133 | 86 | glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||
1134 | 87 | glColor4f (((float) ExpoScreen::get (screen)->optionGetSelectedColorRed () / 65535.0f) * alpha, | ||
1135 | 88 | ((float) ExpoScreen::get (screen)->optionGetSelectedColorGreen () / 65535.0f) * alpha, | ||
1136 | 89 | ((float) ExpoScreen::get (screen)->optionGetSelectedColorBlue () / 65535.0f) * alpha, | ||
1137 | 90 | alpha); | ||
1138 | 91 | |||
1139 | 92 | /* we use PAINT_WINDOW_TRANSFORMED_MASK here to force | ||
1140 | 93 | the usage of a good texture filter */ | ||
1141 | 94 | foreach (GLTexture *tex, ExpoScreen::get (screen)->outline_texture) | ||
1142 | 95 | { | ||
1143 | 96 | gWindow->glDrawTexture (tex, fAttrib, mask | | ||
1144 | 97 | PAINT_WINDOW_BLEND_MASK | | ||
1145 | 98 | PAINT_WINDOW_TRANSLUCENT_MASK | | ||
1146 | 99 | PAINT_WINDOW_TRANSFORMED_MASK); | ||
1147 | 100 | } | ||
1148 | 101 | |||
1149 | 102 | glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); | ||
1150 | 103 | GLScreen::get (screen)->setTexEnvMode (GL_REPLACE); | ||
1151 | 104 | glColor4usv (defaultColor); | ||
1152 | 105 | } | ||
1153 | 106 | } | ||
1154 | 107 | |||
1155 | 108 | /* | ||
1156 | 109 | * ExpoWindow::computeGlowQuads | ||
1157 | 110 | * | ||
1158 | 111 | * This function computures the matrix transformation required for each | ||
1159 | 112 | * part of the glow texture which we wish to stretch to some rectangular | ||
1160 | 113 | * dimentions | ||
1161 | 114 | * | ||
1162 | 115 | * There are eight quads different parts of the texture which we wish to | ||
1163 | 116 | * paint here, the 4 sides and four corners, eg: | ||
1164 | 117 | * | ||
1165 | 118 | * ------------------ | ||
1166 | 119 | * | 1 | 4 | 6 | | ||
1167 | 120 | * ------------- ------------------ | ||
1168 | 121 | * | 1 | 4 | 6 | | | | | | ||
1169 | 122 | * ------------- | | | | | ||
1170 | 123 | * | 2 | n | 7 | -> | 2 | n | 7 | | ||
1171 | 124 | * ------------- | | | | | ||
1172 | 125 | * | 3 | 5 | 8 | | | | | | ||
1173 | 126 | * ------------- ------------------ | ||
1174 | 127 | * | 3 | 5 | 8 | | ||
1175 | 128 | * ------------------ | ||
1176 | 129 | * | ||
1177 | 130 | * In this example here, 2, 4, 5 and 7 are stretched, and the matrices for | ||
1178 | 131 | * each quad rect adjusted accordingly for it's size compared to the original | ||
1179 | 132 | * texture size. | ||
1180 | 133 | * | ||
1181 | 134 | * When we are adjusting the matrices here, the initial size of each corner has | ||
1182 | 135 | * a size of of "1.0f", so according to 2x2 matrix rules, | ||
1183 | 136 | * the scale factor is the inverse of the size of the glow (which explains | ||
1184 | 137 | * while you will see here that matrix->xx is (1 / glowSize) | ||
1185 | 138 | * where glowSize is the size the user specifies they want their glow to extend. | ||
1186 | 139 | * (likewise, matrix->yy is adjusted similarly for corners and for top/bottom) | ||
1187 | 140 | * | ||
1188 | 141 | * matrix->x0 and matrix->y0 here are set to be the top left edge of the rect | ||
1189 | 142 | * adjusted by the matrix scale factor (matrix->xx and matrix->yy) | ||
1190 | 143 | * | ||
1191 | 144 | */ | ||
1192 | 145 | void | ||
1193 | 146 | ExpoWindow::computeGlowQuads (GLTexture::Matrix *matrix) | ||
1194 | 147 | { | ||
1195 | 148 | CompRect *box; | ||
1196 | 149 | int x1, x2, y1, y2; | ||
1197 | 150 | GLTexture::Matrix *quadMatrix; | ||
1198 | 151 | int glowSize, glowOffset; | ||
1199 | 152 | CompWindow *w = window; | ||
1200 | 153 | |||
1201 | 154 | /* Passing NULL to this function frees the glow quads | ||
1202 | 155 | * (so the window is not painted with glow) */ | ||
1203 | 156 | |||
1204 | 157 | if (matrix) | ||
1205 | 158 | { | ||
1206 | 159 | if (!mGlowQuads) | ||
1207 | 160 | mGlowQuads = new GlowQuad[NUM_GLOWQUADS]; | ||
1208 | 161 | if (!mGlowQuads) | ||
1209 | 162 | return; | ||
1210 | 163 | } | ||
1211 | 164 | else | ||
1212 | 165 | { | ||
1213 | 166 | if (mGlowQuads) | ||
1214 | 167 | { | ||
1215 | 168 | delete[] mGlowQuads; | ||
1216 | 169 | mGlowQuads = NULL; | ||
1217 | 170 | } | ||
1218 | 171 | return; | ||
1219 | 172 | } | ||
1220 | 173 | |||
1221 | 174 | glowSize = 48; | ||
1222 | 175 | glowOffset = (glowSize * ExpoScreen::get (screen)->mGlowTextureProperties->glowOffset / | ||
1223 | 176 | ExpoScreen::get (screen)->mGlowTextureProperties->textureSize) + 1; | ||
1224 | 177 | |||
1225 | 178 | /* Top left corner */ | ||
1226 | 179 | box = &mGlowQuads[GLOWQUAD_TOPLEFT].mBox; | ||
1227 | 180 | mGlowQuads[GLOWQUAD_TOPLEFT].mMatrix = *matrix; | ||
1228 | 181 | quadMatrix = &mGlowQuads[GLOWQUAD_TOPLEFT].mMatrix; | ||
1229 | 182 | |||
1230 | 183 | /* Set the desired rect dimentions | ||
1231 | 184 | * for the part of the glow we are painting */ | ||
1232 | 185 | |||
1233 | 186 | x1 = WIN_REAL_X (w) - glowSize + glowOffset; | ||
1234 | 187 | y1 = WIN_REAL_Y (w) - glowSize + glowOffset; | ||
1235 | 188 | |||
1236 | 189 | /* 2x2 Matrix here, adjust both x and y scale factors | ||
1237 | 190 | * and the x and y position | ||
1238 | 191 | * | ||
1239 | 192 | * Scaling both parts of the texture in a positive direction | ||
1240 | 193 | * here (left to right top to bottom) | ||
1241 | 194 | * | ||
1242 | 195 | * The base position (x0 and y0) here requires us to move backwards | ||
1243 | 196 | * on the x and y dimentions by the calculated rect dimentions | ||
1244 | 197 | * multiplied by the scale factors | ||
1245 | 198 | */ | ||
1246 | 199 | |||
1247 | 200 | quadMatrix->xx = 1.0f / glowSize; | ||
1248 | 201 | quadMatrix->yy = 1.0f / (glowSize); | ||
1249 | 202 | quadMatrix->x0 = -(x1 * quadMatrix->xx); | ||
1250 | 203 | quadMatrix->y0 = -(y1 * quadMatrix->yy); | ||
1251 | 204 | |||
1252 | 205 | x2 = MIN (WIN_REAL_X (w) + glowOffset, | ||
1253 | 206 | WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2)); | ||
1254 | 207 | y2 = MIN (WIN_REAL_Y (w) + glowOffset, | ||
1255 | 208 | WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2)); | ||
1256 | 209 | |||
1257 | 210 | *box = CompRect (x1, y1, x2 - x1, y2 - y1); | ||
1258 | 211 | |||
1259 | 212 | /* Top right corner */ | ||
1260 | 213 | box = &mGlowQuads[GLOWQUAD_TOPRIGHT].mBox; | ||
1261 | 214 | mGlowQuads[GLOWQUAD_TOPRIGHT].mMatrix = *matrix; | ||
1262 | 215 | quadMatrix = &mGlowQuads[GLOWQUAD_TOPRIGHT].mMatrix; | ||
1263 | 216 | |||
1264 | 217 | /* Set the desired rect dimentions | ||
1265 | 218 | * for the part of the glow we are painting */ | ||
1266 | 219 | |||
1267 | 220 | x1 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset; | ||
1268 | 221 | y1 = WIN_REAL_Y (w) - glowSize + glowOffset; | ||
1269 | 222 | x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) + glowSize - glowOffset; | ||
1270 | 223 | |||
1271 | 224 | /* 2x2 Matrix here, adjust both x and y scale factors | ||
1272 | 225 | * and the x and y position | ||
1273 | 226 | * | ||
1274 | 227 | * Scaling the y part of the texture in a positive direction | ||
1275 | 228 | * and the x part in a negative direction here | ||
1276 | 229 | * (right to left top to bottom) | ||
1277 | 230 | * | ||
1278 | 231 | * The base position (x0 and y0) here requires us to move backwards | ||
1279 | 232 | * on the y dimention and forwards on x by the calculated rect dimentions | ||
1280 | 233 | * multiplied by the scale factors (since we are moving forward on x we | ||
1281 | 234 | * need the inverse of that which is 1 - x1 * xx | ||
1282 | 235 | */ | ||
1283 | 236 | |||
1284 | 237 | quadMatrix->xx = -1.0f / glowSize; | ||
1285 | 238 | quadMatrix->yy = 1.0f / glowSize; | ||
1286 | 239 | quadMatrix->x0 = 1.0 - (x1 * quadMatrix->xx); | ||
1287 | 240 | quadMatrix->y0 = -(y1 * quadMatrix->yy); | ||
1288 | 241 | |||
1289 | 242 | x1 = MAX (WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset, | ||
1290 | 243 | WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2)); | ||
1291 | 244 | y2 = MIN (WIN_REAL_Y (w) + glowOffset, | ||
1292 | 245 | WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2)); | ||
1293 | 246 | |||
1294 | 247 | *box = CompRect (x1, y1, x2 - x1, y2 - y1); | ||
1295 | 248 | |||
1296 | 249 | /* Bottom left corner */ | ||
1297 | 250 | box = &mGlowQuads[GLOWQUAD_BOTTOMLEFT].mBox; | ||
1298 | 251 | mGlowQuads[GLOWQUAD_BOTTOMLEFT].mMatrix = *matrix; | ||
1299 | 252 | quadMatrix = &mGlowQuads[GLOWQUAD_BOTTOMLEFT].mMatrix; | ||
1300 | 253 | |||
1301 | 254 | x1 = WIN_REAL_X (w) - glowSize + glowOffset; | ||
1302 | 255 | y1 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset; | ||
1303 | 256 | x2 = WIN_REAL_X (w) + glowOffset; | ||
1304 | 257 | y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) + glowSize - glowOffset; | ||
1305 | 258 | |||
1306 | 259 | /* 2x2 Matrix here, adjust both x and y scale factors | ||
1307 | 260 | * and the x and y position | ||
1308 | 261 | * | ||
1309 | 262 | * Scaling the x part of the texture in a positive direction | ||
1310 | 263 | * and the y part in a negative direction here | ||
1311 | 264 | * (left to right bottom to top) | ||
1312 | 265 | * | ||
1313 | 266 | * The base position (x0 and y0) here requires us to move backwards | ||
1314 | 267 | * on the x dimention and forwards on y by the calculated rect dimentions | ||
1315 | 268 | * multiplied by the scale factors (since we are moving forward on x we | ||
1316 | 269 | * need the inverse of that which is 1 - y1 * yy | ||
1317 | 270 | */ | ||
1318 | 271 | |||
1319 | 272 | quadMatrix->xx = 1.0f / glowSize; | ||
1320 | 273 | quadMatrix->yy = -1.0f / glowSize; | ||
1321 | 274 | quadMatrix->x0 = -(x1 * quadMatrix->xx); | ||
1322 | 275 | quadMatrix->y0 = 1.0f - (y1 * quadMatrix->yy); | ||
1323 | 276 | |||
1324 | 277 | y1 = MAX (WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset, | ||
1325 | 278 | WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2)); | ||
1326 | 279 | x2 = MIN (WIN_REAL_X (w) + glowOffset, | ||
1327 | 280 | WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2)); | ||
1328 | 281 | |||
1329 | 282 | *box = CompRect (x1, y1, x2 - x1, y2 - y1); | ||
1330 | 283 | |||
1331 | 284 | /* Bottom right corner */ | ||
1332 | 285 | box = &mGlowQuads[GLOWQUAD_BOTTOMRIGHT].mBox; | ||
1333 | 286 | mGlowQuads[GLOWQUAD_BOTTOMRIGHT].mMatrix = *matrix; | ||
1334 | 287 | quadMatrix = &mGlowQuads[GLOWQUAD_BOTTOMRIGHT].mMatrix; | ||
1335 | 288 | |||
1336 | 289 | x1 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset; | ||
1337 | 290 | y1 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset; | ||
1338 | 291 | x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) + glowSize - glowOffset; | ||
1339 | 292 | y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) + glowSize - glowOffset; | ||
1340 | 293 | |||
1341 | 294 | /* 2x2 Matrix here, adjust both x and y scale factors | ||
1342 | 295 | * and the x and y position | ||
1343 | 296 | * | ||
1344 | 297 | * Scaling the both parts of the texture in a negative direction | ||
1345 | 298 | * (right to left bottom to top) | ||
1346 | 299 | * | ||
1347 | 300 | * The base position (x0 and y0) here requires us to move forwards | ||
1348 | 301 | * on both dimentions by the calculated rect dimentions | ||
1349 | 302 | * multiplied by the scale factors | ||
1350 | 303 | */ | ||
1351 | 304 | |||
1352 | 305 | quadMatrix->xx = -1.0f / glowSize; | ||
1353 | 306 | quadMatrix->yy = -1.0f / glowSize; | ||
1354 | 307 | quadMatrix->x0 = 1.0 - (x1 * quadMatrix->xx); | ||
1355 | 308 | quadMatrix->y0 = 1.0 - (y1 * quadMatrix->yy); | ||
1356 | 309 | |||
1357 | 310 | x1 = MAX (WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset, | ||
1358 | 311 | WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2)); | ||
1359 | 312 | y1 = MAX (WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset, | ||
1360 | 313 | WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2)); | ||
1361 | 314 | |||
1362 | 315 | *box = CompRect (x1, y1, x2 - x1, y2 - y1); | ||
1363 | 316 | |||
1364 | 317 | /* Top edge */ | ||
1365 | 318 | box = &mGlowQuads[GLOWQUAD_TOP].mBox; | ||
1366 | 319 | mGlowQuads[GLOWQUAD_TOP].mMatrix = *matrix; | ||
1367 | 320 | quadMatrix = &mGlowQuads[GLOWQUAD_TOP].mMatrix; | ||
1368 | 321 | |||
1369 | 322 | x1 = WIN_REAL_X (w) + glowOffset; | ||
1370 | 323 | y1 = WIN_REAL_Y (w) - glowSize + glowOffset; | ||
1371 | 324 | x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset; | ||
1372 | 325 | y2 = WIN_REAL_Y (w) + glowOffset; | ||
1373 | 326 | |||
1374 | 327 | /* 2x2 Matrix here, adjust both x and y scale factors | ||
1375 | 328 | * and the x and y position | ||
1376 | 329 | * | ||
1377 | 330 | * No need to scale the x part of the texture here, but we | ||
1378 | 331 | * are scaling on the y part in a positive direciton | ||
1379 | 332 | * | ||
1380 | 333 | * The base position (y0) here requires us to move backwards | ||
1381 | 334 | * on the x dimention and forwards on y by the calculated rect dimentions | ||
1382 | 335 | * multiplied by the scale factors | ||
1383 | 336 | */ | ||
1384 | 337 | |||
1385 | 338 | quadMatrix->xx = 0.0f; | ||
1386 | 339 | quadMatrix->yy = 1.0f / glowSize; | ||
1387 | 340 | quadMatrix->x0 = 1.0; | ||
1388 | 341 | quadMatrix->y0 = -(y1 * quadMatrix->yy); | ||
1389 | 342 | |||
1390 | 343 | *box = CompRect (x1, y1, x2 - x1, y2 - y1); | ||
1391 | 344 | |||
1392 | 345 | /* Bottom edge */ | ||
1393 | 346 | box = &mGlowQuads[GLOWQUAD_BOTTOM].mBox; | ||
1394 | 347 | mGlowQuads[GLOWQUAD_BOTTOM].mMatrix = *matrix; | ||
1395 | 348 | quadMatrix = &mGlowQuads[GLOWQUAD_BOTTOM].mMatrix; | ||
1396 | 349 | |||
1397 | 350 | x1 = WIN_REAL_X (w) + glowOffset; | ||
1398 | 351 | y1 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset; | ||
1399 | 352 | x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset; | ||
1400 | 353 | y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) + glowSize - glowOffset; | ||
1401 | 354 | |||
1402 | 355 | /* 2x2 Matrix here, adjust both x and y scale factors | ||
1403 | 356 | * and the x and y position | ||
1404 | 357 | * | ||
1405 | 358 | * No need to scale the x part of the texture here, but we | ||
1406 | 359 | * are scaling on the y part in a negative direciton | ||
1407 | 360 | * | ||
1408 | 361 | * The base position (y0) here requires us to move forwards | ||
1409 | 362 | * on y by the calculated rect dimentions | ||
1410 | 363 | * multiplied by the scale factors | ||
1411 | 364 | */ | ||
1412 | 365 | |||
1413 | 366 | quadMatrix->xx = 0.0f; | ||
1414 | 367 | quadMatrix->yy = -1.0f / glowSize; | ||
1415 | 368 | quadMatrix->x0 = 1.0; | ||
1416 | 369 | quadMatrix->y0 = 1.0 - (y1 * quadMatrix->yy); | ||
1417 | 370 | |||
1418 | 371 | *box = CompRect (x1, y1, x2 - x1, y2 - y1); | ||
1419 | 372 | |||
1420 | 373 | /* Left edge */ | ||
1421 | 374 | box = &mGlowQuads[GLOWQUAD_LEFT].mBox; | ||
1422 | 375 | mGlowQuads[GLOWQUAD_LEFT].mMatrix = *matrix; | ||
1423 | 376 | quadMatrix = &mGlowQuads[GLOWQUAD_LEFT].mMatrix; | ||
1424 | 377 | |||
1425 | 378 | x1 = WIN_REAL_X (w) - glowSize + glowOffset; | ||
1426 | 379 | y1 = WIN_REAL_Y (w) + glowOffset; | ||
1427 | 380 | x2 = WIN_REAL_X (w) + glowOffset; | ||
1428 | 381 | y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset; | ||
1429 | 382 | |||
1430 | 383 | /* 2x2 Matrix here, adjust both x and y scale factors | ||
1431 | 384 | * and the x and y position | ||
1432 | 385 | * | ||
1433 | 386 | * No need to scale the y part of the texture here, but we | ||
1434 | 387 | * are scaling on the x part in a positive direciton | ||
1435 | 388 | * | ||
1436 | 389 | * The base position (x0) here requires us to move backwards | ||
1437 | 390 | * on x by the calculated rect dimentions | ||
1438 | 391 | * multiplied by the scale factors | ||
1439 | 392 | */ | ||
1440 | 393 | |||
1441 | 394 | quadMatrix->xx = 1.0f / glowSize; | ||
1442 | 395 | quadMatrix->yy = 0.0f; | ||
1443 | 396 | quadMatrix->x0 = -(x1 * quadMatrix->xx); | ||
1444 | 397 | quadMatrix->y0 = 1.0; | ||
1445 | 398 | |||
1446 | 399 | *box = CompRect (x1, y1, x2 - x1, y2 - y1); | ||
1447 | 400 | |||
1448 | 401 | /* Right edge */ | ||
1449 | 402 | box = &mGlowQuads[GLOWQUAD_RIGHT].mBox; | ||
1450 | 403 | mGlowQuads[GLOWQUAD_RIGHT].mMatrix = *matrix; | ||
1451 | 404 | quadMatrix = &mGlowQuads[GLOWQUAD_RIGHT].mMatrix; | ||
1452 | 405 | |||
1453 | 406 | x1 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset; | ||
1454 | 407 | y1 = WIN_REAL_Y (w) + glowOffset; | ||
1455 | 408 | x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) + glowSize - glowOffset; | ||
1456 | 409 | y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset; | ||
1457 | 410 | |||
1458 | 411 | /* 2x2 Matrix here, adjust both x and y scale factors | ||
1459 | 412 | * and the x and y position | ||
1460 | 413 | * | ||
1461 | 414 | * No need to scale the y part of the texture here, but we | ||
1462 | 415 | * are scaling on the x part in a negative direciton | ||
1463 | 416 | * | ||
1464 | 417 | * The base position (x0) here requires us to move forwards | ||
1465 | 418 | * on x by the calculated rect dimentions | ||
1466 | 419 | * multiplied by the scale factors | ||
1467 | 420 | */ | ||
1468 | 421 | |||
1469 | 422 | quadMatrix->xx = -1.0f / glowSize; | ||
1470 | 423 | quadMatrix->yy = 0.0f; | ||
1471 | 424 | quadMatrix->x0 = 1.0 - (x1 * quadMatrix->xx); | ||
1472 | 425 | quadMatrix->y0 = 1.0; | ||
1473 | 426 | |||
1474 | 427 | *box = CompRect (x1, y1, x2 - x1, y2 - y1); | ||
1475 | 428 | } | ||
1476 | 0 | 429 | ||
1477 | === added file 'src/glow.h' | |||
1478 | --- src/glow.h 1970-01-01 00:00:00 +0000 | |||
1479 | +++ src/glow.h 2011-09-15 12:36:24 +0000 | |||
1480 | @@ -0,0 +1,66 @@ | |||
1481 | 1 | /** | ||
1482 | 2 | * | ||
1483 | 3 | * Compiz group plugin | ||
1484 | 4 | * | ||
1485 | 5 | * glow.h | ||
1486 | 6 | * | ||
1487 | 7 | * Copyright : (C) 2006-2010 by Patrick Niklaus, Roi Cohen, | ||
1488 | 8 | * Danny Baumann, Sam Spilsbury | ||
1489 | 9 | * Authors: Patrick Niklaus <patrick.niklaus@googlemail.com> | ||
1490 | 10 | * Roi Cohen <roico.beryl@gmail.com> | ||
1491 | 11 | * Danny Baumann <maniac@opencompositing.org> | ||
1492 | 12 | * Sam Spilsbury <smspillaz@gmail.com> | ||
1493 | 13 | * | ||
1494 | 14 | * | ||
1495 | 15 | * This program is free software; you can redistribute it and/or | ||
1496 | 16 | * modify it under the terms of the GNU General Public License | ||
1497 | 17 | * as published by the Free Software Foundation; either version 2 | ||
1498 | 18 | * of the License, or (at your option) any later version. | ||
1499 | 19 | * | ||
1500 | 20 | * This program is distributed in the hope that it will be useful, | ||
1501 | 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1502 | 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1503 | 23 | * GNU General Public License for more details. | ||
1504 | 24 | * | ||
1505 | 25 | **/ | ||
1506 | 26 | |||
1507 | 27 | #ifndef _EXPO_GLOW_H | ||
1508 | 28 | #define _EXPO_GLOW_H | ||
1509 | 29 | |||
1510 | 30 | #define GLOWQUAD_TOPLEFT 0 | ||
1511 | 31 | #define GLOWQUAD_TOPRIGHT 1 | ||
1512 | 32 | #define GLOWQUAD_BOTTOMLEFT 2 | ||
1513 | 33 | #define GLOWQUAD_BOTTOMRIGHT 3 | ||
1514 | 34 | #define GLOWQUAD_TOP 4 | ||
1515 | 35 | #define GLOWQUAD_BOTTOM 5 | ||
1516 | 36 | #define GLOWQUAD_LEFT 6 | ||
1517 | 37 | #define GLOWQUAD_RIGHT 7 | ||
1518 | 38 | #define NUM_GLOWQUADS 8 | ||
1519 | 39 | |||
1520 | 40 | /* Represents a particular glow texture, so here | ||
1521 | 41 | * we have hardcoded in the texture data, the offset | ||
1522 | 42 | * and the size of the texture | ||
1523 | 43 | */ | ||
1524 | 44 | |||
1525 | 45 | typedef struct _GlowTextureProperties { | ||
1526 | 46 | char *textureData; | ||
1527 | 47 | int textureSize; | ||
1528 | 48 | int glowOffset; | ||
1529 | 49 | } GlowTextureProperties; | ||
1530 | 50 | |||
1531 | 51 | /* Each glow quad contains a 2x2 scale + positional matrix | ||
1532 | 52 | * (the 3rd column is not used since that is for matrix skew | ||
1533 | 53 | * operations which we do not care about) | ||
1534 | 54 | * and also a CompRect which describes the size and position of | ||
1535 | 55 | * the quad on the glow | ||
1536 | 56 | */ | ||
1537 | 57 | |||
1538 | 58 | class GlowQuad { | ||
1539 | 59 | public: | ||
1540 | 60 | CompRect mBox; | ||
1541 | 61 | GLTexture::Matrix mMatrix; | ||
1542 | 62 | }; | ||
1543 | 63 | |||
1544 | 64 | extern const GlowTextureProperties glowTextureProperties; | ||
1545 | 65 | |||
1546 | 66 | #endif | ||
1547 | 0 | 67 | ||
1548 | === added file 'src/group_glow.h' | |||
1549 | --- src/group_glow.h 1970-01-01 00:00:00 +0000 | |||
1550 | +++ src/group_glow.h 2011-09-15 12:36:24 +0000 | |||
1551 | @@ -0,0 +1,197 @@ | |||
1552 | 1 | #ifndef _GROUP_GLOWTEX_H | ||
1553 | 2 | #define _GROUP_GLOWTEX_H | ||
1554 | 3 | |||
1555 | 4 | /** | ||
1556 | 5 | * | ||
1557 | 6 | * Compiz group plugin | ||
1558 | 7 | * | ||
1559 | 8 | * group_glow.h | ||
1560 | 9 | * | ||
1561 | 10 | * Copyright : (C) 2006-2010 by Patrick Niklaus, Roi Cohen, | ||
1562 | 11 | * Danny Baumann, Sam Spilsbury | ||
1563 | 12 | * Authors: Patrick Niklaus <patrick.niklaus@googlemail.com> | ||
1564 | 13 | * Roi Cohen <roico.beryl@gmail.com> | ||
1565 | 14 | * Danny Baumann <maniac@opencompositing.org> | ||
1566 | 15 | * Sam Spilsbury <smspillaz@gmail.com> | ||
1567 | 16 | * | ||
1568 | 17 | * | ||
1569 | 18 | * This program is free software; you can redistribute it and/or | ||
1570 | 19 | * modify it under the terms of the GNU General Public License | ||
1571 | 20 | * as published by the Free Software Foundation; either version 2 | ||
1572 | 21 | * of the License, or (at your option) any later version. | ||
1573 | 22 | * | ||
1574 | 23 | * This program is distributed in the hope that it will be useful, | ||
1575 | 24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1576 | 25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1577 | 26 | * GNU General Public License for more details. | ||
1578 | 27 | * | ||
1579 | 28 | **/ | ||
1580 | 29 | |||
1581 | 30 | /* | ||
1582 | 31 | * glowTex | ||
1583 | 32 | */ | ||
1584 | 33 | |||
1585 | 34 | static char glowTexRect[4097] = { | ||
1586 | 35 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1587 | 36 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1588 | 37 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377" | ||
1589 | 38 | "\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377" | ||
1590 | 39 | "\377\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1591 | 40 | "\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\6\377\377" | ||
1592 | 41 | "\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377" | ||
1593 | 42 | "\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6" | ||
1594 | 43 | "\377\377\377\14\377\377\377\14\377\377\377\14\377\377\377\14\377\377\377" | ||
1595 | 44 | "\14\377\377\377\14\377\377\377\14\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1596 | 45 | "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\14" | ||
1597 | 46 | "\377\377\377\14\377\377\377\22\377\377\377\22\377\377\377\22\377\377\377" | ||
1598 | 47 | "\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377" | ||
1599 | 48 | "\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377" | ||
1600 | 49 | "\35\377\377\377\35\377\377\377\35\377\377\377\35\377\377\377\35\377\377\377" | ||
1601 | 50 | "\35\377\377\377\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377" | ||
1602 | 51 | "\377\6\377\377\377\6\377\377\377\14\377\377\377\22\377\377\377\27\377\377" | ||
1603 | 52 | "\377\27\377\377\377\35\377\377\377#\377\377\377'\377\377\377'\377\377\377" | ||
1604 | 53 | "+\377\377\377+\377\377\377+\377\377\377+\377\377\377+\377\377\377+\377\377" | ||
1605 | 54 | "\377+\377\377\377+\377\377\377+\377\377\3771\377\377\3771\377\377\3771\377" | ||
1606 | 55 | "\377\3771\377\377\3771\377\377\3771\377\377\3771\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1607 | 56 | "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\22\377\377\377" | ||
1608 | 57 | "\27\377\377\377\35\377\377\377#\377\377\377+\377\377\3771\377\377\3776\377" | ||
1609 | 58 | "\377\377<\377\377\377>\377\377\377C\377\377\377I\377\377\377I\377\377\377" | ||
1610 | 59 | "I\377\377\377I\377\377\377I\377\377\377I\377\377\377I\377\377\377I\377\377" | ||
1611 | 60 | "\377L\377\377\377L\377\377\377L\377\377\377L\377\377\377L\377\377\377L\377" | ||
1612 | 61 | "\377\377L\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377" | ||
1613 | 62 | "\377\377\22\377\377\377\27\377\377\377#\377\377\377+\377\377\3776\377\377" | ||
1614 | 63 | "\377C\377\377\377L\377\377\377U\377\377\377]\377\377\377`\377\377\377d\377" | ||
1615 | 64 | "\377\377h\377\377\377k\377\377\377k\377\377\377k\377\377\377k\377\377\377" | ||
1616 | 65 | "k\377\377\377k\377\377\377k\377\377\377p\377\377\377p\377\377\377p\377\377" | ||
1617 | 66 | "\377p\377\377\377p\377\377\377p\377\377\377p\0\0\0\0\0\0\0\0\0\0\0\0\377" | ||
1618 | 67 | "\377\377\6\377\377\377\14\377\377\377\22\314\314\314\35\377\377\377'\377" | ||
1619 | 68 | "\377\3771\377\377\377>\357\357\357P\377\377\377]\363\363\363k\365\365\365" | ||
1620 | 69 | "v\365\365\365|\377\377\377\202\367\367\367\210\367\367\367\214\367\367\367" | ||
1621 | 70 | "\216\367\367\367\221\367\367\367\221\367\367\367\221\367\367\367\221\367" | ||
1622 | 71 | "\367\367\221\367\367\367\221\367\367\367\224\367\367\367\224\367\367\367" | ||
1623 | 72 | "\224\367\367\367\224\367\367\367\224\367\367\367\224\367\367\367\224\0\0" | ||
1624 | 73 | "\0\0\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\22\377\377\377\27\377" | ||
1625 | 74 | "\377\377'\377\377\3776\377\377\377I\377\377\377Y\377\377\377k\376\376\376" | ||
1626 | 75 | "y\377\377\377\210\377\377\377\224\377\377\377\235\377\377\377\245\377\377" | ||
1627 | 76 | "\377\253\377\377\377\255\377\377\377\262\377\377\377\262\377\377\377\263" | ||
1628 | 77 | "\377\377\377\263\377\377\377\263\377\377\377\263\377\377\377\263\377\377" | ||
1629 | 78 | "\377\266\377\377\377\266\377\377\377\266\377\377\377\266\377\377\377\266" | ||
1630 | 79 | "\377\377\377\266\377\377\377\266\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377" | ||
1631 | 80 | "\14\377\377\377\27\377\377\377#\377\377\3771\377\377\377I\377\377\377]\377" | ||
1632 | 81 | "\377\377r\377\377\377\205\377\377\377\231\377\377\377\247\377\377\377\263" | ||
1633 | 82 | "\377\377\377\275\377\377\377\304\377\377\377\310\377\377\377\313\377\377" | ||
1634 | 83 | "\377\316\377\377\377\320\377\377\377\320\377\377\377\320\377\377\377\320" | ||
1635 | 84 | "\377\377\377\320\377\377\377\320\377\377\377\322\377\377\377\322\377\377" | ||
1636 | 85 | "\377\322\377\377\377\322\377\377\377\322\377\377\377\322\377\377\377\322" | ||
1637 | 86 | "\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\22\377\377\377\35\377\377" | ||
1638 | 87 | "\377+\377\377\377>\377\377\377Y\377\377\377r\377\377\377\210\376\376\376" | ||
1639 | 88 | "\237\377\377\377\262\377\377\377\302\377\377\377\313\377\377\377\324\377" | ||
1640 | 89 | "\377\377\332\376\376\376\336\377\377\377\341\377\377\377\342\377\377\377" | ||
1641 | 90 | "\344\377\377\377\344\377\377\377\344\377\377\377\344\377\377\377\344\377" | ||
1642 | 91 | "\377\377\344\377\377\377\345\377\377\377\345\377\377\377\345\377\377\377" | ||
1643 | 92 | "\345\377\377\377\345\377\377\377\345\377\377\377\345\0\0\0\0\377\377\377" | ||
1644 | 93 | "\6\377\377\377\14\377\377\377\27\377\377\377#\377\377\3776\377\377\377P\377" | ||
1645 | 94 | "\377\377k\377\377\377\205\376\376\376\237\372\372\372\266\377\377\377\307" | ||
1646 | 95 | "\373\373\373\325\373\373\373\337\374\374\374\345\374\374\374\352\374\374" | ||
1647 | 96 | "\374\355\374\374\374\357\374\374\374\360\374\374\374\361\374\374\374\361" | ||
1648 | 97 | "\374\374\374\362\374\374\374\362\374\374\374\362\374\374\374\362\374\374" | ||
1649 | 98 | "\374\362\374\374\374\362\374\374\374\362\374\374\374\362\374\374\374\362" | ||
1650 | 99 | "\374\374\374\362\374\374\374\362\0\0\0\0\377\377\377\6\377\377\377\14\377" | ||
1651 | 100 | "\377\377\35\377\377\377+\377\377\377C\377\377\377]\377\377\377|\377\377\377" | ||
1652 | 101 | "\231\377\377\377\263\377\377\377\307\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1653 | 102 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1654 | 103 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377" | ||
1655 | 104 | "\377\377\6\377\377\377\22\324\324\324#\377\377\3771\377\377\377L\363\363" | ||
1656 | 105 | "\363k\377\377\377\210\377\377\377\247\377\377\377\302\377\377\377\325\0\0" | ||
1657 | 106 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1658 | 107 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1659 | 108 | "\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\22\377\377" | ||
1660 | 109 | "\377#\377\377\377<\377\377\377U\377\377\377v\377\377\377\226\377\377\377" | ||
1661 | 110 | "\263\377\377\377\315\377\377\377\337\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1662 | 111 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1663 | 112 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377" | ||
1664 | 113 | "\6\377\377\377\14\377\377\377\27\377\377\377'\377\377\377>\377\377\377]\377" | ||
1665 | 114 | "\377\377|\370\370\370\237\377\377\377\275\373\373\373\325\377\377\377\345" | ||
1666 | 115 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1667 | 116 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1668 | 117 | "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\27\377" | ||
1669 | 118 | "\377\377+\377\377\377C\377\377\377`\377\377\377\202\377\377\377\247\377\377" | ||
1670 | 119 | "\377\304\377\377\377\332\377\377\377\352\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1671 | 120 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1672 | 121 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377" | ||
1673 | 122 | "\377\6\377\377\377\14\377\377\377\27\377\377\377+\377\377\377C\377\377\377" | ||
1674 | 123 | "d\377\377\377\210\377\377\377\253\377\377\377\310\376\376\376\336\374\374" | ||
1675 | 124 | "\374\355\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1676 | 125 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1677 | 126 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377" | ||
1678 | 127 | "\35\377\377\377+\377\377\377I\377\377\377h\377\377\377\214\377\377\377\260" | ||
1679 | 128 | "\377\377\377\313\374\374\374\342\374\374\374\357\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1680 | 129 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1681 | 130 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1682 | 131 | "\377\377\377\6\377\377\377\14\377\377\377\35\342\342\3421\377\377\377I\377" | ||
1683 | 132 | "\377\377k\377\377\377\216\377\377\377\262\377\377\377\316\374\374\374\344" | ||
1684 | 133 | "\377\377\377\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1685 | 134 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1686 | 135 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377" | ||
1687 | 136 | "\377\377\35\377\377\3771\377\377\377L\377\377\377k\377\377\377\221\377\377" | ||
1688 | 137 | "\377\263\377\377\377\320\377\377\377\344\377\377\377\361\0\0\0\0\0\0\0\0" | ||
1689 | 138 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1690 | 139 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1691 | 140 | "\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377" | ||
1692 | 141 | "\377L\377\377\377k\377\377\377\221\377\377\377\263\377\377\377\320\377\377" | ||
1693 | 142 | "\377\344\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1694 | 143 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1695 | 144 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377" | ||
1696 | 145 | "\14\377\377\377\35\377\377\3771\377\377\377L\364\364\364p\377\377\377\221" | ||
1697 | 146 | "\372\372\372\266\377\377\377\320\374\374\374\345\377\377\377\362\0\0\0\0" | ||
1698 | 147 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1699 | 148 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1700 | 149 | "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\377" | ||
1701 | 150 | "1\377\377\377L\377\377\377p\377\377\377\221\377\377\377\266\373\373\373\322" | ||
1702 | 151 | "\377\377\377\345\377\377\377\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1703 | 152 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1704 | 153 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377" | ||
1705 | 154 | "\377\377\14\377\377\377\35\377\377\3771\377\377\377L\377\377\377p\377\377" | ||
1706 | 155 | "\377\221\377\377\377\266\373\373\373\322\377\377\377\345\377\377\377\362" | ||
1707 | 156 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1708 | 157 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1709 | 158 | "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377" | ||
1710 | 159 | "\377\3771\377\377\377L\377\377\377p\377\377\377\221\377\377\377\266\373\373" | ||
1711 | 160 | "\373\322\377\377\377\345\377\377\377\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1712 | 161 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1713 | 162 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377" | ||
1714 | 163 | "\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377\377L\377\377\377" | ||
1715 | 164 | "p\367\367\367\224\377\377\377\266\377\377\377\322\377\377\377\345\374\374" | ||
1716 | 165 | "\374\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1717 | 166 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1718 | 167 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377" | ||
1719 | 168 | "\35\377\377\3771\377\377\377L\377\377\377p\367\367\367\224\377\377\377\266" | ||
1720 | 169 | "\377\377\377\322\377\377\377\345\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1721 | 170 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1722 | 171 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1723 | 172 | "\377\377\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377\377L\377" | ||
1724 | 173 | "\377\377p\367\367\367\224\377\377\377\266\377\377\377\322\377\377\377\345" | ||
1725 | 174 | "\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1726 | 175 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1727 | 176 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377" | ||
1728 | 177 | "\377\377\35\377\377\3771\377\377\377L\377\377\377p\367\367\367\224\377\377" | ||
1729 | 178 | "\377\266\377\377\377\322\377\377\377\345\374\374\374\362\0\0\0\0\0\0\0\0" | ||
1730 | 179 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1731 | 180 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1732 | 181 | "\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377" | ||
1733 | 182 | "\377L\377\377\377p\367\367\367\224\377\377\377\266\377\377\377\322\377\377" | ||
1734 | 183 | "\377\345\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1735 | 184 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1736 | 185 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377" | ||
1737 | 186 | "\14\377\377\377\35\377\377\3771\377\377\377L\377\377\377p\367\367\367\224" | ||
1738 | 187 | "\377\377\377\266\377\377\377\322\377\377\377\345\374\374\374\362\0\0\0\0" | ||
1739 | 188 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1740 | 189 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1741 | 190 | "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\377" | ||
1742 | 191 | "1\377\377\377L\377\377\377p\367\367\367\224\377\377\377\266\377\377\377\322" | ||
1743 | 192 | "\377\377\377\345\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1744 | 193 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
1745 | 194 | "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", | ||
1746 | 195 | }; | ||
1747 | 196 | |||
1748 | 197 | #endif |
+1. Looks like there might be something wrong with...merging the group plugin though ?!?!