Merge lp:~smspillaz/compiz/compiz.add-back-animationsplus into lp:compiz/0.9.12
- compiz.add-back-animationsplus
- Merge into 0.9.12
Status: | Rejected |
---|---|
Rejected by: | Sam Spilsbury |
Proposed branch: | lp:~smspillaz/compiz/compiz.add-back-animationsplus |
Merge into: | lp:compiz/0.9.12 |
Prerequisite: | lp:~smspillaz/compiz/compiz.animationaddon-returns |
Diff against target: |
1340 lines (+1256/-0) 13 files modified
debian/compiz-plugins.install (+2/-0) debian/compiz-plugins.install.armel (+2/-0) debian/compiz-plugins.install.armhf (+2/-0) plugins/animationplus/CMakeLists.txt (+8/-0) plugins/animationplus/VERSION (+1/-0) plugins/animationplus/animationplus.xml.in (+185/-0) plugins/animationplus/src/animation_tex.h (+222/-0) plugins/animationplus/src/animationplus.cpp (+159/-0) plugins/animationplus/src/blinds.cpp (+70/-0) plugins/animationplus/src/bonanza.cpp (+241/-0) plugins/animationplus/src/helix.cpp (+93/-0) plugins/animationplus/src/private.h (+196/-0) plugins/animationplus/src/shatter.cpp (+75/-0) |
To merge this branch: | bzr merge lp:~smspillaz/compiz/compiz.add-back-animationsplus |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sam Spilsbury | Needs Resubmitting | ||
Eleni Maria Stea | Approve | ||
PS Jenkins bot | continuous-integration | Pending | |
Kevin DuBois | Pending | ||
Review via email:
|
Commit message
animationsplus: Re-add the animationsplus plugin
Description of the change
animationsplus: Re-add the animations plus plugin (thanks MC Return!)
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marco Trevisan (TreviƱo) (3v1n0) wrote : | # |
- 4024. By Sam Spilsbury <email address hidden>
-
debian: Add animationsplus to compiz-plugins
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Sam Spilsbury (smspillaz) wrote : | # |
Done
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Eleni Maria Stea (hikiko) wrote : | # |
mmm, when I make install this branch I get this message: "<path>
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Sam Spilsbury (smspillaz) wrote : | # |
I've just started noticing that too.
Was it after you tested the simple-animations branch? My guess is that
it is something left behind in the schema path that wasn't updated
after installation.
On Fri, May 27, 2016 at 5:45 PM, Eleni Maria Stea
<email address hidden> wrote:
> mmm, when I make install this branch I get this message: "<path>
> --
> https:/
> You are the owner of lp:~smspillaz/compiz/compiz.add-back-animationsplus.
--
Sam Spilsbury
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Eleni Maria Stea (hikiko) wrote : | # |
No, it was the first branch I built to review and a clean installation...
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Eleni Maria Stea (hikiko) wrote : | # |
I deleted everything re-installed and this time it was error free, But I did the same thing when I got the error...
Btw the effects are very nice (great job!), but I think there's a problem with the bonanza: I can't see any particles when I enable it even when I increase their lifespan to the maximum..
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Sam Spilsbury (smspillaz) wrote : | # |
Yeah Bonanza has been broken for some time.
I'm not entirely certain what's wrong with it. I can look into it if
you want - but I'm more inclined to have the plugins in and build
again.
On Fri, May 27, 2016 at 7:09 PM, Eleni Maria Stea
<email address hidden> wrote:
> I deleted everything re-installed and this time it was error free, But I did the same thing when I got the error...
>
> Btw the effects are very nice (great job!), but I think there's a problem with the bonanza: I can't see any particles when I enable it even when I increase their lifespan to the maximum..
> --
> https:/
> You are the owner of lp:~smspillaz/compiz/compiz.add-back-animationsplus.
--
Sam Spilsbury
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Eleni Maria Stea (hikiko) wrote : | # |
No, it's fine, I didn't know it was broken anyway. I thought those effects were new. Since, I don't have the installation problem anymore, approved from me. Thank you!
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Sam Spilsbury (smspillaz) wrote : | # |
I'll leave this one for now until animationaddon, animationsim and animationjc are merged in, otherwise there will be lots of conflict headaches.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Sam Spilsbury (smspillaz) wrote : | # |
These all need to be resubmitted to lp:compiz anyway
Unmerged revisions
- 4024. By Sam Spilsbury <email address hidden>
-
debian: Add animationsplus to compiz-plugins
- 4023. By Sam Spilsbury <email address hidden>
-
animationplus: Add back the animationplus plugin
(Thanks MC Return!)
- 4022. By Sam Spilsbury <email address hidden>
-
CMakeLists: Enable building animationaddon
- 4021. By Sam Spilsbury <email address hidden>
-
animationaddon: Provide damage box for dissolveAnim
- 4020. By Sam Spilsbury <email address hidden>
-
animationaddon: Use opacity which actually fades out for dissolve.
- 4019. By Sam Spilsbury <email address hidden>
-
animationaddon: Port the animationaddon plugin to use modern GL API.
This involved a lot of changes:
- Removal of glPush/glPop. State is assumed to be off in newer versions
of compiz, so switch off whatever gets switched on.
- Switch from glVertexPointer/glDrawArrays/ glDrawElements to GLVertexBuffer
- Changes in primitive assembly: GL_POLYGON doesn't exist in GLES
so switch to using GL_TRIANGLES. This meant that the indices
for all the animatons needed to be re-tesselated. That was done
by hand using a winding rule which just duplicates the first and
third vertex around the fourth.
- Dropping of glTexEnv calls.
- Reworking of the depth test, since writes to the depth buffer
have been disabled by default.Some things still don't work:
- Anything depending on clipping planes: glClipPlane and friends
were removed on GLES20 and they are quite difficult to implement
using other methods.
- Drawing of decoration textures - these appear to be stretched
and skewed incorrectly.
- Lighting. This will require special shaders. - 4018. By Sam Spilsbury <email address hidden>
-
animation: Just set values in paint attrib directly
- 4017. By Sam Spilsbury <email address hidden>
-
animation: Expose drawGeometry function again
Since glDrawGeometry was dropped post GLES, this function mirrors
glDrawTexture and allows animations to specify their own complete
replacement for it. - 4016. By Sam Spilsbury <email address hidden>
-
animation: Reset the glPaint index each time it is called in MultiAnim
Before we were allowing the wrapable function handler to reset
the index, which means that each copy of the animation had
different behaviour. - 4015. By Sam Spilsbury <email address hidden>
-
animation: Pass window matrix in postPaintWindow
Preview Diff
1 | === modified file 'debian/compiz-plugins.install' |
2 | --- debian/compiz-plugins.install 2016-05-13 09:45:31 +0000 |
3 | +++ debian/compiz-plugins.install 2016-05-26 14:08:50 +0000 |
4 | @@ -2,6 +2,8 @@ |
5 | usr/share/compiz/*addhelper.* |
6 | usr/lib/*/compiz/*annotate.* |
7 | usr/share/compiz/*annotate.* |
8 | +usr/lib/*/compiz/*animationsplus.* |
9 | +usr/share/compiz/*animationsplus.* |
10 | usr/lib/*/compiz/*bench.* |
11 | usr/share/compiz/*bench.* |
12 | usr/lib/*/compiz/*blur.* |
13 | |
14 | === modified file 'debian/compiz-plugins.install.armel' |
15 | --- debian/compiz-plugins.install.armel 2014-12-02 14:42:34 +0000 |
16 | +++ debian/compiz-plugins.install.armel 2016-05-26 14:08:50 +0000 |
17 | @@ -2,6 +2,8 @@ |
18 | usr/share/compiz/*addhelper.* |
19 | usr/lib/*/compiz/*annotate.* |
20 | usr/share/compiz/*annotate.* |
21 | +usr/lib/*/compiz/*animationsplus.* |
22 | +usr/share/compiz/*animationsplus.* |
23 | usr/lib/*/compiz/*clone.* |
24 | usr/share/compiz/*clone.* |
25 | usr/lib/*/compiz/*crashhandler.* |
26 | |
27 | === modified file 'debian/compiz-plugins.install.armhf' |
28 | --- debian/compiz-plugins.install.armhf 2014-12-02 14:42:34 +0000 |
29 | +++ debian/compiz-plugins.install.armhf 2016-05-26 14:08:50 +0000 |
30 | @@ -2,6 +2,8 @@ |
31 | usr/share/compiz/*addhelper.* |
32 | usr/lib/*/compiz/*annotate.* |
33 | usr/share/compiz/*annotate.* |
34 | +usr/lib/*/compiz/*animationsplus.* |
35 | +usr/share/compiz/*animationsplus.* |
36 | usr/lib/*/compiz/*clone.* |
37 | usr/share/compiz/*clone.* |
38 | usr/lib/*/compiz/*crashhandler.* |
39 | |
40 | === added directory 'plugins/animationplus' |
41 | === added file 'plugins/animationplus/CMakeLists.txt' |
42 | --- plugins/animationplus/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
43 | +++ plugins/animationplus/CMakeLists.txt 2016-05-26 14:08:50 +0000 |
44 | @@ -0,0 +1,8 @@ |
45 | +find_package (Compiz REQUIRED) |
46 | + |
47 | +include (FindOpenGL) |
48 | +include (CompizPlugin) |
49 | + |
50 | +if (OPENGL_GLU_FOUND) |
51 | + compiz_plugin (animationplus PLUGINDEPS animation animationaddon composite opengl LIBRARIES ${OPENGL_glu_LIBRARY} INCDIRS ${OPENGL_INCLUDE_DIR}) |
52 | +endif (OPENGL_GLU_FOUND) |
53 | |
54 | === added file 'plugins/animationplus/VERSION' |
55 | --- plugins/animationplus/VERSION 1970-01-01 00:00:00 +0000 |
56 | +++ plugins/animationplus/VERSION 2016-05-26 14:08:50 +0000 |
57 | @@ -0,0 +1,1 @@ |
58 | +0.9.5.0 |
59 | |
60 | === added file 'plugins/animationplus/animationplus.xml.in' |
61 | --- plugins/animationplus/animationplus.xml.in 1970-01-01 00:00:00 +0000 |
62 | +++ plugins/animationplus/animationplus.xml.in 2016-05-26 14:08:50 +0000 |
63 | @@ -0,0 +1,185 @@ |
64 | +<compiz> |
65 | + <!-- animationplus metadata --> |
66 | + <plugin name="animationplus" useBcop="true"> |
67 | + <_short>Animations Plus</_short> |
68 | + <_long>More window animations</_long> |
69 | + <category>Effects</category> |
70 | + <deps> |
71 | + <requirement> |
72 | + <plugin>animation</plugin> |
73 | + <plugin>animationaddon</plugin> |
74 | + </requirement> |
75 | + <relation type="after"> |
76 | + <plugin>animationaddon</plugin> |
77 | + <plugin>opengl</plugin> |
78 | + <plugin>composite</plugin> |
79 | + </relation> |
80 | + </deps> |
81 | + |
82 | + <options> |
83 | + |
84 | + <group> |
85 | + <_short>Effect Settings</_short> |
86 | + |
87 | + <subgroup> |
88 | + <_short>Helix</_short> |
89 | + <option name="helix_num_twists" type="int"> |
90 | + <_short>Helix Number of Twists</_short> |
91 | + <_long>Number of twists to do in the animation</_long> |
92 | + <default>2</default> |
93 | + <min>1</min> |
94 | + <max>10</max> |
95 | + </option> |
96 | + <option name="helix_gridy" type="int"> |
97 | + <_short>Helix Gridsize Y</_short> |
98 | + <_long>Number of blocks in the animation</_long> |
99 | + <default>90</default> |
100 | + <min>5</min> |
101 | + <max>300</max> |
102 | + </option> |
103 | + <option name="helix_thickness" type="float"> |
104 | + <_short>Helix Thickness</_short> |
105 | + <_long>Thickness of blocks in the animation</_long> |
106 | + <default>0</default> |
107 | + <min>0</min> |
108 | + <max>50</max> |
109 | + </option> |
110 | + <option name="helix_spin_direction" type="int"> |
111 | + <_short>Spin Direction</_short> |
112 | + <_long>Direction the strips spin.</_long> |
113 | + <default>1</default> |
114 | + <min>0</min> |
115 | + <max>1</max> |
116 | + <desc> |
117 | + <value>0</value> |
118 | + <_name>Counter-Clockwise</_name> |
119 | + </desc> |
120 | + <desc> |
121 | + <value>1</value> |
122 | + <_name>Clockwise</_name> |
123 | + </desc> |
124 | + </option> |
125 | + <option name="helix_direction" type="bool"> |
126 | + <_short>Vertical Helix</_short> |
127 | + <_long>Whether Helix should rotate with its axis up/down or in/out of the screen</_long> |
128 | + <default>false</default> |
129 | + </option> |
130 | + </subgroup> |
131 | + |
132 | + |
133 | + <subgroup> |
134 | + <_short>Blinds</_short> |
135 | + <option name="blinds_num_halftwists" type="int"> |
136 | + <_short>Blinds Number of Half Twists</_short> |
137 | + <_long>Number of half twists to do in the animation</_long> |
138 | + <default>2</default> |
139 | + <min>1</min> |
140 | + <max>10</max> |
141 | + </option> |
142 | + <option name="blinds_gridx" type="int"> |
143 | + <_short>Helix Gridsize Y</_short> |
144 | + <_long>Number of blocks in the animation</_long> |
145 | + <default>20</default> |
146 | + <min>1</min> |
147 | + <max>100</max> |
148 | + </option> |
149 | + <option name="blinds_thickness" type="float"> |
150 | + <_short>Blinds Thickness</_short> |
151 | + <_long>Thickness of blocks in the animation</_long> |
152 | + <default>0</default> |
153 | + <min>0</min> |
154 | + <max>50</max> |
155 | + </option> |
156 | + </subgroup> |
157 | + |
158 | + <subgroup> |
159 | + <_short>Shatter</_short> |
160 | + <option name="shatter_num_spokes" type="int"> |
161 | + <_short>Shatter number of spokes</_short> |
162 | + <_long>Number of spokes (divided by 4) in the animation</_long> |
163 | + <default>2</default> |
164 | + <min>1</min> |
165 | + <max>100</max> |
166 | + </option> |
167 | + <option name="shatter_num_tiers" type="int"> |
168 | + <_short>Shatter Number of Tiers</_short> |
169 | + <_long>Number of concentric circles in the animation</_long> |
170 | + <default>2</default> |
171 | + <min>1</min> |
172 | + <max>100</max> |
173 | + </option> |
174 | + </subgroup> |
175 | + |
176 | + <subgroup> |
177 | + <_short>Bonanza</_short> |
178 | + <option name="bonanza_particles" type="int"> |
179 | + <_short>Number Of Fire Particles</_short> |
180 | + <_long>Number of fire particles.</_long> |
181 | + <default>1000</default> |
182 | + <min>100</min> |
183 | + <max>10000</max> |
184 | + </option> |
185 | + <option name="bonanza_size" type="float"> |
186 | + <_short>Fire Particle Size</_short> |
187 | + <_long>Fire particle size.</_long> |
188 | + <default>5</default> |
189 | + <min>0.1</min> |
190 | + <max>20</max> |
191 | + <precision>0.1</precision> |
192 | + </option> |
193 | + <option name="bonanza_life" type="float"> |
194 | + <_short>Fire Particle Life</_short> |
195 | + <_long>Fire particle life.</_long> |
196 | + <default>0.7</default> |
197 | + <min>0.1</min> |
198 | + <max>1</max> |
199 | + <precision>0.1</precision> |
200 | + </option> |
201 | + <option name="bonanza_color" type="color"> |
202 | + <_short>Fire Particle Color</_short> |
203 | + <_long>Fire particle color.</_long> |
204 | + <default> |
205 | + <red>0xffff</red> |
206 | + <green>0x3333</green> |
207 | + <blue>0x0555</blue> |
208 | + <alpha>0xffff</alpha> |
209 | + </default> |
210 | + </option> |
211 | + <option name="bonanza_mystical" type="bool"> |
212 | + <_short>Randomly Colored Fire</_short> |
213 | + <_long>Have random colors for the fire effect, also known as Mystical Fire.</_long> |
214 | + <default>false</default> |
215 | + </option> |
216 | + </subgroup> |
217 | + |
218 | + </group> |
219 | + |
220 | + </options> |
221 | + |
222 | + <extension base_plugin="animation"> |
223 | + <base_option>open_effects</base_option> |
224 | + <base_option>open_random_effects</base_option> |
225 | + <base_option>close_effects</base_option> |
226 | + <base_option>close_random_effects</base_option> |
227 | + <base_option>minimize_effects</base_option> |
228 | + <base_option>minimize_random_effects</base_option> |
229 | + <restriction> |
230 | + <value>animationplus:Blinds</value> |
231 | + <_name>Blinds</_name> |
232 | + </restriction> |
233 | + <restriction> |
234 | + <value>animationplus:Helix</value> |
235 | + <_name>Helix</_name> |
236 | + </restriction> |
237 | + <restriction> |
238 | + <value>animationplus:Bonanza</value> |
239 | + <_name>Bonanza</_name> |
240 | + </restriction> |
241 | + <restriction> |
242 | + <value>animationplus:Shatter</value> |
243 | + <_name>Shatter</_name> |
244 | + </restriction> |
245 | + </extension> |
246 | + |
247 | + </plugin> |
248 | +</compiz> |
249 | |
250 | === added directory 'plugins/animationplus/src' |
251 | === added file 'plugins/animationplus/src/animation_tex.h' |
252 | --- plugins/animationplus/src/animation_tex.h 1970-01-01 00:00:00 +0000 |
253 | +++ plugins/animationplus/src/animation_tex.h 2016-05-26 14:08:50 +0000 |
254 | @@ -0,0 +1,222 @@ |
255 | +/** |
256 | + * |
257 | + * Particle texture for Beryl benchmark plugin |
258 | + * |
259 | + * Copyright : (C) 2006 by Dennis Kasprzyk |
260 | + * E-mail : onestone@beryl-project.org |
261 | + * |
262 | + * |
263 | + * This program is free software; you can redistribute it and/or |
264 | + * modify it under the terms of the GNU General Public License |
265 | + * as published by the Free Software Foundation; either version 2 |
266 | + * of the License, or (at your option) any later version. |
267 | + * |
268 | + * This program is distributed in the hope that it will be useful, |
269 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
270 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
271 | + * GNU General Public License for more details. |
272 | + * |
273 | + **/ |
274 | + |
275 | +static const unsigned char fireTex[4097] = { |
276 | + "\0\0\0\0\377\377\377\3\377\377\377\2\377\377\377\5\377\377\377\7\377\377" |
277 | + "\377\6\377\377\377\6\377\377\377\12\377\377\377\13\377\377\377\11\377\377" |
278 | + "\377\12\377\377\377\12\377\377\377\14\377\377\377\14\377\377\377\14\377\377" |
279 | + "\377\16\377\377\377\15\377\377\377\14\377\377\377\12\377\377\377\13\377\377" |
280 | + "\377\13\377\377\377\11\377\377\377\12\377\377\377\12\377\377\377\10\377\377" |
281 | + "\377\7\377\377\377\6\377\377\377\6\377\377\377\5\377\377\377\2\0\0\0\0\0" |
282 | + "\0\0\0\377\377\377\4\377\377\377\3\377\377\377\4\377\377\377\7\377\377\377" |
283 | + "\6\377\377\377\10\377\377\377\11\377\377\377\11\377\377\377\14\377\377\377" |
284 | + "\14\377\377\377\15\377\377\377\16\377\377\377\20\377\377\377\21\377\377\377" |
285 | + "\20\377\377\377\22\377\377\377\20\377\377\377\21\377\377\377\17\377\377\377" |
286 | + "\20\377\377\377\17\377\377\377\13\377\377\377\13\377\377\377\13\377\377\377" |
287 | + "\14\377\377\377\11\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377" |
288 | + "\4\377\377\377\1\0\0\0\0\377\377\377\5\377\377\377\4\377\377\377\6\377\377" |
289 | + "\377\6\377\377\377\12\377\377\377\12\377\377\377\11\377\377\377\14\377\377" |
290 | + "\377\15\377\377\377\20\377\377\377\20\377\377\377\24\377\377\377\24\377\377" |
291 | + "\377\23\377\377\377\23\377\377\377\26\377\377\377\25\377\377\377\23\377\377" |
292 | + "\377\21\377\377\377\24\377\377\377\22\377\377\377\17\377\377\377\17\377\377" |
293 | + "\377\15\377\377\377\15\377\377\377\11\377\377\377\11\377\377\377\7\377\377" |
294 | + "\377\7\377\377\377\6\377\377\377\3\377\377\377\3\377\377\377\6\377\377\377" |
295 | + "\6\377\377\377\6\377\377\377\12\377\377\377\13\377\377\377\13\377\377\377" |
296 | + "\13\377\377\377\17\377\377\377\22\377\377\377\24\377\377\377\22\377\377\377" |
297 | + "\30\377\377\377\30\377\377\377\31\377\377\377\31\377\377\377\33\377\377\377" |
298 | + "\31\377\377\377\30\377\377\377\30\377\377\377\30\377\377\377\25\377\377\377" |
299 | + "\25\377\377\377\23\377\377\377\22\377\377\377\17\377\377\377\13\377\377\377" |
300 | + "\12\377\377\377\11\377\377\377\7\377\377\377\6\377\377\377\5\377\377\377" |
301 | + "\4\377\377\377\7\377\377\377\6\377\377\377\12\377\377\377\11\377\377\377" |
302 | + "\14\377\377\377\15\377\377\377\20\377\377\377\22\377\377\377\25\377\377\377" |
303 | + "\30\377\377\377\32\377\377\377\35\377\377\377\34\377\377\377\34\377\377\377" |
304 | + "\36\377\377\377\40\377\377\377\36\377\377\377\34\377\377\377\34\377\377\377" |
305 | + "\34\377\377\377\32\377\377\377\31\377\377\377\26\377\377\377\25\377\377\377" |
306 | + "\22\377\377\377\16\377\377\377\12\377\377\377\12\377\377\377\12\377\377\377" |
307 | + "\10\377\377\377\6\377\377\377\4\377\377\377\10\377\377\377\11\377\377\377" |
308 | + "\12\377\377\377\13\377\377\377\16\377\377\377\21\377\377\377\22\377\377\377" |
309 | + "\25\377\377\377\30\377\377\377\34\377\377\377\37\377\377\377!\377\377\377" |
310 | + "\"\377\377\377#\377\377\377#\377\377\377&\377\377\377&\377\377\377$\377\377" |
311 | + "\377#\377\377\377\40\377\377\377!\377\377\377\35\377\377\377\34\377\377\377" |
312 | + "\25\377\377\377\24\377\377\377\21\377\377\377\15\377\377\377\14\377\377\377" |
313 | + "\14\377\377\377\12\377\377\377\6\377\377\377\6\377\377\377\10\377\377\377" |
314 | + "\12\377\377\377\12\377\377\377\16\377\377\377\22\377\377\377\24\377\377\377" |
315 | + "\26\377\377\377\30\377\377\377\34\377\377\377\37\377\377\377#\377\377\377" |
316 | + "&\377\377\377,\377\377\377+\377\377\377,\377\377\377-\377\377\377-\377\377" |
317 | + "\377,\377\377\377+\377\377\377&\377\377\377)\377\377\377$\377\377\377\34" |
318 | + "\377\377\377\34\377\377\377\27\377\377\377\24\377\377\377\23\377\377\377" |
319 | + "\17\377\377\377\15\377\377\377\12\377\377\377\7\377\377\377\6\377\377\377" |
320 | + "\12\377\377\377\12\377\377\377\16\377\377\377\21\377\377\377\22\377\377\377" |
321 | + "\27\377\377\377\31\377\377\377\36\377\377\377!\377\377\377%\377\377\377(" |
322 | + "\377\377\3771\377\377\3772\377\377\3775\377\377\377;\377\377\377<\377\377" |
323 | + "\3779\377\377\3778\377\377\3773\377\377\3771\377\377\377-\377\377\377'\377" |
324 | + "\377\377\"\377\377\377\34\377\377\377\36\377\377\377\32\377\377\377\25\377" |
325 | + "\377\377\21\377\377\377\15\377\377\377\11\377\377\377\12\377\377\377\7\377" |
326 | + "\377\377\13\377\377\377\14\377\377\377\17\377\377\377\21\377\377\377\31\377" |
327 | + "\377\377\31\377\377\377\35\377\377\377!\377\377\377'\377\377\377+\377\377" |
328 | + "\3771\377\377\377=\377\377\377E\377\377\377H\377\377\377M\377\377\377M\377" |
329 | + "\377\377J\377\377\377I\377\377\377A\377\377\377A\377\377\3778\377\377\377" |
330 | + ",\377\377\377%\377\377\377$\377\377\377\"\377\377\377\34\377\377\377\24\377" |
331 | + "\377\377\22\377\377\377\17\377\377\377\13\377\377\377\12\377\377\377\11\377" |
332 | + "\377\377\13\377\377\377\14\377\377\377\20\377\377\377\23\377\377\377\27\377" |
333 | + "\377\377\35\377\377\377$\377\377\377(\377\377\377.\377\377\3776\377\377\377" |
334 | + "=\377\377\377H\377\377\377W\377\377\377Y\377\377\377]\377\377\377a\377\377" |
335 | + "\377\\\377\377\377\\\377\377\377U\377\377\377O\377\377\377?\377\377\3774" |
336 | + "\377\377\377-\377\377\377+\377\377\377\40\377\377\377\32\377\377\377\27\377" |
337 | + "\377\377\23\377\377\377\22\377\377\377\15\377\377\377\11\377\377\377\13\377" |
338 | + "\377\377\12\377\377\377\15\377\377\377\21\377\377\377\25\377\377\377\30\377" |
339 | + "\377\377\37\377\377\377$\377\377\377.\377\377\3779\377\377\377?\377\377\377" |
340 | + "N\377\377\377X\377\377\377h\377\377\377r\377\377\377w\377\377\377|\377\377" |
341 | + "\377x\377\377\377p\377\377\377k\377\377\377\\\377\377\377J\377\377\377F\377" |
342 | + "\377\3779\377\377\377*\377\377\377$\377\377\377\36\377\377\377\30\377\377" |
343 | + "\377\25\377\377\377\24\377\377\377\20\377\377\377\14\377\377\377\12\377\377" |
344 | + "\377\15\377\377\377\17\377\377\377\22\377\377\377\27\377\377\377\34\377\377" |
345 | + "\377\40\377\377\377%\377\377\377.\377\377\377<\377\377\377M\377\377\377[" |
346 | + "\377\377\377l\377\377\377~\377\377\377\227\377\377\377\230\377\377\377\234" |
347 | + "\377\377\377\233\377\377\377\226\377\377\377\205\377\377\377i\377\377\377" |
348 | + "b\377\377\377P\377\377\3779\377\377\377-\377\377\377(\377\377\377!\377\377" |
349 | + "\377\35\377\377\377\32\377\377\377\25\377\377\377\21\377\377\377\13\377\377" |
350 | + "\377\12\377\377\377\15\377\377\377\21\377\377\377\23\377\377\377\31\377\377" |
351 | + "\377\37\377\377\377!\377\377\377(\377\377\3774\377\377\377@\377\377\377Q" |
352 | + "\377\377\377g\377\377\377\200\377\377\377\231\377\377\377\254\377\377\377" |
353 | + "\275\377\377\377\310\377\377\377\304\377\377\377\264\377\377\377\227\377" |
354 | + "\377\377\212\377\377\377f\377\377\377Q\377\377\377B\377\377\377:\377\377" |
355 | + "\377/\377\377\377&\377\377\377\36\377\377\377\32\377\377\377\26\377\377\377" |
356 | + "\21\377\377\377\14\377\377\377\12\377\377\377\17\377\377\377\22\377\377\377" |
357 | + "\24\377\377\377\31\377\377\377\40\377\377\377&\377\377\377-\377\377\377:" |
358 | + "\377\377\377H\377\377\377X\377\377\377k\377\377\377\220\377\377\377\252\377" |
359 | + "\377\377\324\377\377\377\363\377\377\377\370\377\377\377\366\377\377\377" |
360 | + "\335\377\377\377\263\377\377\377\221\377\377\377w\377\377\377b\377\377\377" |
361 | + "P\377\377\377>\377\377\3770\377\377\377&\377\377\377\37\377\377\377\32\377" |
362 | + "\377\377\26\377\377\377\23\377\377\377\15\377\377\377\11\377\377\377\16\377" |
363 | + "\377\377\21\377\377\377\27\377\377\377\33\377\377\377\"\377\377\377(\377" |
364 | + "\377\377/\377\377\377<\377\377\377N\377\377\377b\377\377\377z\377\377\377" |
365 | + "\231\377\377\377\275\377\377\377\361\377\377\377\375\377\377\377\376\377" |
366 | + "\377\377\376\377\377\377\370\377\377\377\316\377\377\377\240\377\377\377" |
367 | + "\205\377\377\377b\377\377\377L\377\377\377<\377\377\377.\377\377\377&\377" |
368 | + "\377\377\40\377\377\377\33\377\377\377\26\377\377\377\22\377\377\377\15\377" |
369 | + "\377\377\12\377\377\377\16\377\377\377\22\377\377\377\24\377\377\377\32\377" |
370 | + "\377\377\40\377\377\377$\377\377\377,\377\377\377:\377\377\377L\377\377\377" |
371 | + "`\377\377\377|\377\377\377\231\377\377\377\310\377\377\377\372\377\377\377" |
372 | + "\375\377\377\377\376\377\377\377\376\377\377\377\375\377\377\377\332\377" |
373 | + "\377\377\241\377\377\377\207\377\377\377f\377\377\377R\377\377\377@\377\377" |
374 | + "\3773\377\377\377+\377\377\377\"\377\377\377\35\377\377\377\30\377\377\377" |
375 | + "\24\377\377\377\17\377\377\377\14\377\377\377\16\377\377\377\22\377\377\377" |
376 | + "\25\377\377\377\30\377\377\377\40\377\377\377$\377\377\377,\377\377\377;" |
377 | + "\377\377\377N\377\377\377e\377\377\377\206\377\377\377\246\377\377\377\327" |
378 | + "\377\377\377\374\377\377\377\375\377\377\377\376\377\377\377\376\377\377" |
379 | + "\377\374\377\377\377\331\377\377\377\243\377\377\377\210\377\377\377b\377" |
380 | + "\377\377O\377\377\377>\377\377\377.\377\377\377&\377\377\377\40\377\377\377" |
381 | + "\33\377\377\377\27\377\377\377\22\377\377\377\15\377\377\377\12\377\377\377" |
382 | + "\16\377\377\377\22\377\377\377\23\377\377\377\32\377\377\377\40\377\377\377" |
383 | + "'\377\377\3770\377\377\377?\377\377\377U\377\377\377h\377\377\377\200\377" |
384 | + "\377\377\237\377\377\377\270\377\377\377\344\377\377\377\372\377\377\377" |
385 | + "\375\377\377\377\376\377\377\377\354\377\377\377\275\377\377\377\227\377" |
386 | + "\377\377\200\377\377\377e\377\377\377Q\377\377\377>\377\377\377.\377\377" |
387 | + "\377%\377\377\377\40\377\377\377\33\377\377\377\26\377\377\377\22\377\377" |
388 | + "\377\15\377\377\377\11\377\377\377\17\377\377\377\22\377\377\377\25\377\377" |
389 | + "\377\31\377\377\377\"\377\377\377*\377\377\3773\377\377\377=\377\377\377" |
390 | + "J\377\377\377^\377\377\377o\377\377\377\211\377\377\377\235\377\377\377\271" |
391 | + "\377\377\377\327\377\377\377\342\377\377\377\335\377\377\377\302\377\377" |
392 | + "\377\240\377\377\377\216\377\377\377k\377\377\377X\377\377\377C\377\377\377" |
393 | + "9\377\377\377/\377\377\377&\377\377\377\"\377\377\377\33\377\377\377\26\377" |
394 | + "\377\377\22\377\377\377\14\377\377\377\12\377\377\377\15\377\377\377\22\377" |
395 | + "\377\377\31\377\377\377\35\377\377\377\37\377\377\377$\377\377\377,\377\377" |
396 | + "\3777\377\377\377A\377\377\377Q\377\377\377[\377\377\377p\377\377\377\212" |
397 | + "\377\377\377\231\377\377\377\242\377\377\377\253\377\377\377\251\377\377" |
398 | + "\377\236\377\377\377\215\377\377\377u\377\377\377b\377\377\377O\377\377\377" |
399 | + "<\377\377\3771\377\377\377)\377\377\377\"\377\377\377\34\377\377\377\32\377" |
400 | + "\377\377\27\377\377\377\21\377\377\377\16\377\377\377\12\377\377\377\17\377" |
401 | + "\377\377\21\377\377\377\20\377\377\377\27\377\377\377\37\377\377\377$\377" |
402 | + "\377\377&\377\377\377,\377\377\3778\377\377\377B\377\377\377R\377\377\377" |
403 | + "_\377\377\377k\377\377\377~\377\377\377\207\377\377\377\220\377\377\377\220" |
404 | + "\377\377\377\203\377\377\377q\377\377\377_\377\377\377V\377\377\377F\377" |
405 | + "\377\3777\377\377\377,\377\377\377%\377\377\377!\377\377\377\31\377\377\377" |
406 | + "\25\377\377\377\22\377\377\377\17\377\377\377\14\377\377\377\11\377\377\377" |
407 | + "\12\377\377\377\16\377\377\377\22\377\377\377\27\377\377\377\33\377\377\377" |
408 | + "\35\377\377\377\"\377\377\377(\377\377\377/\377\377\3779\377\377\377E\377" |
409 | + "\377\377L\377\377\377^\377\377\377d\377\377\377e\377\377\377k\377\377\377" |
410 | + "l\377\377\377d\377\377\377a\377\377\377O\377\377\377C\377\377\377=\377\377" |
411 | + "\3770\377\377\377)\377\377\377$\377\377\377\35\377\377\377\30\377\377\377" |
412 | + "\25\377\377\377\22\377\377\377\16\377\377\377\12\377\377\377\13\377\377\377" |
413 | + "\13\377\377\377\15\377\377\377\20\377\377\377\21\377\377\377\31\377\377\377" |
414 | + "\33\377\377\377\35\377\377\377$\377\377\377)\377\377\3771\377\377\3776\377" |
415 | + "\377\377@\377\377\377J\377\377\377N\377\377\377P\377\377\377S\377\377\377" |
416 | + "X\377\377\377P\377\377\377J\377\377\377E\377\377\3777\377\377\377,\377\377" |
417 | + "\377+\377\377\377%\377\377\377\40\377\377\377\32\377\377\377\26\377\377\377" |
418 | + "\21\377\377\377\21\377\377\377\14\377\377\377\11\377\377\377\12\377\377\377" |
419 | + "\13\377\377\377\11\377\377\377\14\377\377\377\21\377\377\377\23\377\377\377" |
420 | + "\27\377\377\377\33\377\377\377\37\377\377\377&\377\377\377(\377\377\377*" |
421 | + "\377\377\3774\377\377\3779\377\377\377<\377\377\377=\377\377\377C\377\377" |
422 | + "\377E\377\377\377?\377\377\3779\377\377\377:\377\377\377.\377\377\377(\377" |
423 | + "\377\377!\377\377\377!\377\377\377\35\377\377\377\31\377\377\377\24\377\377" |
424 | + "\377\21\377\377\377\16\377\377\377\12\377\377\377\11\377\377\377\10\377\377" |
425 | + "\377\10\377\377\377\11\377\377\377\13\377\377\377\16\377\377\377\22\377\377" |
426 | + "\377\25\377\377\377\30\377\377\377\33\377\377\377\"\377\377\377!\377\377" |
427 | + "\377%\377\377\377*\377\377\377-\377\377\3770\377\377\377/\377\377\3773\377" |
428 | + "\377\3772\377\377\3774\377\377\377-\377\377\377,\377\377\377*\377\377\377" |
429 | + "\"\377\377\377\37\377\377\377\32\377\377\377\33\377\377\377\27\377\377\377" |
430 | + "\21\377\377\377\17\377\377\377\16\377\377\377\12\377\377\377\11\377\377\377" |
431 | + "\6\377\377\377\10\377\377\377\12\377\377\377\11\377\377\377\15\377\377\377" |
432 | + "\20\377\377\377\22\377\377\377\23\377\377\377\30\377\377\377\32\377\377\377" |
433 | + "\35\377\377\377\40\377\377\377!\377\377\377%\377\377\377(\377\377\377&\377" |
434 | + "\377\377)\377\377\377(\377\377\377+\377\377\377$\377\377\377!\377\377\377" |
435 | + "#\377\377\377\36\377\377\377\30\377\377\377\30\377\377\377\24\377\377\377" |
436 | + "\22\377\377\377\20\377\377\377\15\377\377\377\11\377\377\377\12\377\377\377" |
437 | + "\6\377\377\377\6\377\377\377\7\377\377\377\7\377\377\377\11\377\377\377\12" |
438 | + "\377\377\377\16\377\377\377\17\377\377\377\22\377\377\377\23\377\377\377" |
439 | + "\26\377\377\377\31\377\377\377\33\377\377\377\34\377\377\377!\377\377\377" |
440 | + "\40\377\377\377\"\377\377\377\"\377\377\377\"\377\377\377&\377\377\377\36" |
441 | + "\377\377\377\35\377\377\377\35\377\377\377\34\377\377\377\26\377\377\377" |
442 | + "\24\377\377\377\23\377\377\377\20\377\377\377\15\377\377\377\14\377\377\377" |
443 | + "\13\377\377\377\7\377\377\377\5\377\377\377\6\377\377\377\7\377\377\377\6" |
444 | + "\377\377\377\11\377\377\377\12\377\377\377\11\377\377\377\15\377\377\377" |
445 | + "\16\377\377\377\21\377\377\377\22\377\377\377\26\377\377\377\26\377\377\377" |
446 | + "\30\377\377\377\33\377\377\377\32\377\377\377\34\377\377\377\33\377\377\377" |
447 | + "\32\377\377\377\37\377\377\377\31\377\377\377\31\377\377\377\27\377\377\377" |
448 | + "\30\377\377\377\21\377\377\377\22\377\377\377\17\377\377\377\14\377\377\377" |
449 | + "\11\377\377\377\11\377\377\377\12\377\377\377\6\377\377\377\6\377\377\377" |
450 | + "\4\377\377\377\6\377\377\377\6\377\377\377\5\377\377\377\7\377\377\377\13" |
451 | + "\377\377\377\11\377\377\377\12\377\377\377\16\377\377\377\21\377\377\377" |
452 | + "\21\377\377\377\20\377\377\377\22\377\377\377\30\377\377\377\26\377\377\377" |
453 | + "\27\377\377\377\30\377\377\377\27\377\377\377\30\377\377\377\26\377\377\377" |
454 | + "\23\377\377\377\22\377\377\377\20\377\377\377\20\377\377\377\16\377\377\377" |
455 | + "\14\377\377\377\11\377\377\377\11\377\377\377\10\377\377\377\6\377\377\377" |
456 | + "\6\377\377\377\4\377\377\377\3\377\377\377\4\377\377\377\4\377\377\377\4" |
457 | + "\377\377\377\7\377\377\377\10\377\377\377\12\377\377\377\10\377\377\377\11" |
458 | + "\377\377\377\15\377\377\377\16\377\377\377\16\377\377\377\20\377\377\377" |
459 | + "\23\377\377\377\21\377\377\377\23\377\377\377\22\377\377\377\22\377\377\377" |
460 | + "\21\377\377\377\22\377\377\377\22\377\377\377\20\377\377\377\16\377\377\377" |
461 | + "\15\377\377\377\12\377\377\377\11\377\377\377\12\377\377\377\7\377\377\377" |
462 | + "\6\377\377\377\7\377\377\377\5\377\377\377\4\377\377\377\1\377\377\377\1" |
463 | + "\377\377\377\3\377\377\377\3\377\377\377\6\377\377\377\7\377\377\377\6\377" |
464 | + "\377\377\10\377\377\377\12\377\377\377\12\377\377\377\11\377\377\377\13\377" |
465 | + "\377\377\16\377\377\377\16\377\377\377\16\377\377\377\17\377\377\377\16\377" |
466 | + "\377\377\16\377\377\377\17\377\377\377\17\377\377\377\15\377\377\377\14\377" |
467 | + "\377\377\12\377\377\377\11\377\377\377\12\377\377\377\12\377\377\377\7\377" |
468 | + "\377\377\6\377\377\377\6\377\377\377\6\377\377\377\3\377\377\377\1\377\377" |
469 | + "\377\1\0\0\0\0\0\0\0\0\377\377\377\2\377\377\377\4\377\377\377\7\377\377" |
470 | + "\377\6\377\377\377\6\377\377\377\7\377\377\377\13\377\377\377\13\377\377" |
471 | + "\377\10\377\377\377\11\377\377\377\11\377\377\377\11\377\377\377\15\377\377" |
472 | + "\377\13\377\377\377\14\377\377\377\11\377\377\377\13\377\377\377\11\377\377" |
473 | + "\377\12\377\377\377\13\377\377\377\11\377\377\377\11\377\377\377\6\377\377" |
474 | + "\377\7\377\377\377\4\377\377\377\5\377\377\377\3\377\377\377\1\0\0\0\0\0" |
475 | + "\0\0\0" |
476 | +}; |
477 | |
478 | === added file 'plugins/animationplus/src/animationplus.cpp' |
479 | --- plugins/animationplus/src/animationplus.cpp 1970-01-01 00:00:00 +0000 |
480 | +++ plugins/animationplus/src/animationplus.cpp 2016-05-26 14:08:50 +0000 |
481 | @@ -0,0 +1,159 @@ |
482 | +/** |
483 | + * Example Animation extension plugin for compiz |
484 | + * |
485 | + * |
486 | + * This program is free software; you can redistribute it and/or |
487 | + * modify it under the terms of the GNU General Public License |
488 | + * as published by the Free Software Foundation; either version 2 |
489 | + * of the License, or (at your option) any later version. |
490 | + * |
491 | + * This program is distributed in the hope that it will be useful, |
492 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
493 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
494 | + * GNU General Public License for more details. |
495 | + * |
496 | + * You should have received a copy of the GNU General Public License |
497 | + * along with this program; if not, write to the Free Software |
498 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
499 | + **/ |
500 | + |
501 | +#ifdef HAVE_CONFIG_H |
502 | +#include <config.h> |
503 | +#endif |
504 | + |
505 | +#include <limits.h> |
506 | +#include <GL/glu.h> |
507 | +#include "private.h" |
508 | + |
509 | +COMPIZ_PLUGIN_20090315 (animationplus, AnimPlusPluginVTable); |
510 | + |
511 | +AnimEffect animEffects[NUM_EFFECTS]; |
512 | + |
513 | +ExtensionPluginAnimPlus animPlusExtPluginInfo (CompString ("animationplus"), |
514 | + NUM_EFFECTS, animEffects, NULL, |
515 | + NUM_NONEFFECT_OPTIONS); |
516 | + |
517 | +ExtensionPluginInfo * |
518 | +BasePlusAnim::getExtensionPluginInfo () |
519 | +{ |
520 | + return &animPlusExtPluginInfo; |
521 | +} |
522 | + |
523 | +BasePlusAnim::BasePlusAnim (CompWindow *w, |
524 | + WindowEvent curWindowEvent, |
525 | + float duration, |
526 | + const AnimEffect info, |
527 | + const CompRect &icon) : |
528 | + Animation::Animation (w, curWindowEvent, duration, info, icon), |
529 | + mCScreen (CompositeScreen::get (::screen)), |
530 | + mGScreen (GLScreen::get (::screen)) |
531 | +{ |
532 | +} |
533 | + |
534 | +/* |
535 | +// For effects with custom polygon step functions: |
536 | +AnimExtEffectProperties fxAirplaneExtraProp = { |
537 | + .animStepPolygonFunc = fxAirplaneLinearAnimStepPolygon}; |
538 | +*/ |
539 | + |
540 | +AnimEffect AnimEffectBlinds; |
541 | +AnimEffect AnimEffectHelix; |
542 | +AnimEffect AnimEffectShatter; |
543 | +AnimEffect AnimEffectBonanza; |
544 | + |
545 | +void |
546 | +AnimPlusScreen::initAnimationList () |
547 | +{ |
548 | + int i = 0; |
549 | + |
550 | + AnimEffectUsedFor usedFor = AnimEffectUsedFor::all () |
551 | + .exclude (AnimEventShade) |
552 | + .exclude (AnimEventFocus); |
553 | + |
554 | + animEffects[i++] = AnimEffectBlinds = |
555 | + new AnimEffectInfo ("animationplus:Blinds", |
556 | + usedFor, |
557 | + &createAnimation <BlindsAnim>); |
558 | + |
559 | + /* Currently broken */ |
560 | + animEffects[i++] = AnimEffectBonanza = |
561 | + new AnimEffectInfo ("animationplus:Bonanza", |
562 | + usedFor, |
563 | + &createAnimation <BonanzaAnim>); |
564 | + |
565 | + animEffects[i++] = AnimEffectHelix = |
566 | + new AnimEffectInfo ("animationplus:Helix", |
567 | + usedFor, |
568 | + &createAnimation <HelixAnim>); |
569 | + |
570 | + animEffects[i++] = AnimEffectShatter = |
571 | + new AnimEffectInfo ("animationplus:Shatter", |
572 | + usedFor, |
573 | + &createAnimation <ShatterAnim>); |
574 | + |
575 | + animPlusExtPluginInfo.effectOptions = &getOptions (); |
576 | + |
577 | + AnimScreen *as = AnimScreen::get (::screen); |
578 | + |
579 | + as->addExtension (&animPlusExtPluginInfo); |
580 | +} |
581 | + |
582 | +AnimPlusScreen::AnimPlusScreen (CompScreen *s) : |
583 | + //cScreen (CompositeScreen::get (s)), |
584 | + //gScreen (GLScreen::get (s)), |
585 | + //aScreen (as), |
586 | + PluginClassHandler <AnimPlusScreen, CompScreen> (s), |
587 | + mOutput (s->fullscreenOutput ()) |
588 | +{ |
589 | + initAnimationList (); |
590 | +} |
591 | + |
592 | +AnimPlusScreen::~AnimPlusScreen () |
593 | +{ |
594 | + AnimScreen *as = AnimScreen::get (::screen); |
595 | + |
596 | + as->removeExtension (&animPlusExtPluginInfo); |
597 | + |
598 | + for (int i = 0; i < NUM_EFFECTS; i++) |
599 | + { |
600 | + delete animEffects[i]; |
601 | + animEffects[i] = NULL; |
602 | + } |
603 | +} |
604 | + |
605 | +AnimPlusWindow::AnimPlusWindow (CompWindow *w) : |
606 | + PluginClassHandler<AnimPlusWindow, CompWindow> (w), |
607 | + mWindow (w), |
608 | + aWindow (AnimWindow::get (w)) |
609 | +{ |
610 | +} |
611 | + |
612 | +AnimPlusWindow::~AnimPlusWindow () |
613 | +{ |
614 | + Animation *curAnim = aWindow->curAnimation (); |
615 | + |
616 | + if (!curAnim) |
617 | + return; |
618 | + |
619 | + // We need to interrupt and clean up the animation currently being played |
620 | + // by animationsim for this window (if any) |
621 | + if (curAnim->remainingTime () > 0 && |
622 | + curAnim->getExtensionPluginInfo ()->name == |
623 | + CompString ("animationplus")) |
624 | + { |
625 | + aWindow->postAnimationCleanUp (); |
626 | + } |
627 | +} |
628 | + |
629 | +bool |
630 | +AnimPlusPluginVTable::init () |
631 | +{ |
632 | + if (!CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) || |
633 | + !CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) || |
634 | + !CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI) || |
635 | + !CompPlugin::checkPluginABI ("animation", ANIMATION_ABI) || |
636 | + !CompPlugin::checkPluginABI ("animationaddon", ANIMATIONADDON_ABI)) |
637 | + return false; |
638 | + |
639 | + return true; |
640 | +} |
641 | |
642 | === added file 'plugins/animationplus/src/blinds.cpp' |
643 | --- plugins/animationplus/src/blinds.cpp 1970-01-01 00:00:00 +0000 |
644 | +++ plugins/animationplus/src/blinds.cpp 2016-05-26 14:08:50 +0000 |
645 | @@ -0,0 +1,70 @@ |
646 | +/* |
647 | + * Animation plugin for compiz/beryl |
648 | + * |
649 | + * blinds.cpp |
650 | + * |
651 | + * Copyright : (C) 2008 Kevin DuBois |
652 | + * E-mail : kdub432@gmail.com |
653 | + * |
654 | + * Based on other animations by |
655 | + * : Erkin Bahceci |
656 | + * E-mail : erkinbah@gmail.com |
657 | + * |
658 | + * Which were based on Wobbly and Minimize plugins by |
659 | + * : David Reveman |
660 | + * E-mail : davidr@novell.com> |
661 | + * |
662 | + * This program is free software; you can redistribute it and/or |
663 | + * modify it under the terms of the GNU General Public License |
664 | + * as published by the Free Software Foundation; either version 2 |
665 | + * of the License, or (at your option) any later version. |
666 | + *const float ExplodeAnim::kDurationFactor = 1.43; |
667 | + * This program is distributed in the hope that it will be useful, |
668 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
669 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
670 | + * GNU General Public License for more details. |
671 | + * |
672 | + * You should have received a copy of the GNU General Public License |
673 | + * along with this program; if not, write to the Free Software |
674 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
675 | + */ |
676 | + |
677 | +#include "private.h" |
678 | + |
679 | +const float BlindsAnim::kDurationFactor = 1.43; |
680 | + |
681 | + |
682 | +BlindsAnim::BlindsAnim (CompWindow *w, |
683 | + WindowEvent curWindowEvent, |
684 | + float duration, |
685 | + const AnimEffect info, |
686 | + const CompRect &icon) : |
687 | + Animation::Animation (w, curWindowEvent, kDurationFactor * duration, info, icon), |
688 | + PolygonAnim::PolygonAnim (w, curWindowEvent, kDurationFactor * duration, info, icon) |
689 | +{ |
690 | + mAllFadeDuration = 0.3f; |
691 | + mDoDepthTest = true; |
692 | + mDoLighting = true; |
693 | + mCorrectPerspective = CorrectPerspectivePolygon; |
694 | + mBackAndSidesFadeDur = 0.2f; |
695 | +} |
696 | + |
697 | +void |
698 | +BlindsAnim::init () |
699 | +{ |
700 | + ANIMPLUS_SCREEN (screen); |
701 | + |
702 | + tessellateIntoRectangles (as->optionGetBlindsGridx (), 1, |
703 | + as->optionGetBlindsThickness ()); |
704 | + |
705 | + foreach (PolygonObject *p, mPolygons) |
706 | + { |
707 | + //rotate around y axis |
708 | + p->rotAxis.set (0, 1, 0); |
709 | + p->finalRelPos.set (0, 0, 0); |
710 | + |
711 | + int numberOfHalfTwists = as->optionGetBlindsNumHalftwists (); |
712 | + p->finalRotAng = 180 * numberOfHalfTwists ; |
713 | + } |
714 | +} |
715 | + |
716 | |
717 | === added file 'plugins/animationplus/src/bonanza.cpp' |
718 | --- plugins/animationplus/src/bonanza.cpp 1970-01-01 00:00:00 +0000 |
719 | +++ plugins/animationplus/src/bonanza.cpp 2016-05-26 14:08:50 +0000 |
720 | @@ -0,0 +1,241 @@ |
721 | +/* |
722 | + * Animation plugin for compiz/beryl |
723 | + * |
724 | + * bonanza.c |
725 | + * |
726 | + * Copyright : (C) 2008 Kevin DuBois |
727 | + * E-mail : kdub423@gmail.com |
728 | + * |
729 | + * Based on animations system by: (C) 2006 Erkin Bahceci |
730 | + * E-mail : erkinbah@gmail.com |
731 | + * |
732 | + * Based on particle system added by : (C) 2006 Dennis Kasprzyk |
733 | + * E-mail : onestone@beryl-project.org |
734 | + * |
735 | + * This program is free software; you can redistribute it and/or |
736 | + * modify it under the terms of the GNU General Public License |
737 | + * as published by the Free Software Foundation; either version 2 |
738 | + * of the License, or (at your option) any later version. |
739 | + * |
740 | + * This program is distributed in the hope that it will be useful, |
741 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
742 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
743 | + * GNU General Public License for more details. |
744 | + * |
745 | + * You should have received a copy of the GNU General Public License |
746 | + * along with this program; if not, write to the Free Software |
747 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
748 | + */ |
749 | + |
750 | +#include "private.h" |
751 | +#include "animation_tex.h" |
752 | + |
753 | +// ===================== Effect: Burn ========================= |
754 | + |
755 | +BonanzaAnim::BonanzaAnim (CompWindow *w, |
756 | + WindowEvent curWindowEvent, |
757 | + float duration, |
758 | + const AnimEffect info, |
759 | + const CompRect &icon) : |
760 | + Animation::Animation (w, curWindowEvent, duration, info, icon), |
761 | + ParticleAnim::ParticleAnim (w, curWindowEvent, duration, info, icon) |
762 | +{ |
763 | + ANIMPLUS_SCREEN (screen); |
764 | + |
765 | + // Light Particles are for extras, dark particles unused? |
766 | + initLightDarkParticles (as->optionGetBonanzaParticles (), |
767 | + as->optionGetBonanzaParticles () / 10, |
768 | + 0.125, |
769 | + 0.5); |
770 | + |
771 | + mAnimFireDirection = 0; |
772 | +} |
773 | + |
774 | +void |
775 | +BonanzaAnim::genFire (int x, |
776 | + int y, |
777 | + int radius, |
778 | + float size, |
779 | + float time) |
780 | +{ |
781 | + ANIMPLUS_SCREEN (screen); |
782 | + |
783 | + ParticleSystem &ps = mParticleSystems[0]; |
784 | + |
785 | + float fireLife = as->optionGetBonanzaLife (); |
786 | + float fireLifeNeg = 1 - fireLife; |
787 | + float fadeExtra = 0.2f * (1.01 - fireLife); |
788 | + float max_new = ps.particles ().size () * (time / 50) * (1.05 - fireLife); |
789 | + float numParticles = ps.particles ().size (); |
790 | + |
791 | + unsigned short *c = as->optionGetBonanzaColor (); |
792 | + float colr1 = (float)c[0] / 0xffff; |
793 | + float colg1 = (float)c[1] / 0xffff; |
794 | + float colb1 = (float)c[2] / 0xffff; |
795 | + float colr2 = 1 / 1.7 * (float)c[0] / 0xffff; |
796 | + float colg2 = 1 / 1.7 * (float)c[1] / 0xffff; |
797 | + float colb2 = 1 / 1.7 * (float)c[2] / 0xffff; |
798 | + float cola = (float)c[3] / 0xffff; |
799 | + float rVal; |
800 | + |
801 | + Particle *part = &(ps.particles ()[0]); |
802 | + |
803 | + float deg = 0; |
804 | + float inc = 2.0 * 3.1415 / numParticles; |
805 | + float partw = 5.00; |
806 | + float parth = partw * 1.5; |
807 | + bool mysticalFire = as->optionGetBonanzaMystical (); |
808 | + |
809 | + for (unsigned int i = 0; i < numParticles && max_new > 0; i++, part++) |
810 | + { |
811 | + deg += inc; |
812 | + |
813 | + if (part->life <= 0.0f) |
814 | + { |
815 | + // give gt new life |
816 | + rVal = (float)(random() & 0xff) / 255.0; |
817 | + part->life = 1.0f; |
818 | + part->fade = rVal * fireLifeNeg + fadeExtra; // Random Fade Value |
819 | + |
820 | + // set size |
821 | + part->width = partw; |
822 | + part->height = parth; |
823 | + rVal = (float)(random() & 0xff) / 255.0; |
824 | + part->w_mod = part->h_mod = size * rVal; |
825 | + |
826 | + part->x = (float)x + (float) radius * cosf(deg); |
827 | + part->y = (float)y + (float) radius * sinf(deg); |
828 | + |
829 | + //clip |
830 | + if (part->x <= 0) |
831 | + part->x = 0; |
832 | + if (part->x >= 2 * x) |
833 | + part->x = 2*x; |
834 | + |
835 | + if (part->y <= 0) |
836 | + part->y = 0; |
837 | + if (part->y >= 2 * y) |
838 | + part->y = 2*y; |
839 | + |
840 | + part->z = 0.0; |
841 | + |
842 | + part->xo = part->x; |
843 | + part->yo = part->y; |
844 | + part->zo = 0.0f; |
845 | + |
846 | + // set speed and direction |
847 | + rVal = (float)(random() & 0xff) / 255.0; |
848 | + part->xi = ((rVal * 20.0) - 10.0f); |
849 | + rVal = (float)(random() & 0xff) / 255.0; |
850 | + part->yi = ((rVal * 20.0) - 15.0f); |
851 | + part->zi = 0.0f; |
852 | + |
853 | + if (mysticalFire) |
854 | + { |
855 | + // Random colors! (aka Mystical Fire) |
856 | + rVal = (float)(random() & 0xff) / 255.0; |
857 | + part->r = rVal; |
858 | + rVal = (float)(random() & 0xff) / 255.0; |
859 | + part->g = rVal; |
860 | + rVal = (float)(random() & 0xff) / 255.0; |
861 | + part->b = rVal; |
862 | + } |
863 | + else |
864 | + { |
865 | + rVal = (float)(random() & 0xff) / 255.0; |
866 | + part->r = colr1 - rVal * colr2; |
867 | + part->g = colg1 - rVal * colg2; |
868 | + part->b = colb1 - rVal * colb2; |
869 | + } |
870 | + // set transparancy |
871 | + part->a = cola; |
872 | + |
873 | + // set gravity |
874 | + part->xg = (part->x < part->xo) ? 1.0 : -1.0; |
875 | + part->yg = -3.0f; |
876 | + part->zg = 0.0f; |
877 | + |
878 | + ps.activate (); |
879 | + max_new -= 1; |
880 | + } |
881 | + else |
882 | + { |
883 | + part->xg = (part->x < part->xo) ? 1.0 : -1.0; |
884 | + } |
885 | + |
886 | + } |
887 | + |
888 | +} |
889 | + |
890 | +void |
891 | +BonanzaAnim::step (float time) |
892 | +{ |
893 | + float timestep = 2.0; |
894 | + CompRect rect = mWindow->outputRect (); |
895 | + |
896 | + mRemainingTime -= timestep; |
897 | + if (mRemainingTime <= 0) |
898 | + mRemainingTime = 0; // avoid sub-zero values |
899 | + float new_f = 1 - (mRemainingTime) / (mTotalTime - timestep); |
900 | + |
901 | + if (mCurWindowEvent == WindowEventOpen || |
902 | + mCurWindowEvent == WindowEventUnminimize || |
903 | + mCurWindowEvent == WindowEventUnshade) |
904 | + { |
905 | + new_f = 1 - new_f; |
906 | + } |
907 | + |
908 | + mUseDrawRegion = true; |
909 | + mDrawRegion = CompRegion (); |
910 | + |
911 | + |
912 | + /* define an expanding circle as a union of rectangular X regions. */ |
913 | + float radius = 0; |
914 | + if (mRemainingTime > 0) |
915 | + { |
916 | + XPoint pts[20]; |
917 | + |
918 | + int i; |
919 | + float two_pi = 3.14159 * 2.0; |
920 | + int centerX = rect.centerX () + rect.x (); |
921 | + int centerY = rect.centerY () + rect.y (); |
922 | + float corner_dist = sqrt( powf(rect.centerX ()/2,2) + powf(rect.centerY (),2)); |
923 | + radius = new_f * corner_dist; |
924 | + for (i = 0; i < 20; i++) |
925 | + { |
926 | + pts[i].x = centerX + (int)(radius * cosf( (float) i/20.0 * two_pi )); |
927 | + pts[i].y = centerY + (int)(radius * sinf( (float) i/20.0 * two_pi )); |
928 | + } |
929 | + |
930 | + Region pointsRegion = XPolygonRegion (&pts[0], 20, WindingRule);; |
931 | + mDrawRegion = CompRegionRef(pointsRegion) - emptyRegion.united (rect); |
932 | + XDestroyRegion (pointsRegion); |
933 | + } |
934 | + else |
935 | + { |
936 | + mDrawRegion = emptyRegion; |
937 | + } |
938 | + |
939 | + |
940 | + mUseDrawRegion = (fabs (new_f) > 1e-5); |
941 | + |
942 | + genFire (rect.centerX (), |
943 | + rect.centerY (), |
944 | + radius, |
945 | + WIN_W(mWindow) / 40.0, |
946 | + time); |
947 | + |
948 | + if (mRemainingTime <= 0 && mParticleSystems.size () && mParticleSystems.at (0).active ()) |
949 | + { |
950 | + mRemainingTime = 0; |
951 | + } |
952 | + |
953 | + if (mParticleSystems.empty () || !mParticleSystems.at (0).active ()) |
954 | + { |
955 | + mParticleSystems.clear (); |
956 | + // Abort animation |
957 | + compLogMessage ("animationaddon", CompLogLevelError, "Couldn't do bonanza animation\n"); |
958 | + mRemainingTime = 0; |
959 | + } |
960 | +} |
961 | + |
962 | |
963 | === added file 'plugins/animationplus/src/helix.cpp' |
964 | --- plugins/animationplus/src/helix.cpp 1970-01-01 00:00:00 +0000 |
965 | +++ plugins/animationplus/src/helix.cpp 2016-05-26 14:08:50 +0000 |
966 | @@ -0,0 +1,93 @@ |
967 | +/* |
968 | + * Animation plugin for compiz/beryl |
969 | + * |
970 | + * animation.c |
971 | + * |
972 | + * Copyright : (C) 2008 Kevin DuBois |
973 | + * E-mail : kdub432@gmail.com |
974 | + * |
975 | + * Based on other animations by |
976 | + * : Erkin Bahceci |
977 | + * E-mail : erkinbah@gmail.com |
978 | + * |
979 | + * Which were based on Wobbly and Minimize plugins by |
980 | + * : David Reveman |
981 | + * E-mail : davidr@novell.com> |
982 | + * |
983 | + * This program is free software; you can redistribute it and/or |
984 | + * modify it under the terms of the GNU General Public License |
985 | + * as published by the Free Software Foundation; either version 2 |
986 | + * of the License, or (at your option) any later version. |
987 | + * |
988 | + * This program is distributed in the hope that it will be useful, |
989 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
990 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
991 | + * GNU General Public License for more details. |
992 | + * |
993 | + * You should have received a copy of the GNU General Public License |
994 | + * along with this program; if not, write to the Free Software |
995 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
996 | + */ |
997 | + |
998 | +#include "private.h" |
999 | + |
1000 | +const float HelixAnim::kDurationFactor = 1.43; |
1001 | + |
1002 | +HelixAnim::HelixAnim (CompWindow *w, |
1003 | + WindowEvent curWindowEvent, |
1004 | + float duration, |
1005 | + const AnimEffect info, |
1006 | + const CompRect &icon) : |
1007 | + Animation::Animation (w, curWindowEvent, kDurationFactor * duration, info, icon), |
1008 | + PolygonAnim::PolygonAnim (w, curWindowEvent, kDurationFactor * duration, info, icon) |
1009 | +{ |
1010 | + mAllFadeDuration = 0.4f; |
1011 | + mBackAndSidesFadeDur = 0.2f; |
1012 | + mDoDepthTest = TRUE; |
1013 | + mDoLighting = TRUE; |
1014 | + mCorrectPerspective = CorrectPerspectivePolygon; |
1015 | +} |
1016 | + |
1017 | +void |
1018 | +HelixAnim::init () |
1019 | +{ |
1020 | + ANIMPLUS_SCREEN (screen); |
1021 | + |
1022 | + int gridsizeY = as->optionGetHelixGridy (); |
1023 | + int count = 0; |
1024 | + |
1025 | + tessellateIntoRectangles (1, gridsizeY, as->optionGetHelixThickness ()); |
1026 | + |
1027 | + foreach (PolygonObject *p, mPolygons) |
1028 | + { |
1029 | + |
1030 | + //rotate around y axis normally, or the z axis if the effect is in vertical mode |
1031 | + if (as->optionGetHelixDirection ()) |
1032 | + p->rotAxis.set (0, 0, 1); |
1033 | + else |
1034 | + p->rotAxis.set (0, 1, 0); |
1035 | + |
1036 | + //only move the pieces in a 'vertical' rotation |
1037 | + if (as->optionGetHelixDirection ()) |
1038 | + p->finalRelPos.set (0, |
1039 | + -1 * ((mWindow->height () / gridsizeY) * (count - gridsizeY/2)), |
1040 | + 0); |
1041 | + else |
1042 | + p->finalRelPos.set (0, |
1043 | + 0, |
1044 | + 0); |
1045 | + |
1046 | + //determine how long, and what direction to spin |
1047 | + int numberOfTwists = as->optionGetHelixNumTwists (); |
1048 | + int spin_dir = as->optionGetHelixSpinDirection (); |
1049 | + |
1050 | + if (spin_dir) |
1051 | + p->finalRotAng = 270 - ( 2 * numberOfTwists * count); |
1052 | + else |
1053 | + p->finalRotAng = ( 2 * numberOfTwists * count) - 270; |
1054 | + |
1055 | + count++; |
1056 | + |
1057 | + } |
1058 | +} |
1059 | + |
1060 | |
1061 | === added file 'plugins/animationplus/src/private.h' |
1062 | --- plugins/animationplus/src/private.h 1970-01-01 00:00:00 +0000 |
1063 | +++ plugins/animationplus/src/private.h 2016-05-26 14:08:50 +0000 |
1064 | @@ -0,0 +1,196 @@ |
1065 | +#include <string.h> |
1066 | +#include <stdlib.h> |
1067 | +#include <math.h> |
1068 | +#include <sys/time.h> |
1069 | + |
1070 | +#ifdef USE_LIBRSVG |
1071 | +#include <cairo/cairo.h> |
1072 | +#include <cairo/cairo-xlib.h> |
1073 | +#include <librsvg/rsvg.h> |
1074 | +#include <librsvg/rsvg-cairo.h> |
1075 | +#endif |
1076 | + |
1077 | +#include <core/core.h> |
1078 | +#include <opengl/opengl.h> |
1079 | +#include <composite/composite.h> |
1080 | +#include <animation/animation.h> |
1081 | +#include <animationaddon/animationaddon.h> |
1082 | + |
1083 | +#include "animationplus_options.h" |
1084 | + |
1085 | +extern AnimEffect AnimEffectBlinds; |
1086 | +extern AnimEffect AnimEffectBonanza; |
1087 | +extern AnimEffect AnimEffectHelix; |
1088 | +extern AnimEffect AnimEffectShatter; |
1089 | + |
1090 | +#define NUM_EFFECTS 4 |
1091 | + |
1092 | +// This must have the value of the first "effect setting" above |
1093 | +// in AnimEgScreenOptions |
1094 | +#define NUM_NONEFFECT_OPTIONS 0 |
1095 | + |
1096 | +#define WIN_X(w) ((w)->x () - (w)->input ().left) |
1097 | +#define WIN_Y(w) ((w)->y () - (w)->input ().top) |
1098 | +#define WIN_W(w) ((w)->width () + (w)->input ().left + (w)->input ().right) |
1099 | +#define WIN_H(w) ((w)->height () + (w)->input ().top + (w)->input ().bottom) |
1100 | + |
1101 | +class ExtensionPluginAnimPlus : public ExtensionPluginInfo |
1102 | +{ |
1103 | + public: |
1104 | + |
1105 | + ExtensionPluginAnimPlus (const CompString &name, |
1106 | + unsigned int nEffects, |
1107 | + AnimEffect *effects, |
1108 | + CompOption::Vector *effectOptions, |
1109 | + unsigned int firstEffectOptionIndex) : |
1110 | + ExtensionPluginInfo (name, nEffects, effects, effectOptions, |
1111 | + firstEffectOptionIndex) {} |
1112 | + ~ExtensionPluginAnimPlus () {} |
1113 | + |
1114 | + const CompOutput *output () { return mOutput; } |
1115 | + private: |
1116 | + |
1117 | + const CompOutput *mOutput; |
1118 | +}; |
1119 | + |
1120 | +class BasePlusAnim : |
1121 | + virtual public Animation |
1122 | +{ |
1123 | + public: |
1124 | + |
1125 | + BasePlusAnim (CompWindow *w, |
1126 | + WindowEvent curWindowEvent, |
1127 | + float duration, |
1128 | + const AnimEffect info, |
1129 | + const CompRect &icon); |
1130 | + |
1131 | + ~BasePlusAnim () {} |
1132 | + |
1133 | + protected: |
1134 | + // Gets info about the extension plugin that implements this animation. |
1135 | + ExtensionPluginInfo* getExtensionPluginInfo (); |
1136 | + |
1137 | + CompositeScreen *mCScreen; |
1138 | + GLScreen *mGScreen; |
1139 | +}; |
1140 | + |
1141 | +class AnimPlusScreen : |
1142 | + public PluginClassHandler <AnimPlusScreen, CompScreen>, |
1143 | + public AnimationplusOptions |
1144 | +{ |
1145 | + public: |
1146 | + |
1147 | + AnimPlusScreen (CompScreen *); |
1148 | + ~AnimPlusScreen (); |
1149 | + |
1150 | + protected: |
1151 | + |
1152 | + void initAnimationList (); |
1153 | + |
1154 | + CompOutput &mOutput; |
1155 | +}; |
1156 | + |
1157 | +class AnimPlusWindow : |
1158 | + public PluginClassHandler <AnimPlusWindow, CompWindow> |
1159 | +{ |
1160 | + public: |
1161 | + |
1162 | + AnimPlusWindow (CompWindow *); |
1163 | + ~AnimPlusWindow (); |
1164 | + |
1165 | + protected: |
1166 | + |
1167 | + CompWindow *mWindow; |
1168 | + AnimWindow *aWindow; |
1169 | + |
1170 | +}; |
1171 | + |
1172 | +#define ANIMPLUS_SCREEN(s) \ |
1173 | + AnimPlusScreen *as = AnimPlusScreen::get (s); |
1174 | + |
1175 | +#define ANIMPLUS_WINDOW(w) \ |
1176 | + AnimPlusWindow *aw = AnimPlusWindow::get (w); |
1177 | + |
1178 | +// ratio of perceived length of animation compared to real duration |
1179 | +// to make it appear to have the same speed with other animation effects |
1180 | + |
1181 | +#define EXPLODE_PERCEIVED_T 0.7f |
1182 | + |
1183 | +/* |
1184 | + * Function prototypes |
1185 | + * |
1186 | + */ |
1187 | + |
1188 | +class BlindsAnim : public PolygonAnim |
1189 | +{ |
1190 | + public: |
1191 | + |
1192 | + BlindsAnim (CompWindow *w, |
1193 | + WindowEvent curWindowEvent, |
1194 | + float duration, |
1195 | + const AnimEffect info, |
1196 | + const CompRect &icon); |
1197 | + |
1198 | + void init (); |
1199 | + protected: |
1200 | + static const float kDurationFactor; |
1201 | +}; |
1202 | + |
1203 | +class HelixAnim : public PolygonAnim |
1204 | +{ |
1205 | + public: |
1206 | + HelixAnim (CompWindow *w, |
1207 | + WindowEvent curWindowEvent, |
1208 | + float duration, |
1209 | + const AnimEffect info, |
1210 | + const CompRect &icon); |
1211 | + |
1212 | + void init (); |
1213 | + protected: |
1214 | + static const float kDurationFactor; |
1215 | +}; |
1216 | + |
1217 | +class BonanzaAnim : public ParticleAnim |
1218 | +{ |
1219 | + public: |
1220 | + BonanzaAnim (CompWindow *w, |
1221 | + WindowEvent curWindowEvent, |
1222 | + float duration, |
1223 | + const AnimEffect info, |
1224 | + const CompRect &icon); |
1225 | + |
1226 | + void |
1227 | + genFire (int x, |
1228 | + int y, |
1229 | + int radius, |
1230 | + float size, |
1231 | + float time); |
1232 | + |
1233 | + void step (float); |
1234 | + protected: |
1235 | + |
1236 | + int mAnimFireDirection; |
1237 | + unsigned int mFirePDId; |
1238 | +}; |
1239 | + |
1240 | +class ShatterAnim : public PolygonAnim |
1241 | +{ |
1242 | + public: |
1243 | + ShatterAnim (CompWindow *w, |
1244 | + WindowEvent curWindowEvent, |
1245 | + float duration, |
1246 | + const AnimEffect info, |
1247 | + const CompRect &icon); |
1248 | + |
1249 | + void init (); |
1250 | + protected: |
1251 | + static const float kDurationFactor; |
1252 | +}; |
1253 | + |
1254 | +class AnimPlusPluginVTable : |
1255 | + public CompPlugin::VTableForScreenAndWindow <AnimPlusScreen, AnimPlusWindow> |
1256 | +{ |
1257 | + public: |
1258 | + |
1259 | + bool init (); |
1260 | +}; |
1261 | |
1262 | === added file 'plugins/animationplus/src/shatter.cpp' |
1263 | --- plugins/animationplus/src/shatter.cpp 1970-01-01 00:00:00 +0000 |
1264 | +++ plugins/animationplus/src/shatter.cpp 2016-05-26 14:08:50 +0000 |
1265 | @@ -0,0 +1,75 @@ |
1266 | +/* |
1267 | + * Animation plugin for compiz/beryl |
1268 | + * |
1269 | + * animation.c |
1270 | + * |
1271 | + * Copyright : (C) 2008 Kevin DuBois |
1272 | + * E-mail : kdub432@gmail.com |
1273 | + * |
1274 | + * Based on other animations by |
1275 | + * : Erkin Bahceci |
1276 | + * E-mail : erkinbah@gmail.com |
1277 | + * |
1278 | + * Which were based on Wobbly and Minimize plugins by |
1279 | + * : David Reveman |
1280 | + * E-mail : davidr@novell.com> |
1281 | + * |
1282 | + * This program is free software; you can redistribute it and/or |
1283 | + * modify it under the terms of the GNU General Public License |
1284 | + * as published by the Free Software Foundation; either version 2 |
1285 | + * of the License, or (at your option) any later version. |
1286 | + * |
1287 | + * This program is distributed in the hope that it will be useful, |
1288 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1289 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1290 | + * GNU General Public License for more details. |
1291 | + * |
1292 | + * You should have received a copy of the GNU General Public License |
1293 | + * along with this program; if not, write to the Free Software |
1294 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
1295 | + */ |
1296 | +#include "private.h" |
1297 | + |
1298 | +const float ShatterAnim::kDurationFactor = 1.43; |
1299 | + |
1300 | +ShatterAnim::ShatterAnim (CompWindow *w, |
1301 | + WindowEvent curWindowEvent, |
1302 | + float duration, |
1303 | + const AnimEffect info, |
1304 | + const CompRect &icon) : |
1305 | + Animation::Animation (w, curWindowEvent, kDurationFactor * duration, info, |
1306 | + icon), |
1307 | + PolygonAnim::PolygonAnim (w, curWindowEvent, kDurationFactor * duration, |
1308 | + info, icon) |
1309 | +{ |
1310 | + mAllFadeDuration = 0.4f; |
1311 | + mBackAndSidesFadeDur = 0.2f; |
1312 | + mDoDepthTest = true; |
1313 | + mDoLighting = true; |
1314 | + mCorrectPerspective = CorrectPerspectivePolygon; |
1315 | +} |
1316 | + |
1317 | +void |
1318 | +ShatterAnim::init () |
1319 | +{ |
1320 | + ANIMPLUS_SCREEN (screen); |
1321 | + int static_polygon; |
1322 | + int screen_height = screen->outputDevs ().at (mWindow->outputDevice ()).height (); |
1323 | + |
1324 | + tessellateIntoGlass (as->optionGetShatterNumSpokes (), |
1325 | + as->optionGetShatterNumTiers (), |
1326 | + 1); //can't really see how thick it is... |
1327 | + |
1328 | + foreach (PolygonObject *p, mPolygons) |
1329 | + { |
1330 | + p->rotAxis.set (0, 0, 1); |
1331 | + static_polygon = 1; |
1332 | + |
1333 | + p->finalRelPos.set (0, |
1334 | + static_polygon * (-p->centerPosStart.y () + screen_height), |
1335 | + 0); |
1336 | + if (p->finalRelPos.y ()) |
1337 | + p->finalRotAng = RAND_FLOAT() * 120 * ( RAND_FLOAT() < 0.5 ? -1 : 1 ); |
1338 | + } |
1339 | +} |
1340 | + |
Again, update debian files too please