| 1 |
/** |
| 2 |
* This file is a part of the Cairo-Dock project |
| 3 |
* |
| 4 |
* Copyright : (C) see the 'copyright' file. |
| 5 |
* E-mail : see the 'copyright' file. |
| 6 |
* |
| 7 |
* This program is free software; you can redistribute it and/or |
| 8 |
* modify it under the terms of the GNU General Public License |
| 9 |
* as published by the Free Software Foundation; either version 3 |
| 10 |
* of the License, or (at your option) any later version. |
| 11 |
* |
| 12 |
* This program is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
* GNU General Public License for more details. |
| 16 |
* You should have received a copy of the GNU General Public License |
| 17 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 |
*/ |
| 19 |
|
| 20 |
|
| 21 |
#ifndef __CD_APPLET_STRUCT__ |
| 22 |
#define __CD_APPLET_STRUCT__ |
| 23 |
|
| 24 |
#include <cairo-dock.h> |
| 25 |
|
| 26 |
typedef enum _CDIllusionEffect { |
| 27 |
CD_ILLUSION_EVAPORATE=0, |
| 28 |
CD_ILLUSION_FADE_OUT, |
| 29 |
CD_ILLUSION_EXPLODE, |
| 30 |
CD_ILLUSION_BREAK, |
| 31 |
CD_ILLUSION_BLACK_HOLE, |
| 32 |
CD_ILLUSION_NB_EFFECTS, |
| 33 |
CD_ILLUSION_LIGHTNING |
| 34 |
} CDIllusionEffect; |
| 35 |
|
| 36 |
|
| 37 |
//\___________ structure containing the applet's configuration parameters. |
| 38 |
struct _AppletConfig { |
| 39 |
CDIllusionEffect iDisappearanceEffect; |
| 40 |
CDIllusionEffect iAppearanceEffect; |
| 41 |
|
| 42 |
gint iEvaporateDuration; |
| 43 |
gint iEvaporateNbParticles; |
| 44 |
gdouble pEvaporateColor1[3]; |
| 45 |
gdouble pEvaporateColor2[3]; |
| 46 |
gboolean bMysticalEvaporate; |
| 47 |
gint iNbEvaporateParticles; |
| 48 |
gint iEvaporateParticleSize; |
| 49 |
gdouble fEvaporateParticleSpeed; |
| 50 |
gboolean bEvaporateFromBottom; |
| 51 |
|
| 52 |
gint iFadeOutDuration; |
| 53 |
|
| 54 |
gint iExplodeDuration; |
| 55 |
gint iExplodeNbPiecesX, iExplodeNbPiecesY; |
| 56 |
gdouble fExplosionRadius; |
| 57 |
gboolean bExplodeCube; |
| 58 |
|
| 59 |
gint iBreakDuration; |
| 60 |
gint iBreakNbBorderPoints; |
| 61 |
|
| 62 |
gint iBlackHoleDuration; |
| 63 |
gdouble fBlackHoleRotationSpeed; |
| 64 |
gint iAttraction; |
| 65 |
|
| 66 |
gint iLightningDuration; |
| 67 |
gint iLightningNbSources; |
| 68 |
gint iLightningNbCtrlPts; |
| 69 |
gdouble fLightningColor1[4]; |
| 70 |
gdouble fLightningColor2[4]; |
| 71 |
} ; |
| 72 |
|
| 73 |
//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc. |
| 74 |
struct _AppletData { |
| 75 |
GLuint iEvaporateTexture; |
| 76 |
GLuint iLightningTexture; |
| 77 |
} ; |
| 78 |
|
| 79 |
typedef struct { |
| 80 |
gdouble fRotationSpeed; |
| 81 |
gdouble vx, vy, vz; |
| 82 |
} CDIllusionExplosion; |
| 83 |
|
| 84 |
typedef struct { |
| 85 |
gdouble pCoords[4*2]; |
| 86 |
gint iNbPts; |
| 87 |
gdouble fCrackAngle; |
| 88 |
gdouble fRotationAngle; |
| 89 |
gdouble yinf; |
| 90 |
} CDIllusionBreak; |
| 91 |
|
| 92 |
typedef struct { |
| 93 |
gdouble u, v; |
| 94 |
gdouble fTheta0, r0; |
| 95 |
gdouble fTheta; |
| 96 |
gdouble x, y; |
| 97 |
} CDIllusionBlackHole; |
| 98 |
|
| 99 |
typedef struct { |
| 100 |
GLfloat *pVertexTab; |
| 101 |
gint iNbCurrentVertex; |
| 102 |
} CDIllusionLightning; |
| 103 |
|
| 104 |
|
| 105 |
typedef struct _CDIllusionData { |
| 106 |
CDIllusionEffect iCurrentEffect; |
| 107 |
gint iEffectDuration; |
| 108 |
gdouble fTimeLimitPercent; |
| 109 |
gdouble fDeltaT; |
| 110 |
gint sens; |
| 111 |
gdouble fTime; |
| 112 |
|
| 113 |
gdouble fEvaporatePercent; |
| 114 |
CairoParticleSystem *pEvaporateSystem; |
| 115 |
|
| 116 |
gdouble fFadeOutAlpha; |
| 117 |
|
| 118 |
gdouble fExplosionRadius; |
| 119 |
gdouble fExplosionRotation; |
| 120 |
gdouble fExplodeAlpha; |
| 121 |
CDIllusionExplosion *pExplosionPart; |
| 122 |
|
| 123 |
CDIllusionBreak *pBreakPart; |
| 124 |
gint iNbBreakParts; |
| 125 |
gdouble dh; |
| 126 |
|
| 127 |
CDIllusionBlackHole *pBlackHolePoints; |
| 128 |
GLfloat *pBlackHoleCoords, *pBlackHoleVertices; |
| 129 |
|
| 130 |
CDIllusionLightning *pLightnings; |
| 131 |
gint iNbVertex; |
| 132 |
gint iNbSources; |
| 133 |
gdouble fLightningAlpha; |
| 134 |
} CDIllusionData; |
| 135 |
|
| 136 |
#endif |