Merge lp:~smspillaz/compiz/compiz.animationsplus-returns-v3 into lp:compiz/0.9.13

Proposed by Sam Spilsbury
Status: Superseded
Proposed branch: lp:~smspillaz/compiz/compiz.animationsplus-returns-v3
Merge into: lp:compiz/0.9.13
Prerequisite: lp:~smspillaz/compiz/compiz.simple-animations-returns-v2
Diff against target: 1374 lines (+1254/-9)
16 files modified
debian/compiz-dev.install (+1/-0)
debian/compiz-plugins.install (+2/-0)
debian/compiz-plugins.install.armel (+2/-0)
debian/compiz-plugins.install.armhf (+2/-0)
plugins/animationjc/CMakeLists.txt (+1/-4)
plugins/animationplus/CMakeLists.txt (+4/-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 (+158/-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)
plugins/simple-animations/CMakeLists.txt (+1/-5)
To merge this branch: bzr merge lp:~smspillaz/compiz/compiz.animationsplus-returns-v3
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Needs Fixing
PS Jenkins bot continuous-integration Pending
Review via email: mp+300101@code.launchpad.net

This proposal supersedes a proposal from 2016-07-09.

This proposal has been superseded by a proposal from 2016-07-25.

Commit message

Re-add the animationsplus plugn

Description of the change

Re-add the animationsplus plugin

(Thanks to MC Return for preserving the code)

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Issues in generating deb packages here

dh_install --fail-missing
dh_install: Cannot find (any matches for) "usr/lib/*/compiz/*animationsplus.*" (tried in "." and "debian/tmp")
dh_install: compiz-plugins missing files: usr/lib/*/compiz/*animationsplus.*
dh_install: Cannot find (any matches for) "usr/share/compiz/*animationsplus.*" (tried in "." and "debian/tmp")
dh_install: compiz-plugins missing files: usr/share/compiz/*animationsplus.*
dh_install: usr/lib/x86_64-linux-gnu/compiz/libanimationplus.so exists in debian/tmp but is not installed to anywhere
dh_install: usr/share/compiz/animationplus.xml exists in debian/tmp but is not installed to anywhere

review: Needs Fixing
4075. By Sam Spilsbury <email address hidden>

debian/compiz-plugins.install: Fix typo in animationplus

4076. By Sam Spilsbury <email address hidden>

Merge lp:~smspillaz/compiz/compiz.simple-animations-returns-v3

4077. By Sam Spilsbury <email address hidden>

animationplus: No need for libGLU

4078. By Sam Spilsbury <email address hidden>

animationplus: Remove libGLU include

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/compiz-dev.install'
--- debian/compiz-dev.install 2016-06-28 14:57:19 +0000
+++ debian/compiz-dev.install 2016-07-25 17:11:00 +0000
@@ -2,6 +2,7 @@
2debian/tmp/usr/lib/*/libcompiz_core.so2debian/tmp/usr/lib/*/libcompiz_core.so
3debian/tmp/usr/lib/*/pkgconfig/compiz-animation.pc3debian/tmp/usr/lib/*/pkgconfig/compiz-animation.pc
4debian/tmp/usr/lib/*/pkgconfig/compiz-animationaddon.pc4debian/tmp/usr/lib/*/pkgconfig/compiz-animationaddon.pc
5debian/tmp/usr/lib/*/pkgconfig/compiz-animationjc.pc
5debian/tmp/usr/lib/*/pkgconfig/compiz-compiztoolbox.pc6debian/tmp/usr/lib/*/pkgconfig/compiz-compiztoolbox.pc
6debian/tmp/usr/lib/*/pkgconfig/compiz-composite.pc7debian/tmp/usr/lib/*/pkgconfig/compiz-composite.pc
7debian/tmp/usr/lib/*/pkgconfig/compiz-cube.pc8debian/tmp/usr/lib/*/pkgconfig/compiz-cube.pc
89
=== modified file 'debian/compiz-plugins.install'
--- debian/compiz-plugins.install 2016-07-25 17:10:49 +0000
+++ debian/compiz-plugins.install 2016-07-25 17:11:00 +0000
@@ -6,6 +6,8 @@
6usr/share/compiz/*animationaddon.*6usr/share/compiz/*animationaddon.*
7usr/lib/*/compiz/*animationjc.*7usr/lib/*/compiz/*animationjc.*
8usr/share/compiz/*animationjc.*8usr/share/compiz/*animationjc.*
9usr/lib/*/compiz/*animationplus.*
10usr/share/compiz/*animationplus.*
9usr/lib/*/compiz/*animationsim.*11usr/lib/*/compiz/*animationsim.*
10usr/share/compiz/*animationsim.*12usr/share/compiz/*animationsim.*
11usr/lib/*/compiz/*bench.*13usr/lib/*/compiz/*bench.*
1214
=== modified file 'debian/compiz-plugins.install.armel'
--- debian/compiz-plugins.install.armel 2016-07-25 17:10:49 +0000
+++ debian/compiz-plugins.install.armel 2016-07-25 17:11:00 +0000
@@ -6,6 +6,8 @@
6usr/share/compiz/*animationaddon.*6usr/share/compiz/*animationaddon.*
7usr/lib/*/compiz/*animationjc.*7usr/lib/*/compiz/*animationjc.*
8usr/share/compiz/*animationjc.*8usr/share/compiz/*animationjc.*
9usr/lib/*/compiz/*animationplus.*
10usr/share/compiz/*animationplus.*
9usr/lib/*/compiz/*animationsim.*11usr/lib/*/compiz/*animationsim.*
10usr/share/compiz/*animationsim.*12usr/share/compiz/*animationsim.*
11usr/lib/*/compiz/*clone.*13usr/lib/*/compiz/*clone.*
1214
=== modified file 'debian/compiz-plugins.install.armhf'
--- debian/compiz-plugins.install.armhf 2016-07-25 17:10:49 +0000
+++ debian/compiz-plugins.install.armhf 2016-07-25 17:11:00 +0000
@@ -6,6 +6,8 @@
6usr/share/compiz/*animationaddon.*6usr/share/compiz/*animationaddon.*
7usr/lib/*/compiz/*animationjc.*7usr/lib/*/compiz/*animationjc.*
8usr/share/compiz/*animationjc.*8usr/share/compiz/*animationjc.*
9usr/lib/*/compiz/*animationplus.*
10usr/share/compiz/*animationplus.*
9usr/lib/*/compiz/*animationsim.*11usr/lib/*/compiz/*animationsim.*
10usr/share/compiz/*animationsim.*12usr/share/compiz/*animationsim.*
11usr/lib/*/compiz/*clone.*13usr/lib/*/compiz/*clone.*
1214
=== modified file 'plugins/animationjc/CMakeLists.txt'
--- plugins/animationjc/CMakeLists.txt 2016-07-25 17:10:49 +0000
+++ plugins/animationjc/CMakeLists.txt 2016-07-25 17:11:00 +0000
@@ -1,7 +1,4 @@
1find_package (Compiz REQUIRED)1find_package (Compiz REQUIRED)
2include (CompizPlugin)2include (CompizPlugin)
3include (FindOpenGL)
43
5if (OPENGL_GLU_FOUND)4compiz_plugin (animationjc PLUGINDEPS composite opengl animation)
6 compiz_plugin (animationjc PLUGINDEPS composite opengl animation LIBRARIES ${OPENGL_glu_LIBRARY} INCDIRS ${OPENGL_INCLUDE_DIR})
7endif (OPENGL_GLU_FOUND)
85
=== added directory 'plugins/animationplus'
=== added file 'plugins/animationplus/CMakeLists.txt'
--- plugins/animationplus/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ plugins/animationplus/CMakeLists.txt 2016-07-25 17:11:00 +0000
@@ -0,0 +1,4 @@
1find_package (Compiz REQUIRED)
2include (CompizPlugin)
3
4compiz_plugin (animationplus PLUGINDEPS animation animationaddon composite opengl)
05
=== added file 'plugins/animationplus/VERSION'
--- plugins/animationplus/VERSION 1970-01-01 00:00:00 +0000
+++ plugins/animationplus/VERSION 2016-07-25 17:11:00 +0000
@@ -0,0 +1,1 @@
10.9.5.0
02
=== added file 'plugins/animationplus/animationplus.xml.in'
--- plugins/animationplus/animationplus.xml.in 1970-01-01 00:00:00 +0000
+++ plugins/animationplus/animationplus.xml.in 2016-07-25 17:11:00 +0000
@@ -0,0 +1,185 @@
1<compiz>
2 <!-- animationplus metadata -->
3 <plugin name="animationplus" useBcop="true">
4 <_short>Animations Plus</_short>
5 <_long>More window animations</_long>
6 <category>Effects</category>
7 <deps>
8 <requirement>
9 <plugin>animation</plugin>
10 <plugin>animationaddon</plugin>
11 </requirement>
12 <relation type="after">
13 <plugin>animationaddon</plugin>
14 <plugin>opengl</plugin>
15 <plugin>composite</plugin>
16 </relation>
17 </deps>
18
19 <options>
20
21 <group>
22 <_short>Effect Settings</_short>
23
24 <subgroup>
25 <_short>Helix</_short>
26 <option name="helix_num_twists" type="int">
27 <_short>Helix Number of Twists</_short>
28 <_long>Number of twists to do in the animation</_long>
29 <default>2</default>
30 <min>1</min>
31 <max>10</max>
32 </option>
33 <option name="helix_gridy" type="int">
34 <_short>Helix Gridsize Y</_short>
35 <_long>Number of blocks in the animation</_long>
36 <default>90</default>
37 <min>5</min>
38 <max>300</max>
39 </option>
40 <option name="helix_thickness" type="float">
41 <_short>Helix Thickness</_short>
42 <_long>Thickness of blocks in the animation</_long>
43 <default>0</default>
44 <min>0</min>
45 <max>50</max>
46 </option>
47 <option name="helix_spin_direction" type="int">
48 <_short>Spin Direction</_short>
49 <_long>Direction the strips spin.</_long>
50 <default>1</default>
51 <min>0</min>
52 <max>1</max>
53 <desc>
54 <value>0</value>
55 <_name>Counter-Clockwise</_name>
56 </desc>
57 <desc>
58 <value>1</value>
59 <_name>Clockwise</_name>
60 </desc>
61 </option>
62 <option name="helix_direction" type="bool">
63 <_short>Vertical Helix</_short>
64 <_long>Whether Helix should rotate with its axis up/down or in/out of the screen</_long>
65 <default>false</default>
66 </option>
67 </subgroup>
68
69
70 <subgroup>
71 <_short>Blinds</_short>
72 <option name="blinds_num_halftwists" type="int">
73 <_short>Blinds Number of Half Twists</_short>
74 <_long>Number of half twists to do in the animation</_long>
75 <default>2</default>
76 <min>1</min>
77 <max>10</max>
78 </option>
79 <option name="blinds_gridx" type="int">
80 <_short>Helix Gridsize Y</_short>
81 <_long>Number of blocks in the animation</_long>
82 <default>20</default>
83 <min>1</min>
84 <max>100</max>
85 </option>
86 <option name="blinds_thickness" type="float">
87 <_short>Blinds Thickness</_short>
88 <_long>Thickness of blocks in the animation</_long>
89 <default>0</default>
90 <min>0</min>
91 <max>50</max>
92 </option>
93 </subgroup>
94
95 <subgroup>
96 <_short>Shatter</_short>
97 <option name="shatter_num_spokes" type="int">
98 <_short>Shatter number of spokes</_short>
99 <_long>Number of spokes (divided by 4) in the animation</_long>
100 <default>2</default>
101 <min>1</min>
102 <max>100</max>
103 </option>
104 <option name="shatter_num_tiers" type="int">
105 <_short>Shatter Number of Tiers</_short>
106 <_long>Number of concentric circles in the animation</_long>
107 <default>2</default>
108 <min>1</min>
109 <max>100</max>
110 </option>
111 </subgroup>
112
113 <subgroup>
114 <_short>Bonanza</_short>
115 <option name="bonanza_particles" type="int">
116 <_short>Number Of Fire Particles</_short>
117 <_long>Number of fire particles.</_long>
118 <default>1000</default>
119 <min>100</min>
120 <max>10000</max>
121 </option>
122 <option name="bonanza_size" type="float">
123 <_short>Fire Particle Size</_short>
124 <_long>Fire particle size.</_long>
125 <default>5</default>
126 <min>0.1</min>
127 <max>20</max>
128 <precision>0.1</precision>
129 </option>
130 <option name="bonanza_life" type="float">
131 <_short>Fire Particle Life</_short>
132 <_long>Fire particle life.</_long>
133 <default>0.7</default>
134 <min>0.1</min>
135 <max>1</max>
136 <precision>0.1</precision>
137 </option>
138 <option name="bonanza_color" type="color">
139 <_short>Fire Particle Color</_short>
140 <_long>Fire particle color.</_long>
141 <default>
142 <red>0xffff</red>
143 <green>0x3333</green>
144 <blue>0x0555</blue>
145 <alpha>0xffff</alpha>
146 </default>
147 </option>
148 <option name="bonanza_mystical" type="bool">
149 <_short>Randomly Colored Fire</_short>
150 <_long>Have random colors for the fire effect, also known as Mystical Fire.</_long>
151 <default>false</default>
152 </option>
153 </subgroup>
154
155 </group>
156
157 </options>
158
159 <extension base_plugin="animation">
160 <base_option>open_effects</base_option>
161 <base_option>open_random_effects</base_option>
162 <base_option>close_effects</base_option>
163 <base_option>close_random_effects</base_option>
164 <base_option>minimize_effects</base_option>
165 <base_option>minimize_random_effects</base_option>
166 <restriction>
167 <value>animationplus:Blinds</value>
168 <_name>Blinds</_name>
169 </restriction>
170 <restriction>
171 <value>animationplus:Helix</value>
172 <_name>Helix</_name>
173 </restriction>
174 <restriction>
175 <value>animationplus:Bonanza</value>
176 <_name>Bonanza</_name>
177 </restriction>
178 <restriction>
179 <value>animationplus:Shatter</value>
180 <_name>Shatter</_name>
181 </restriction>
182 </extension>
183
184 </plugin>
185</compiz>
0186
=== added directory 'plugins/animationplus/src'
=== added file 'plugins/animationplus/src/animation_tex.h'
--- plugins/animationplus/src/animation_tex.h 1970-01-01 00:00:00 +0000
+++ plugins/animationplus/src/animation_tex.h 2016-07-25 17:11:00 +0000
@@ -0,0 +1,222 @@
1/**
2 *
3 * Particle texture for Beryl benchmark plugin
4 *
5 * Copyright : (C) 2006 by Dennis Kasprzyk
6 * E-mail : onestone@beryl-project.org
7 *
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 **/
20
21static const unsigned char fireTex[4097] = {
22 "\0\0\0\0\377\377\377\3\377\377\377\2\377\377\377\5\377\377\377\7\377\377"
23 "\377\6\377\377\377\6\377\377\377\12\377\377\377\13\377\377\377\11\377\377"
24 "\377\12\377\377\377\12\377\377\377\14\377\377\377\14\377\377\377\14\377\377"
25 "\377\16\377\377\377\15\377\377\377\14\377\377\377\12\377\377\377\13\377\377"
26 "\377\13\377\377\377\11\377\377\377\12\377\377\377\12\377\377\377\10\377\377"
27 "\377\7\377\377\377\6\377\377\377\6\377\377\377\5\377\377\377\2\0\0\0\0\0"
28 "\0\0\0\377\377\377\4\377\377\377\3\377\377\377\4\377\377\377\7\377\377\377"
29 "\6\377\377\377\10\377\377\377\11\377\377\377\11\377\377\377\14\377\377\377"
30 "\14\377\377\377\15\377\377\377\16\377\377\377\20\377\377\377\21\377\377\377"
31 "\20\377\377\377\22\377\377\377\20\377\377\377\21\377\377\377\17\377\377\377"
32 "\20\377\377\377\17\377\377\377\13\377\377\377\13\377\377\377\13\377\377\377"
33 "\14\377\377\377\11\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377"
34 "\4\377\377\377\1\0\0\0\0\377\377\377\5\377\377\377\4\377\377\377\6\377\377"
35 "\377\6\377\377\377\12\377\377\377\12\377\377\377\11\377\377\377\14\377\377"
36 "\377\15\377\377\377\20\377\377\377\20\377\377\377\24\377\377\377\24\377\377"
37 "\377\23\377\377\377\23\377\377\377\26\377\377\377\25\377\377\377\23\377\377"
38 "\377\21\377\377\377\24\377\377\377\22\377\377\377\17\377\377\377\17\377\377"
39 "\377\15\377\377\377\15\377\377\377\11\377\377\377\11\377\377\377\7\377\377"
40 "\377\7\377\377\377\6\377\377\377\3\377\377\377\3\377\377\377\6\377\377\377"
41 "\6\377\377\377\6\377\377\377\12\377\377\377\13\377\377\377\13\377\377\377"
42 "\13\377\377\377\17\377\377\377\22\377\377\377\24\377\377\377\22\377\377\377"
43 "\30\377\377\377\30\377\377\377\31\377\377\377\31\377\377\377\33\377\377\377"
44 "\31\377\377\377\30\377\377\377\30\377\377\377\30\377\377\377\25\377\377\377"
45 "\25\377\377\377\23\377\377\377\22\377\377\377\17\377\377\377\13\377\377\377"
46 "\12\377\377\377\11\377\377\377\7\377\377\377\6\377\377\377\5\377\377\377"
47 "\4\377\377\377\7\377\377\377\6\377\377\377\12\377\377\377\11\377\377\377"
48 "\14\377\377\377\15\377\377\377\20\377\377\377\22\377\377\377\25\377\377\377"
49 "\30\377\377\377\32\377\377\377\35\377\377\377\34\377\377\377\34\377\377\377"
50 "\36\377\377\377\40\377\377\377\36\377\377\377\34\377\377\377\34\377\377\377"
51 "\34\377\377\377\32\377\377\377\31\377\377\377\26\377\377\377\25\377\377\377"
52 "\22\377\377\377\16\377\377\377\12\377\377\377\12\377\377\377\12\377\377\377"
53 "\10\377\377\377\6\377\377\377\4\377\377\377\10\377\377\377\11\377\377\377"
54 "\12\377\377\377\13\377\377\377\16\377\377\377\21\377\377\377\22\377\377\377"
55 "\25\377\377\377\30\377\377\377\34\377\377\377\37\377\377\377!\377\377\377"
56 "\"\377\377\377#\377\377\377#\377\377\377&\377\377\377&\377\377\377$\377\377"
57 "\377#\377\377\377\40\377\377\377!\377\377\377\35\377\377\377\34\377\377\377"
58 "\25\377\377\377\24\377\377\377\21\377\377\377\15\377\377\377\14\377\377\377"
59 "\14\377\377\377\12\377\377\377\6\377\377\377\6\377\377\377\10\377\377\377"
60 "\12\377\377\377\12\377\377\377\16\377\377\377\22\377\377\377\24\377\377\377"
61 "\26\377\377\377\30\377\377\377\34\377\377\377\37\377\377\377#\377\377\377"
62 "&\377\377\377,\377\377\377+\377\377\377,\377\377\377-\377\377\377-\377\377"
63 "\377,\377\377\377+\377\377\377&\377\377\377)\377\377\377$\377\377\377\34"
64 "\377\377\377\34\377\377\377\27\377\377\377\24\377\377\377\23\377\377\377"
65 "\17\377\377\377\15\377\377\377\12\377\377\377\7\377\377\377\6\377\377\377"
66 "\12\377\377\377\12\377\377\377\16\377\377\377\21\377\377\377\22\377\377\377"
67 "\27\377\377\377\31\377\377\377\36\377\377\377!\377\377\377%\377\377\377("
68 "\377\377\3771\377\377\3772\377\377\3775\377\377\377;\377\377\377<\377\377"
69 "\3779\377\377\3778\377\377\3773\377\377\3771\377\377\377-\377\377\377'\377"
70 "\377\377\"\377\377\377\34\377\377\377\36\377\377\377\32\377\377\377\25\377"
71 "\377\377\21\377\377\377\15\377\377\377\11\377\377\377\12\377\377\377\7\377"
72 "\377\377\13\377\377\377\14\377\377\377\17\377\377\377\21\377\377\377\31\377"
73 "\377\377\31\377\377\377\35\377\377\377!\377\377\377'\377\377\377+\377\377"
74 "\3771\377\377\377=\377\377\377E\377\377\377H\377\377\377M\377\377\377M\377"
75 "\377\377J\377\377\377I\377\377\377A\377\377\377A\377\377\3778\377\377\377"
76 ",\377\377\377%\377\377\377$\377\377\377\"\377\377\377\34\377\377\377\24\377"
77 "\377\377\22\377\377\377\17\377\377\377\13\377\377\377\12\377\377\377\11\377"
78 "\377\377\13\377\377\377\14\377\377\377\20\377\377\377\23\377\377\377\27\377"
79 "\377\377\35\377\377\377$\377\377\377(\377\377\377.\377\377\3776\377\377\377"
80 "=\377\377\377H\377\377\377W\377\377\377Y\377\377\377]\377\377\377a\377\377"
81 "\377\\\377\377\377\\\377\377\377U\377\377\377O\377\377\377?\377\377\3774"
82 "\377\377\377-\377\377\377+\377\377\377\40\377\377\377\32\377\377\377\27\377"
83 "\377\377\23\377\377\377\22\377\377\377\15\377\377\377\11\377\377\377\13\377"
84 "\377\377\12\377\377\377\15\377\377\377\21\377\377\377\25\377\377\377\30\377"
85 "\377\377\37\377\377\377$\377\377\377.\377\377\3779\377\377\377?\377\377\377"
86 "N\377\377\377X\377\377\377h\377\377\377r\377\377\377w\377\377\377|\377\377"
87 "\377x\377\377\377p\377\377\377k\377\377\377\\\377\377\377J\377\377\377F\377"
88 "\377\3779\377\377\377*\377\377\377$\377\377\377\36\377\377\377\30\377\377"
89 "\377\25\377\377\377\24\377\377\377\20\377\377\377\14\377\377\377\12\377\377"
90 "\377\15\377\377\377\17\377\377\377\22\377\377\377\27\377\377\377\34\377\377"
91 "\377\40\377\377\377%\377\377\377.\377\377\377<\377\377\377M\377\377\377["
92 "\377\377\377l\377\377\377~\377\377\377\227\377\377\377\230\377\377\377\234"
93 "\377\377\377\233\377\377\377\226\377\377\377\205\377\377\377i\377\377\377"
94 "b\377\377\377P\377\377\3779\377\377\377-\377\377\377(\377\377\377!\377\377"
95 "\377\35\377\377\377\32\377\377\377\25\377\377\377\21\377\377\377\13\377\377"
96 "\377\12\377\377\377\15\377\377\377\21\377\377\377\23\377\377\377\31\377\377"
97 "\377\37\377\377\377!\377\377\377(\377\377\3774\377\377\377@\377\377\377Q"
98 "\377\377\377g\377\377\377\200\377\377\377\231\377\377\377\254\377\377\377"
99 "\275\377\377\377\310\377\377\377\304\377\377\377\264\377\377\377\227\377"
100 "\377\377\212\377\377\377f\377\377\377Q\377\377\377B\377\377\377:\377\377"
101 "\377/\377\377\377&\377\377\377\36\377\377\377\32\377\377\377\26\377\377\377"
102 "\21\377\377\377\14\377\377\377\12\377\377\377\17\377\377\377\22\377\377\377"
103 "\24\377\377\377\31\377\377\377\40\377\377\377&\377\377\377-\377\377\377:"
104 "\377\377\377H\377\377\377X\377\377\377k\377\377\377\220\377\377\377\252\377"
105 "\377\377\324\377\377\377\363\377\377\377\370\377\377\377\366\377\377\377"
106 "\335\377\377\377\263\377\377\377\221\377\377\377w\377\377\377b\377\377\377"
107 "P\377\377\377>\377\377\3770\377\377\377&\377\377\377\37\377\377\377\32\377"
108 "\377\377\26\377\377\377\23\377\377\377\15\377\377\377\11\377\377\377\16\377"
109 "\377\377\21\377\377\377\27\377\377\377\33\377\377\377\"\377\377\377(\377"
110 "\377\377/\377\377\377<\377\377\377N\377\377\377b\377\377\377z\377\377\377"
111 "\231\377\377\377\275\377\377\377\361\377\377\377\375\377\377\377\376\377"
112 "\377\377\376\377\377\377\370\377\377\377\316\377\377\377\240\377\377\377"
113 "\205\377\377\377b\377\377\377L\377\377\377<\377\377\377.\377\377\377&\377"
114 "\377\377\40\377\377\377\33\377\377\377\26\377\377\377\22\377\377\377\15\377"
115 "\377\377\12\377\377\377\16\377\377\377\22\377\377\377\24\377\377\377\32\377"
116 "\377\377\40\377\377\377$\377\377\377,\377\377\377:\377\377\377L\377\377\377"
117 "`\377\377\377|\377\377\377\231\377\377\377\310\377\377\377\372\377\377\377"
118 "\375\377\377\377\376\377\377\377\376\377\377\377\375\377\377\377\332\377"
119 "\377\377\241\377\377\377\207\377\377\377f\377\377\377R\377\377\377@\377\377"
120 "\3773\377\377\377+\377\377\377\"\377\377\377\35\377\377\377\30\377\377\377"
121 "\24\377\377\377\17\377\377\377\14\377\377\377\16\377\377\377\22\377\377\377"
122 "\25\377\377\377\30\377\377\377\40\377\377\377$\377\377\377,\377\377\377;"
123 "\377\377\377N\377\377\377e\377\377\377\206\377\377\377\246\377\377\377\327"
124 "\377\377\377\374\377\377\377\375\377\377\377\376\377\377\377\376\377\377"
125 "\377\374\377\377\377\331\377\377\377\243\377\377\377\210\377\377\377b\377"
126 "\377\377O\377\377\377>\377\377\377.\377\377\377&\377\377\377\40\377\377\377"
127 "\33\377\377\377\27\377\377\377\22\377\377\377\15\377\377\377\12\377\377\377"
128 "\16\377\377\377\22\377\377\377\23\377\377\377\32\377\377\377\40\377\377\377"
129 "'\377\377\3770\377\377\377?\377\377\377U\377\377\377h\377\377\377\200\377"
130 "\377\377\237\377\377\377\270\377\377\377\344\377\377\377\372\377\377\377"
131 "\375\377\377\377\376\377\377\377\354\377\377\377\275\377\377\377\227\377"
132 "\377\377\200\377\377\377e\377\377\377Q\377\377\377>\377\377\377.\377\377"
133 "\377%\377\377\377\40\377\377\377\33\377\377\377\26\377\377\377\22\377\377"
134 "\377\15\377\377\377\11\377\377\377\17\377\377\377\22\377\377\377\25\377\377"
135 "\377\31\377\377\377\"\377\377\377*\377\377\3773\377\377\377=\377\377\377"
136 "J\377\377\377^\377\377\377o\377\377\377\211\377\377\377\235\377\377\377\271"
137 "\377\377\377\327\377\377\377\342\377\377\377\335\377\377\377\302\377\377"
138 "\377\240\377\377\377\216\377\377\377k\377\377\377X\377\377\377C\377\377\377"
139 "9\377\377\377/\377\377\377&\377\377\377\"\377\377\377\33\377\377\377\26\377"
140 "\377\377\22\377\377\377\14\377\377\377\12\377\377\377\15\377\377\377\22\377"
141 "\377\377\31\377\377\377\35\377\377\377\37\377\377\377$\377\377\377,\377\377"
142 "\3777\377\377\377A\377\377\377Q\377\377\377[\377\377\377p\377\377\377\212"
143 "\377\377\377\231\377\377\377\242\377\377\377\253\377\377\377\251\377\377"
144 "\377\236\377\377\377\215\377\377\377u\377\377\377b\377\377\377O\377\377\377"
145 "<\377\377\3771\377\377\377)\377\377\377\"\377\377\377\34\377\377\377\32\377"
146 "\377\377\27\377\377\377\21\377\377\377\16\377\377\377\12\377\377\377\17\377"
147 "\377\377\21\377\377\377\20\377\377\377\27\377\377\377\37\377\377\377$\377"
148 "\377\377&\377\377\377,\377\377\3778\377\377\377B\377\377\377R\377\377\377"
149 "_\377\377\377k\377\377\377~\377\377\377\207\377\377\377\220\377\377\377\220"
150 "\377\377\377\203\377\377\377q\377\377\377_\377\377\377V\377\377\377F\377"
151 "\377\3777\377\377\377,\377\377\377%\377\377\377!\377\377\377\31\377\377\377"
152 "\25\377\377\377\22\377\377\377\17\377\377\377\14\377\377\377\11\377\377\377"
153 "\12\377\377\377\16\377\377\377\22\377\377\377\27\377\377\377\33\377\377\377"
154 "\35\377\377\377\"\377\377\377(\377\377\377/\377\377\3779\377\377\377E\377"
155 "\377\377L\377\377\377^\377\377\377d\377\377\377e\377\377\377k\377\377\377"
156 "l\377\377\377d\377\377\377a\377\377\377O\377\377\377C\377\377\377=\377\377"
157 "\3770\377\377\377)\377\377\377$\377\377\377\35\377\377\377\30\377\377\377"
158 "\25\377\377\377\22\377\377\377\16\377\377\377\12\377\377\377\13\377\377\377"
159 "\13\377\377\377\15\377\377\377\20\377\377\377\21\377\377\377\31\377\377\377"
160 "\33\377\377\377\35\377\377\377$\377\377\377)\377\377\3771\377\377\3776\377"
161 "\377\377@\377\377\377J\377\377\377N\377\377\377P\377\377\377S\377\377\377"
162 "X\377\377\377P\377\377\377J\377\377\377E\377\377\3777\377\377\377,\377\377"
163 "\377+\377\377\377%\377\377\377\40\377\377\377\32\377\377\377\26\377\377\377"
164 "\21\377\377\377\21\377\377\377\14\377\377\377\11\377\377\377\12\377\377\377"
165 "\13\377\377\377\11\377\377\377\14\377\377\377\21\377\377\377\23\377\377\377"
166 "\27\377\377\377\33\377\377\377\37\377\377\377&\377\377\377(\377\377\377*"
167 "\377\377\3774\377\377\3779\377\377\377<\377\377\377=\377\377\377C\377\377"
168 "\377E\377\377\377?\377\377\3779\377\377\377:\377\377\377.\377\377\377(\377"
169 "\377\377!\377\377\377!\377\377\377\35\377\377\377\31\377\377\377\24\377\377"
170 "\377\21\377\377\377\16\377\377\377\12\377\377\377\11\377\377\377\10\377\377"
171 "\377\10\377\377\377\11\377\377\377\13\377\377\377\16\377\377\377\22\377\377"
172 "\377\25\377\377\377\30\377\377\377\33\377\377\377\"\377\377\377!\377\377"
173 "\377%\377\377\377*\377\377\377-\377\377\3770\377\377\377/\377\377\3773\377"
174 "\377\3772\377\377\3774\377\377\377-\377\377\377,\377\377\377*\377\377\377"
175 "\"\377\377\377\37\377\377\377\32\377\377\377\33\377\377\377\27\377\377\377"
176 "\21\377\377\377\17\377\377\377\16\377\377\377\12\377\377\377\11\377\377\377"
177 "\6\377\377\377\10\377\377\377\12\377\377\377\11\377\377\377\15\377\377\377"
178 "\20\377\377\377\22\377\377\377\23\377\377\377\30\377\377\377\32\377\377\377"
179 "\35\377\377\377\40\377\377\377!\377\377\377%\377\377\377(\377\377\377&\377"
180 "\377\377)\377\377\377(\377\377\377+\377\377\377$\377\377\377!\377\377\377"
181 "#\377\377\377\36\377\377\377\30\377\377\377\30\377\377\377\24\377\377\377"
182 "\22\377\377\377\20\377\377\377\15\377\377\377\11\377\377\377\12\377\377\377"
183 "\6\377\377\377\6\377\377\377\7\377\377\377\7\377\377\377\11\377\377\377\12"
184 "\377\377\377\16\377\377\377\17\377\377\377\22\377\377\377\23\377\377\377"
185 "\26\377\377\377\31\377\377\377\33\377\377\377\34\377\377\377!\377\377\377"
186 "\40\377\377\377\"\377\377\377\"\377\377\377\"\377\377\377&\377\377\377\36"
187 "\377\377\377\35\377\377\377\35\377\377\377\34\377\377\377\26\377\377\377"
188 "\24\377\377\377\23\377\377\377\20\377\377\377\15\377\377\377\14\377\377\377"
189 "\13\377\377\377\7\377\377\377\5\377\377\377\6\377\377\377\7\377\377\377\6"
190 "\377\377\377\11\377\377\377\12\377\377\377\11\377\377\377\15\377\377\377"
191 "\16\377\377\377\21\377\377\377\22\377\377\377\26\377\377\377\26\377\377\377"
192 "\30\377\377\377\33\377\377\377\32\377\377\377\34\377\377\377\33\377\377\377"
193 "\32\377\377\377\37\377\377\377\31\377\377\377\31\377\377\377\27\377\377\377"
194 "\30\377\377\377\21\377\377\377\22\377\377\377\17\377\377\377\14\377\377\377"
195 "\11\377\377\377\11\377\377\377\12\377\377\377\6\377\377\377\6\377\377\377"
196 "\4\377\377\377\6\377\377\377\6\377\377\377\5\377\377\377\7\377\377\377\13"
197 "\377\377\377\11\377\377\377\12\377\377\377\16\377\377\377\21\377\377\377"
198 "\21\377\377\377\20\377\377\377\22\377\377\377\30\377\377\377\26\377\377\377"
199 "\27\377\377\377\30\377\377\377\27\377\377\377\30\377\377\377\26\377\377\377"
200 "\23\377\377\377\22\377\377\377\20\377\377\377\20\377\377\377\16\377\377\377"
201 "\14\377\377\377\11\377\377\377\11\377\377\377\10\377\377\377\6\377\377\377"
202 "\6\377\377\377\4\377\377\377\3\377\377\377\4\377\377\377\4\377\377\377\4"
203 "\377\377\377\7\377\377\377\10\377\377\377\12\377\377\377\10\377\377\377\11"
204 "\377\377\377\15\377\377\377\16\377\377\377\16\377\377\377\20\377\377\377"
205 "\23\377\377\377\21\377\377\377\23\377\377\377\22\377\377\377\22\377\377\377"
206 "\21\377\377\377\22\377\377\377\22\377\377\377\20\377\377\377\16\377\377\377"
207 "\15\377\377\377\12\377\377\377\11\377\377\377\12\377\377\377\7\377\377\377"
208 "\6\377\377\377\7\377\377\377\5\377\377\377\4\377\377\377\1\377\377\377\1"
209 "\377\377\377\3\377\377\377\3\377\377\377\6\377\377\377\7\377\377\377\6\377"
210 "\377\377\10\377\377\377\12\377\377\377\12\377\377\377\11\377\377\377\13\377"
211 "\377\377\16\377\377\377\16\377\377\377\16\377\377\377\17\377\377\377\16\377"
212 "\377\377\16\377\377\377\17\377\377\377\17\377\377\377\15\377\377\377\14\377"
213 "\377\377\12\377\377\377\11\377\377\377\12\377\377\377\12\377\377\377\7\377"
214 "\377\377\6\377\377\377\6\377\377\377\6\377\377\377\3\377\377\377\1\377\377"
215 "\377\1\0\0\0\0\0\0\0\0\377\377\377\2\377\377\377\4\377\377\377\7\377\377"
216 "\377\6\377\377\377\6\377\377\377\7\377\377\377\13\377\377\377\13\377\377"
217 "\377\10\377\377\377\11\377\377\377\11\377\377\377\11\377\377\377\15\377\377"
218 "\377\13\377\377\377\14\377\377\377\11\377\377\377\13\377\377\377\11\377\377"
219 "\377\12\377\377\377\13\377\377\377\11\377\377\377\11\377\377\377\6\377\377"
220 "\377\7\377\377\377\4\377\377\377\5\377\377\377\3\377\377\377\1\0\0\0\0\0"
221 "\0\0\0"
222};
0223
=== added file 'plugins/animationplus/src/animationplus.cpp'
--- plugins/animationplus/src/animationplus.cpp 1970-01-01 00:00:00 +0000
+++ plugins/animationplus/src/animationplus.cpp 2016-07-25 17:11:00 +0000
@@ -0,0 +1,158 @@
1/**
2 * Example Animation extension plugin for compiz
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 **/
19
20#ifdef HAVE_CONFIG_H
21#include <config.h>
22#endif
23
24#include <limits.h>
25#include "private.h"
26
27COMPIZ_PLUGIN_20090315 (animationplus, AnimPlusPluginVTable);
28
29AnimEffect animEffects[NUM_EFFECTS];
30
31ExtensionPluginAnimPlus animPlusExtPluginInfo (CompString ("animationplus"),
32 NUM_EFFECTS, animEffects, NULL,
33 NUM_NONEFFECT_OPTIONS);
34
35ExtensionPluginInfo *
36BasePlusAnim::getExtensionPluginInfo ()
37{
38 return &animPlusExtPluginInfo;
39}
40
41BasePlusAnim::BasePlusAnim (CompWindow *w,
42 WindowEvent curWindowEvent,
43 float duration,
44 const AnimEffect info,
45 const CompRect &icon) :
46 Animation::Animation (w, curWindowEvent, duration, info, icon),
47 mCScreen (CompositeScreen::get (::screen)),
48 mGScreen (GLScreen::get (::screen))
49{
50}
51
52/*
53// For effects with custom polygon step functions:
54AnimExtEffectProperties fxAirplaneExtraProp = {
55 .animStepPolygonFunc = fxAirplaneLinearAnimStepPolygon};
56*/
57
58AnimEffect AnimEffectBlinds;
59AnimEffect AnimEffectHelix;
60AnimEffect AnimEffectShatter;
61AnimEffect AnimEffectBonanza;
62
63void
64AnimPlusScreen::initAnimationList ()
65{
66 int i = 0;
67
68 AnimEffectUsedFor usedFor = AnimEffectUsedFor::all ()
69 .exclude (AnimEventShade)
70 .exclude (AnimEventFocus);
71
72 animEffects[i++] = AnimEffectBlinds =
73 new AnimEffectInfo ("animationplus:Blinds",
74 usedFor,
75 &createAnimation <BlindsAnim>);
76
77 /* Currently broken */
78 animEffects[i++] = AnimEffectBonanza =
79 new AnimEffectInfo ("animationplus:Bonanza",
80 usedFor,
81 &createAnimation <BonanzaAnim>);
82
83 animEffects[i++] = AnimEffectHelix =
84 new AnimEffectInfo ("animationplus:Helix",
85 usedFor,
86 &createAnimation <HelixAnim>);
87
88 animEffects[i++] = AnimEffectShatter =
89 new AnimEffectInfo ("animationplus:Shatter",
90 usedFor,
91 &createAnimation <ShatterAnim>);
92
93 animPlusExtPluginInfo.effectOptions = &getOptions ();
94
95 AnimScreen *as = AnimScreen::get (::screen);
96
97 as->addExtension (&animPlusExtPluginInfo);
98}
99
100AnimPlusScreen::AnimPlusScreen (CompScreen *s) :
101 //cScreen (CompositeScreen::get (s)),
102 //gScreen (GLScreen::get (s)),
103 //aScreen (as),
104 PluginClassHandler <AnimPlusScreen, CompScreen> (s),
105 mOutput (s->fullscreenOutput ())
106{
107 initAnimationList ();
108}
109
110AnimPlusScreen::~AnimPlusScreen ()
111{
112 AnimScreen *as = AnimScreen::get (::screen);
113
114 as->removeExtension (&animPlusExtPluginInfo);
115
116 for (int i = 0; i < NUM_EFFECTS; i++)
117 {
118 delete animEffects[i];
119 animEffects[i] = NULL;
120 }
121}
122
123AnimPlusWindow::AnimPlusWindow (CompWindow *w) :
124 PluginClassHandler<AnimPlusWindow, CompWindow> (w),
125 mWindow (w),
126 aWindow (AnimWindow::get (w))
127{
128}
129
130AnimPlusWindow::~AnimPlusWindow ()
131{
132 Animation *curAnim = aWindow->curAnimation ();
133
134 if (!curAnim)
135 return;
136
137 // We need to interrupt and clean up the animation currently being played
138 // by animationsim for this window (if any)
139 if (curAnim->remainingTime () > 0 &&
140 curAnim->getExtensionPluginInfo ()->name ==
141 CompString ("animationplus"))
142 {
143 aWindow->postAnimationCleanUp ();
144 }
145}
146
147bool
148AnimPlusPluginVTable::init ()
149{
150 if (!CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) ||
151 !CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) ||
152 !CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI) ||
153 !CompPlugin::checkPluginABI ("animation", ANIMATION_ABI) ||
154 !CompPlugin::checkPluginABI ("animationaddon", ANIMATIONADDON_ABI))
155 return false;
156
157 return true;
158}
0159
=== added file 'plugins/animationplus/src/blinds.cpp'
--- plugins/animationplus/src/blinds.cpp 1970-01-01 00:00:00 +0000
+++ plugins/animationplus/src/blinds.cpp 2016-07-25 17:11:00 +0000
@@ -0,0 +1,70 @@
1/*
2 * Animation plugin for compiz/beryl
3 *
4 * blinds.cpp
5 *
6 * Copyright : (C) 2008 Kevin DuBois
7 * E-mail : kdub432@gmail.com
8 *
9 * Based on other animations by
10 * : Erkin Bahceci
11 * E-mail : erkinbah@gmail.com
12 *
13 * Which were based on Wobbly and Minimize plugins by
14 * : David Reveman
15 * E-mail : davidr@novell.com>
16 *
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License
19 * as published by the Free Software Foundation; either version 2
20 * of the License, or (at your option) any later version.
21 *const float ExplodeAnim::kDurationFactor = 1.43;
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 */
31
32#include "private.h"
33
34const float BlindsAnim::kDurationFactor = 1.43;
35
36
37BlindsAnim::BlindsAnim (CompWindow *w,
38 WindowEvent curWindowEvent,
39 float duration,
40 const AnimEffect info,
41 const CompRect &icon) :
42 Animation::Animation (w, curWindowEvent, kDurationFactor * duration, info, icon),
43 PolygonAnim::PolygonAnim (w, curWindowEvent, kDurationFactor * duration, info, icon)
44{
45 mAllFadeDuration = 0.3f;
46 mDoDepthTest = true;
47 mDoLighting = true;
48 mCorrectPerspective = CorrectPerspectivePolygon;
49 mBackAndSidesFadeDur = 0.2f;
50}
51
52void
53BlindsAnim::init ()
54{
55 ANIMPLUS_SCREEN (screen);
56
57 tessellateIntoRectangles (as->optionGetBlindsGridx (), 1,
58 as->optionGetBlindsThickness ());
59
60 foreach (PolygonObject *p, mPolygons)
61 {
62 //rotate around y axis
63 p->rotAxis.set (0, 1, 0);
64 p->finalRelPos.set (0, 0, 0);
65
66 int numberOfHalfTwists = as->optionGetBlindsNumHalftwists ();
67 p->finalRotAng = 180 * numberOfHalfTwists ;
68 }
69}
70
071
=== added file 'plugins/animationplus/src/bonanza.cpp'
--- plugins/animationplus/src/bonanza.cpp 1970-01-01 00:00:00 +0000
+++ plugins/animationplus/src/bonanza.cpp 2016-07-25 17:11:00 +0000
@@ -0,0 +1,241 @@
1/*
2 * Animation plugin for compiz/beryl
3 *
4 * bonanza.c
5 *
6 * Copyright : (C) 2008 Kevin DuBois
7 * E-mail : kdub423@gmail.com
8 *
9 * Based on animations system by: (C) 2006 Erkin Bahceci
10 * E-mail : erkinbah@gmail.com
11 *
12 * Based on particle system added by : (C) 2006 Dennis Kasprzyk
13 * E-mail : onestone@beryl-project.org
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 */
29
30#include "private.h"
31#include "animation_tex.h"
32
33// ===================== Effect: Burn =========================
34
35BonanzaAnim::BonanzaAnim (CompWindow *w,
36 WindowEvent curWindowEvent,
37 float duration,
38 const AnimEffect info,
39 const CompRect &icon) :
40 Animation::Animation (w, curWindowEvent, duration, info, icon),
41 ParticleAnim::ParticleAnim (w, curWindowEvent, duration, info, icon)
42{
43 ANIMPLUS_SCREEN (screen);
44
45 // Light Particles are for extras, dark particles unused?
46 initLightDarkParticles (as->optionGetBonanzaParticles (),
47 as->optionGetBonanzaParticles () / 10,
48 0.125,
49 0.5);
50
51 mAnimFireDirection = 0;
52}
53
54void
55BonanzaAnim::genFire (int x,
56 int y,
57 int radius,
58 float size,
59 float time)
60{
61 ANIMPLUS_SCREEN (screen);
62
63 ParticleSystem &ps = mParticleSystems[0];
64
65 float fireLife = as->optionGetBonanzaLife ();
66 float fireLifeNeg = 1 - fireLife;
67 float fadeExtra = 0.2f * (1.01 - fireLife);
68 float max_new = ps.particles ().size () * (time / 50) * (1.05 - fireLife);
69 float numParticles = ps.particles ().size ();
70
71 unsigned short *c = as->optionGetBonanzaColor ();
72 float colr1 = (float)c[0] / 0xffff;
73 float colg1 = (float)c[1] / 0xffff;
74 float colb1 = (float)c[2] / 0xffff;
75 float colr2 = 1 / 1.7 * (float)c[0] / 0xffff;
76 float colg2 = 1 / 1.7 * (float)c[1] / 0xffff;
77 float colb2 = 1 / 1.7 * (float)c[2] / 0xffff;
78 float cola = (float)c[3] / 0xffff;
79 float rVal;
80
81 Particle *part = &(ps.particles ()[0]);
82
83 float deg = 0;
84 float inc = 2.0 * 3.1415 / numParticles;
85 float partw = 5.00;
86 float parth = partw * 1.5;
87 bool mysticalFire = as->optionGetBonanzaMystical ();
88
89 for (unsigned int i = 0; i < numParticles && max_new > 0; i++, part++)
90 {
91 deg += inc;
92
93 if (part->life <= 0.0f)
94 {
95 // give gt new life
96 rVal = (float)(random() & 0xff) / 255.0;
97 part->life = 1.0f;
98 part->fade = rVal * fireLifeNeg + fadeExtra; // Random Fade Value
99
100 // set size
101 part->width = partw;
102 part->height = parth;
103 rVal = (float)(random() & 0xff) / 255.0;
104 part->w_mod = part->h_mod = size * rVal;
105
106 part->x = (float)x + (float) radius * cosf(deg);
107 part->y = (float)y + (float) radius * sinf(deg);
108
109 //clip
110 if (part->x <= 0)
111 part->x = 0;
112 if (part->x >= 2 * x)
113 part->x = 2*x;
114
115 if (part->y <= 0)
116 part->y = 0;
117 if (part->y >= 2 * y)
118 part->y = 2*y;
119
120 part->z = 0.0;
121
122 part->xo = part->x;
123 part->yo = part->y;
124 part->zo = 0.0f;
125
126 // set speed and direction
127 rVal = (float)(random() & 0xff) / 255.0;
128 part->xi = ((rVal * 20.0) - 10.0f);
129 rVal = (float)(random() & 0xff) / 255.0;
130 part->yi = ((rVal * 20.0) - 15.0f);
131 part->zi = 0.0f;
132
133 if (mysticalFire)
134 {
135 // Random colors! (aka Mystical Fire)
136 rVal = (float)(random() & 0xff) / 255.0;
137 part->r = rVal;
138 rVal = (float)(random() & 0xff) / 255.0;
139 part->g = rVal;
140 rVal = (float)(random() & 0xff) / 255.0;
141 part->b = rVal;
142 }
143 else
144 {
145 rVal = (float)(random() & 0xff) / 255.0;
146 part->r = colr1 - rVal * colr2;
147 part->g = colg1 - rVal * colg2;
148 part->b = colb1 - rVal * colb2;
149 }
150 // set transparancy
151 part->a = cola;
152
153 // set gravity
154 part->xg = (part->x < part->xo) ? 1.0 : -1.0;
155 part->yg = -3.0f;
156 part->zg = 0.0f;
157
158 ps.activate ();
159 max_new -= 1;
160 }
161 else
162 {
163 part->xg = (part->x < part->xo) ? 1.0 : -1.0;
164 }
165
166 }
167
168}
169
170void
171BonanzaAnim::step (float time)
172{
173 float timestep = 2.0;
174 CompRect rect = mWindow->outputRect ();
175
176 mRemainingTime -= timestep;
177 if (mRemainingTime <= 0)
178 mRemainingTime = 0; // avoid sub-zero values
179 float new_f = 1 - (mRemainingTime) / (mTotalTime - timestep);
180
181 if (mCurWindowEvent == WindowEventOpen ||
182 mCurWindowEvent == WindowEventUnminimize ||
183 mCurWindowEvent == WindowEventUnshade)
184 {
185 new_f = 1 - new_f;
186 }
187
188 mUseDrawRegion = true;
189 mDrawRegion = CompRegion ();
190
191
192 /* define an expanding circle as a union of rectangular X regions. */
193 float radius = 0;
194 if (mRemainingTime > 0)
195 {
196 XPoint pts[20];
197
198 int i;
199 float two_pi = 3.14159 * 2.0;
200 int centerX = rect.centerX () + rect.x ();
201 int centerY = rect.centerY () + rect.y ();
202 float corner_dist = sqrt( powf(rect.centerX ()/2,2) + powf(rect.centerY (),2));
203 radius = new_f * corner_dist;
204 for (i = 0; i < 20; i++)
205 {
206 pts[i].x = centerX + (int)(radius * cosf( (float) i/20.0 * two_pi ));
207 pts[i].y = centerY + (int)(radius * sinf( (float) i/20.0 * two_pi ));
208 }
209
210 Region pointsRegion = XPolygonRegion (&pts[0], 20, WindingRule);;
211 mDrawRegion = CompRegionRef(pointsRegion) - emptyRegion.united (rect);
212 XDestroyRegion (pointsRegion);
213 }
214 else
215 {
216 mDrawRegion = emptyRegion;
217 }
218
219
220 mUseDrawRegion = (fabs (new_f) > 1e-5);
221
222 genFire (rect.centerX (),
223 rect.centerY (),
224 radius,
225 WIN_W(mWindow) / 40.0,
226 time);
227
228 if (mRemainingTime <= 0 && mParticleSystems.size () && mParticleSystems.at (0).active ())
229 {
230 mRemainingTime = 0;
231 }
232
233 if (mParticleSystems.empty () || !mParticleSystems.at (0).active ())
234 {
235 mParticleSystems.clear ();
236 // Abort animation
237 compLogMessage ("animationaddon", CompLogLevelError, "Couldn't do bonanza animation\n");
238 mRemainingTime = 0;
239 }
240}
241
0242
=== added file 'plugins/animationplus/src/helix.cpp'
--- plugins/animationplus/src/helix.cpp 1970-01-01 00:00:00 +0000
+++ plugins/animationplus/src/helix.cpp 2016-07-25 17:11:00 +0000
@@ -0,0 +1,93 @@
1/*
2 * Animation plugin for compiz/beryl
3 *
4 * animation.c
5 *
6 * Copyright : (C) 2008 Kevin DuBois
7 * E-mail : kdub432@gmail.com
8 *
9 * Based on other animations by
10 * : Erkin Bahceci
11 * E-mail : erkinbah@gmail.com
12 *
13 * Which were based on Wobbly and Minimize plugins by
14 * : David Reveman
15 * E-mail : davidr@novell.com>
16 *
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License
19 * as published by the Free Software Foundation; either version 2
20 * of the License, or (at your option) any later version.
21 *
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 */
31
32#include "private.h"
33
34const float HelixAnim::kDurationFactor = 1.43;
35
36HelixAnim::HelixAnim (CompWindow *w,
37 WindowEvent curWindowEvent,
38 float duration,
39 const AnimEffect info,
40 const CompRect &icon) :
41 Animation::Animation (w, curWindowEvent, kDurationFactor * duration, info, icon),
42 PolygonAnim::PolygonAnim (w, curWindowEvent, kDurationFactor * duration, info, icon)
43{
44 mAllFadeDuration = 0.4f;
45 mBackAndSidesFadeDur = 0.2f;
46 mDoDepthTest = TRUE;
47 mDoLighting = TRUE;
48 mCorrectPerspective = CorrectPerspectivePolygon;
49}
50
51void
52HelixAnim::init ()
53{
54 ANIMPLUS_SCREEN (screen);
55
56 int gridsizeY = as->optionGetHelixGridy ();
57 int count = 0;
58
59 tessellateIntoRectangles (1, gridsizeY, as->optionGetHelixThickness ());
60
61 foreach (PolygonObject *p, mPolygons)
62 {
63
64 //rotate around y axis normally, or the z axis if the effect is in vertical mode
65 if (as->optionGetHelixDirection ())
66 p->rotAxis.set (0, 0, 1);
67 else
68 p->rotAxis.set (0, 1, 0);
69
70 //only move the pieces in a 'vertical' rotation
71 if (as->optionGetHelixDirection ())
72 p->finalRelPos.set (0,
73 -1 * ((mWindow->height () / gridsizeY) * (count - gridsizeY/2)),
74 0);
75 else
76 p->finalRelPos.set (0,
77 0,
78 0);
79
80 //determine how long, and what direction to spin
81 int numberOfTwists = as->optionGetHelixNumTwists ();
82 int spin_dir = as->optionGetHelixSpinDirection ();
83
84 if (spin_dir)
85 p->finalRotAng = 270 - ( 2 * numberOfTwists * count);
86 else
87 p->finalRotAng = ( 2 * numberOfTwists * count) - 270;
88
89 count++;
90
91 }
92}
93
094
=== added file 'plugins/animationplus/src/private.h'
--- plugins/animationplus/src/private.h 1970-01-01 00:00:00 +0000
+++ plugins/animationplus/src/private.h 2016-07-25 17:11:00 +0000
@@ -0,0 +1,196 @@
1#include <string.h>
2#include <stdlib.h>
3#include <math.h>
4#include <sys/time.h>
5
6#ifdef USE_LIBRSVG
7#include <cairo/cairo.h>
8#include <cairo/cairo-xlib.h>
9#include <librsvg/rsvg.h>
10#include <librsvg/rsvg-cairo.h>
11#endif
12
13#include <core/core.h>
14#include <opengl/opengl.h>
15#include <composite/composite.h>
16#include <animation/animation.h>
17#include <animationaddon/animationaddon.h>
18
19#include "animationplus_options.h"
20
21extern AnimEffect AnimEffectBlinds;
22extern AnimEffect AnimEffectBonanza;
23extern AnimEffect AnimEffectHelix;
24extern AnimEffect AnimEffectShatter;
25
26#define NUM_EFFECTS 4
27
28// This must have the value of the first "effect setting" above
29// in AnimEgScreenOptions
30#define NUM_NONEFFECT_OPTIONS 0
31
32#define WIN_X(w) ((w)->x () - (w)->input ().left)
33#define WIN_Y(w) ((w)->y () - (w)->input ().top)
34#define WIN_W(w) ((w)->width () + (w)->input ().left + (w)->input ().right)
35#define WIN_H(w) ((w)->height () + (w)->input ().top + (w)->input ().bottom)
36
37class ExtensionPluginAnimPlus : public ExtensionPluginInfo
38{
39 public:
40
41 ExtensionPluginAnimPlus (const CompString &name,
42 unsigned int nEffects,
43 AnimEffect *effects,
44 CompOption::Vector *effectOptions,
45 unsigned int firstEffectOptionIndex) :
46 ExtensionPluginInfo (name, nEffects, effects, effectOptions,
47 firstEffectOptionIndex) {}
48 ~ExtensionPluginAnimPlus () {}
49
50 const CompOutput *output () { return mOutput; }
51 private:
52
53 const CompOutput *mOutput;
54};
55
56class BasePlusAnim :
57 virtual public Animation
58{
59 public:
60
61 BasePlusAnim (CompWindow *w,
62 WindowEvent curWindowEvent,
63 float duration,
64 const AnimEffect info,
65 const CompRect &icon);
66
67 ~BasePlusAnim () {}
68
69 protected:
70 // Gets info about the extension plugin that implements this animation.
71 ExtensionPluginInfo* getExtensionPluginInfo ();
72
73 CompositeScreen *mCScreen;
74 GLScreen *mGScreen;
75};
76
77class AnimPlusScreen :
78 public PluginClassHandler <AnimPlusScreen, CompScreen>,
79 public AnimationplusOptions
80{
81 public:
82
83 AnimPlusScreen (CompScreen *);
84 ~AnimPlusScreen ();
85
86 protected:
87
88 void initAnimationList ();
89
90 CompOutput &mOutput;
91};
92
93class AnimPlusWindow :
94 public PluginClassHandler <AnimPlusWindow, CompWindow>
95{
96 public:
97
98 AnimPlusWindow (CompWindow *);
99 ~AnimPlusWindow ();
100
101 protected:
102
103 CompWindow *mWindow;
104 AnimWindow *aWindow;
105
106};
107
108#define ANIMPLUS_SCREEN(s) \
109 AnimPlusScreen *as = AnimPlusScreen::get (s);
110
111#define ANIMPLUS_WINDOW(w) \
112 AnimPlusWindow *aw = AnimPlusWindow::get (w);
113
114// ratio of perceived length of animation compared to real duration
115// to make it appear to have the same speed with other animation effects
116
117#define EXPLODE_PERCEIVED_T 0.7f
118
119/*
120 * Function prototypes
121 *
122 */
123
124class BlindsAnim : public PolygonAnim
125{
126 public:
127
128 BlindsAnim (CompWindow *w,
129 WindowEvent curWindowEvent,
130 float duration,
131 const AnimEffect info,
132 const CompRect &icon);
133
134 void init ();
135 protected:
136 static const float kDurationFactor;
137};
138
139class HelixAnim : public PolygonAnim
140{
141 public:
142 HelixAnim (CompWindow *w,
143 WindowEvent curWindowEvent,
144 float duration,
145 const AnimEffect info,
146 const CompRect &icon);
147
148 void init ();
149 protected:
150 static const float kDurationFactor;
151};
152
153class BonanzaAnim : public ParticleAnim
154{
155 public:
156 BonanzaAnim (CompWindow *w,
157 WindowEvent curWindowEvent,
158 float duration,
159 const AnimEffect info,
160 const CompRect &icon);
161
162 void
163 genFire (int x,
164 int y,
165 int radius,
166 float size,
167 float time);
168
169 void step (float);
170 protected:
171
172 int mAnimFireDirection;
173 unsigned int mFirePDId;
174};
175
176class ShatterAnim : public PolygonAnim
177{
178 public:
179 ShatterAnim (CompWindow *w,
180 WindowEvent curWindowEvent,
181 float duration,
182 const AnimEffect info,
183 const CompRect &icon);
184
185 void init ();
186 protected:
187 static const float kDurationFactor;
188};
189
190class AnimPlusPluginVTable :
191 public CompPlugin::VTableForScreenAndWindow <AnimPlusScreen, AnimPlusWindow>
192{
193 public:
194
195 bool init ();
196};
0197
=== added file 'plugins/animationplus/src/shatter.cpp'
--- plugins/animationplus/src/shatter.cpp 1970-01-01 00:00:00 +0000
+++ plugins/animationplus/src/shatter.cpp 2016-07-25 17:11:00 +0000
@@ -0,0 +1,75 @@
1/*
2 * Animation plugin for compiz/beryl
3 *
4 * animation.c
5 *
6 * Copyright : (C) 2008 Kevin DuBois
7 * E-mail : kdub432@gmail.com
8 *
9 * Based on other animations by
10 * : Erkin Bahceci
11 * E-mail : erkinbah@gmail.com
12 *
13 * Which were based on Wobbly and Minimize plugins by
14 * : David Reveman
15 * E-mail : davidr@novell.com>
16 *
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License
19 * as published by the Free Software Foundation; either version 2
20 * of the License, or (at your option) any later version.
21 *
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 */
31#include "private.h"
32
33const float ShatterAnim::kDurationFactor = 1.43;
34
35ShatterAnim::ShatterAnim (CompWindow *w,
36 WindowEvent curWindowEvent,
37 float duration,
38 const AnimEffect info,
39 const CompRect &icon) :
40 Animation::Animation (w, curWindowEvent, kDurationFactor * duration, info,
41 icon),
42 PolygonAnim::PolygonAnim (w, curWindowEvent, kDurationFactor * duration,
43 info, icon)
44{
45 mAllFadeDuration = 0.4f;
46 mBackAndSidesFadeDur = 0.2f;
47 mDoDepthTest = true;
48 mDoLighting = true;
49 mCorrectPerspective = CorrectPerspectivePolygon;
50}
51
52void
53ShatterAnim::init ()
54{
55 ANIMPLUS_SCREEN (screen);
56 int static_polygon;
57 int screen_height = screen->outputDevs ().at (mWindow->outputDevice ()).height ();
58
59 tessellateIntoGlass (as->optionGetShatterNumSpokes (),
60 as->optionGetShatterNumTiers (),
61 1); //can't really see how thick it is...
62
63 foreach (PolygonObject *p, mPolygons)
64 {
65 p->rotAxis.set (0, 0, 1);
66 static_polygon = 1;
67
68 p->finalRelPos.set (0,
69 static_polygon * (-p->centerPosStart.y () + screen_height),
70 0);
71 if (p->finalRelPos.y ())
72 p->finalRotAng = RAND_FLOAT() * 120 * ( RAND_FLOAT() < 0.5 ? -1 : 1 );
73 }
74}
75
076
=== modified file 'plugins/simple-animations/CMakeLists.txt'
--- plugins/simple-animations/CMakeLists.txt 2016-07-25 17:10:49 +0000
+++ plugins/simple-animations/CMakeLists.txt 2016-07-25 17:11:00 +0000
@@ -1,8 +1,4 @@
1find_package (Compiz REQUIRED)1find_package (Compiz REQUIRED)
2
3include (FindOpenGL)
4include (CompizPlugin)2include (CompizPlugin)
53
6if (OPENGL_GLU_FOUND)4compiz_plugin (animationsim PLUGINDEPS composite opengl animation)
7 compiz_plugin (animationsim PLUGINDEPS composite opengl animation LIBRARIES ${OPENGL_glu_LIBRARY} INCDIRS ${OPENGL_INCLUDE_DIR})
8endif (OPENGL_GLU_FOUND)

Subscribers

People subscribed via source and target branches