~ubuntu-branches/ubuntu/saucy/cairo-dock-plug-ins/saucy

« back to all changes in this revision

Viewing changes to slider/src/applet-struct.h

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-08-26 21:07:39 UTC
  • Revision ID: james.westby@ubuntu.com-20090826210739-gyjuuqezrzuluao4
Tags: upstream-2.0.8.1
ImportĀ upstreamĀ versionĀ 2.0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#include <glib/gstdio.h>
 
27
 
 
28
typedef enum {
 
29
        SLIDER_DEFAULT = 0,
 
30
        SLIDER_FADE,
 
31
        SLIDER_BLANK_FADE,
 
32
        SLIDER_FADE_IN_OUT,
 
33
        SLIDER_SIDE_KICK,
 
34
        SLIDER_DIAPORAMA,
 
35
        SLIDER_GROW_UP,
 
36
        SLIDER_SHRINK_DOWN,
 
37
        SLIDER_CUBE,
 
38
        SLIDER_RANDOM,
 
39
        SLIDER_NB_ANIMATION
 
40
} SliderAnimation;
 
41
 
 
42
typedef enum {
 
43
        SLIDER_PAUSE = 0,
 
44
        SLIDER_OPEN_IMAGE,
 
45
        SLIDER_NB_CLICK_OPTION
 
46
} SliderClickOption;
 
47
 
 
48
typedef struct {
 
49
        double fImgX;
 
50
        double fImgY;
 
51
        double fImgW;
 
52
        double fImgH;
 
53
} SliderImageArea;
 
54
 
 
55
typedef enum {
 
56
        SLIDER_UNKNOWN_FORMAT = 0,
 
57
        SLIDER_PNG,
 
58
        SLIDER_JPG,
 
59
        SLIDER_SVG,
 
60
        SLIDER_GIF,
 
61
        SLIDER_XPM,
 
62
        SLIDER_NB_IMAGE_FORMAT
 
63
} SliderImageFormat;
 
64
 
 
65
typedef struct {
 
66
        gchar *cPath;
 
67
        gint iSize;
 
68
        SliderImageFormat iFormat;
 
69
        gboolean iOrientation;
 
70
} SliderImage;
 
71
 
 
72
//\___________ structure containing the applet's configuration parameters.
 
73
struct _AppletConfig {
 
74
        gint iSlideTime;
 
75
        gchar *cDirectory;
 
76
        gboolean bSubDirs;
 
77
        gboolean bNoStretch;
 
78
        gboolean bFillIcon;
 
79
        gboolean bRandom;
 
80
        gboolean bImageName;
 
81
        gdouble pBackgroundColor[4];
 
82
        SliderAnimation iAnimation;
 
83
        gint iNbAnimationStep;
 
84
        SliderClickOption iClickOption;
 
85
        gboolean bUseThread;  // plante sur certaines images (svg) dans X :-(
 
86
} ;
 
87
 
 
88
//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc.
 
89
struct _AppletData {
 
90
        GList *pList;  // list d'images.
 
91
        GList *pElement;  // pointeur sur l'element courant de la liste.
 
92
        gint iTimerID;  // timer d'attente de la prochaine image.
 
93
        gboolean bPause;
 
94
        gdouble fAnimAlpha;  // ces 3 variables sont pour les animations.
 
95
        gint iAnimCNT;
 
96
        gint sens;
 
97
        SliderImageArea slideArea;  // aire de l'image courante.
 
98
        SliderImageArea prevSlideArea;  // aire de l'image precedente.
 
99
        cairo_surface_t* pCairoSurface;  // surface courante.
 
100
        cairo_surface_t* pPrevCairoSurface;  // surface precedente.
 
101
        GLuint iTexture;  // texture courante.
 
102
        GLuint iPrevTexture;  // texture precedente.
 
103
        gint iSurfaceWidth, iSurfaceHeight;  // dimension de la zone de dessin.
 
104
        SliderAnimation iAnimation;  // animation de transition courante.
 
105
        CairoDockTask *pMeasureDirectory;  // mesure pour parcourir le repertoire courant.
 
106
        CairoDockTask *pMeasureImage;  // mesure pour charger l'image courante.
 
107
        guint iScrollID;
 
108
        gint iNbScroll;
 
109
} ;
 
110
 
 
111
 
 
112
#endif