2
* This file is a part of the Cairo-Dock project
4
* Copyright : (C) see the 'copyright' file.
5
* E-mail : see the 'copyright' file.
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.
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/>.
21
#ifndef __CD_APPLET_STRUCT__
22
#define __CD_APPLET_STRUCT__
24
#include <cairo-dock.h>
26
#define CD_ANIMATIONS_SPOT_HEIGHT 12
33
} CDAnimationsMeshType;
36
CD_HORIZONTAL_STRECTH=0,
39
CD_ANIMATIONS_NB_STRECTH
40
} CDAnimationsStretchType;
43
CD_ANIMATIONS_BOUNCE=0,
50
CD_ANIMATIONS_NB_EFFECTS
51
} CDAnimationsEffects;
53
//\___________ structure containing the applet's configuration parameters.
54
struct _AppletConfig {
55
gint iRotationDuration;
56
gboolean bContinueRotation;
57
CDAnimationsMeshType iMeshType;
58
GLfloat pMeshColor[4];
61
gboolean bContinueSpot;
62
GLfloat pSpotColor[3];
63
GLfloat pHaloColor[4];
64
gdouble pRaysColor1[3];
65
gdouble pRaysColor2[3];
66
gboolean bMysticalRays;
67
gint iNbRaysParticles;
68
gint iRaysParticleSize;
69
gdouble fRaysParticleSpeed;
71
gboolean bContinueWobbly;
73
CDAnimationsStretchType iInitialStrecth;
74
gdouble fSpringConstant;
78
gboolean bContinueWave;
80
gdouble fWaveAmplitude;
83
gboolean bContinuePulse;
85
gboolean bPulseSameShape;
88
gboolean bContinueBounce;
89
gdouble fBounceResize;
90
gdouble fBounceFlatten;
93
gboolean bContinueBlink;
95
CDAnimationsEffects iEffectsOnMouseOver[CD_ANIMATIONS_NB_EFFECTS];
96
CDAnimationsEffects iEffectsOnClick[CAIRO_DOCK_NB_TYPES][CD_ANIMATIONS_NB_EFFECTS];
97
gint iNbRoundsOnClick[CAIRO_DOCK_NB_TYPES];
100
//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc.
102
GLuint iChromeTexture;
103
GLuint iCallList[CD_ANIMATIONS_NB_MESH];
106
GLuint iSpotFrontTexture;
108
gint iAnimationID[CD_ANIMATIONS_NB_EFFECTS];
111
typedef struct _CDAnimationGridNode {
116
} CDAnimationGridNode;
118
#define CD_WAVE_NB_POINTS 9
120
typedef struct _CDAnimationData {
121
gdouble fRotationSpeed;
122
gdouble fRotationAngle;
123
gdouble fRotationBrake;
124
gdouble fAdjustFactor;
125
gboolean bRotationBeginning;
126
gdouble fRotateWidthFactor;
128
gdouble fIconOffsetY;
129
gdouble fRadiusFactor;
130
gdouble fHaloRotationAngle;
131
CairoParticleSystem *pRaysSystem;
133
gboolean bIsWobblying;
134
CDAnimationGridNode gridNodes[4][4];
135
GLfloat pCtrlPts[4][4][3];
137
gdouble fWobblyWidthFactor, fWobblyHeightFactor;
140
gdouble fWavePosition;
141
gint iNumActiveNodes;
142
GLfloat pVertices[3*(2*CD_WAVE_NB_POINTS+2)];
143
GLfloat pCoords[2*(2*CD_WAVE_NB_POINTS+2)];
144
GLfloat pColors[4*(2*CD_WAVE_NB_POINTS+2)];
151
gboolean bIsBouncing;
154
gdouble fFlattenFactor;
155
gdouble fResizeFactor;
157
gboolean bIsBlinking;
161
gint iReflectShadeCount;