~ubuntu-branches/ubuntu/maverick/cairo-dock-plugins/weird

« back to all changes in this revision

Viewing changes to dock-rendering/src/rendering-curve.c

  • Committer: matttbe
  • Date: 2010-08-07 01:43:25 UTC
  • Revision ID: matttbe@gmail.com-20100807014325-36tmlrc8n1rrksk5
* New Upstream Version (LP: #614625)
* debian/rules:
 - Autotools has been replaced by CMake
 - cdbs is now used.
* debian/copyright:
 - Updated with the new applets
* debian/control:
 - Autotools has been replaced by CMake
 - Added libcurl4-gnutls-dev, libindicator-dev, libdbusmenu-glib-dev
   libido-0.1-dev, libical-dev, libdbusmenu-gtk-dev as Build-deps
 - Bump Standard-Version to 3.9.1
 - Wget is required for dnd2share applet
* debian/cairo-dock-plug-ins*.install:
 - All sonames are now installed into lib32 or lib64 (lib*)
* Fixed a few bugs on LP:
 - LP: #483963, LP: #485159, LP: #500677, LP: #500979
 - LP: #521531, LP: #519915, LP: #526138, LP: #531317
 - LP: #531319, LP: #537115, LP: #537943, LP: #538637
 - More details on the 'ChangeLog' file

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
static double *s_pReferenceCurveS = NULL;
35
35
static double *s_pReferenceCurveX = NULL;
36
36
static double *s_pReferenceCurveY = NULL;
37
 
int iVanishingPointY = 200;
 
37
extern int iVanishingPointY;
38
38
 
39
 
extern CDSpeparatorType my_iDrawSeparator3D;
 
39
extern CairoDockSpeparatorType my_iDrawSeparator3D;
40
40
extern double my_fSeparatorColor[4];
41
41
 
42
42
extern gdouble my_fCurveCurvature;
43
43
extern gint my_iCurveAmplitude;
44
44
 
45
45
extern cairo_surface_t *my_pFlatSeparatorSurface[2];
46
 
extern GLuint my_iFlatSeparatorTexture;
47
46
 
48
47
 
49
48
//const guint curveOffsetX = 75;
61
60
        double ti = .5 * (1. - sqrt (MAX (1. - 4./3 * hi / h, 0.01)));\
62
61
        double xi = xCurve (my_fCurveCurvature, ti);\
63
62
        double w, dw = 0
64
 
        
65
 
void cd_rendering_calculate_max_dock_size_curve (CairoDock *pDock)
 
63
 
 
64
static void cd_rendering_calculate_reference_curve (double alpha)
 
65
{
 
66
        if (s_pReferenceCurveS == NULL)
 
67
        {
 
68
                s_pReferenceCurveS = g_new (double, RENDERING_INTERPOLATION_NB_PTS+1);
 
69
        }
 
70
        
 
71
        if (s_pReferenceCurveX == NULL)
 
72
        {
 
73
                s_pReferenceCurveX = g_new (double, RENDERING_INTERPOLATION_NB_PTS+1);
 
74
        }
 
75
        
 
76
        if (s_pReferenceCurveY == NULL)
 
77
        {
 
78
                s_pReferenceCurveY = g_new (double, RENDERING_INTERPOLATION_NB_PTS+1);
 
79
        }
 
80
        
 
81
        double s, x, y;
 
82
        int i;
 
83
        for (i = 0; i < RENDERING_INTERPOLATION_NB_PTS+1; i ++)
 
84
        {
 
85
                s = (double) i / RENDERING_INTERPOLATION_NB_PTS;
 
86
                
 
87
                s_pReferenceCurveS[i] = s;
 
88
                s_pReferenceCurveX[i] = xCurve (my_fCurveCurvature, s);
 
89
                s_pReferenceCurveY[i] = yCurve (s);
 
90
        }
 
91
}
 
92
 
 
93
static double cd_rendering_interpol_curve_parameter (double x)
 
94
{
 
95
        return cd_rendering_interpol (x, s_pReferenceCurveX, s_pReferenceCurveS);
 
96
}
 
97
 
 
98
static double cd_rendering_interpol_curve_height (double x)
 
99
{
 
100
        return cd_rendering_interpol (x, s_pReferenceCurveX, s_pReferenceCurveY);
 
101
}
 
102
 
 
103
static void cd_rendering_calculate_max_dock_size_curve (CairoDock *pDock)
66
104
{
67
105
        static double fCurveCurvature = 0;
68
106
        if (s_pReferenceCurveS == NULL || my_fCurveCurvature != fCurveCurvature)
110
148
        {
111
149
                my_iDrawSeparator3D = myIcons.iSeparatorType;
112
150
                memcpy (my_fSeparatorColor, myIcons.fSeparatorColor, 4*sizeof(double));
113
 
                if (myIcons.iSeparatorType == CD_FLAT_SEPARATOR)
 
151
                if (myIcons.iSeparatorType == CAIRO_DOCK_FLAT_SEPARATOR)
114
152
                {
115
153
                        cd_rendering_load_flat_separator (CAIRO_CONTAINER (g_pMainDock));
116
154
                }
117
155
        }
118
156
        
119
 
        pDock->iMinDockWidth = pDock->fFlatDockWidth;
 
157
        pDock->iMinDockWidth = MAX (1, pDock->fFlatDockWidth);  // fFlatDockWidth peut etre meme negatif avec un dock vide.
120
158
}
121
159
 
122
160
 
319
357
                cairo_rel_line_to (pCairoContext, - fBigWidth, 0);
320
358
                cairo_rel_line_to (pCairoContext, - fDeltaXLeft, - sens * fHeight);
321
359
                
322
 
                if (my_iDrawSeparator3D == CD_FLAT_SEPARATOR)
 
360
                if (my_iDrawSeparator3D == CAIRO_DOCK_FLAT_SEPARATOR)
323
361
                {
324
362
                        if (! pDock->container.bDirectionUp)
325
363
                                cairo_scale (pCairoContext, 1, -1);
336
374
                cairo_rel_line_to (pCairoContext, 0, - fBigWidth);
337
375
                cairo_rel_line_to (pCairoContext, - sens * fHeight, - fDeltaXLeft);
338
376
                
339
 
                if (my_iDrawSeparator3D == CD_FLAT_SEPARATOR)
 
377
                if (my_iDrawSeparator3D == CAIRO_DOCK_FLAT_SEPARATOR)
340
378
                {
341
379
                        if (! pDock->container.bDirectionUp)
342
380
                                cairo_scale (pCairoContext, -1, 1);
420
458
 
421
459
static void cd_rendering_draw_3D_curve_separator (Icon *icon, cairo_t *pCairoContext, CairoDock *pDock, gboolean bHorizontal, gboolean bBackGround)
422
460
{
423
 
        cd_rendering_make_3D_curve_separator (icon, pCairoContext, pDock, (my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR), bBackGround);
 
461
        cd_rendering_make_3D_curve_separator (icon, pCairoContext, pDock, (my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR), bBackGround);
424
462
        
425
 
        if (my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR)
 
463
        if (my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR)
426
464
        {
427
465
                cairo_set_operator (pCairoContext, CAIRO_OPERATOR_DEST_OUT);
428
466
                cairo_set_source_rgba (pCairoContext, 0.0, 0.0, 0.0, 1.0);
464
502
        // on trace la ligne du bas
465
503
        cairo_rel_line_to (pCairoContext, 0, - fFrameWidth);
466
504
}
467
 
void cairo_dock_draw_curved_frame (cairo_t *pCairoContext, double fFrameWidth, double fControlHeight, double fDockOffsetX, double fDockOffsetY, gboolean bHorizontal, int sens)
 
505
static void cairo_dock_draw_curved_frame (cairo_t *pCairoContext, double fFrameWidth, double fControlHeight, double fDockOffsetX, double fDockOffsetY, gboolean bHorizontal, int sens)
468
506
{
469
507
        if (bHorizontal)
470
508
                cairo_dock_draw_curved_frame_horizontal (pCairoContext, fFrameWidth, fControlHeight, fDockOffsetX, fDockOffsetY, sens);
472
510
                cairo_dock_draw_curved_frame_vertical (pCairoContext, fFrameWidth, fControlHeight, fDockOffsetX, fDockOffsetY, sens);
473
511
}
474
512
 
475
 
 
476
 
void cd_rendering_calculate_reference_curve (double alpha)
477
 
{
478
 
        if (s_pReferenceCurveS == NULL)
479
 
        {
480
 
                s_pReferenceCurveS = g_new (double, RENDERING_INTERPOLATION_NB_PTS+1);
481
 
        }
482
 
        
483
 
        if (s_pReferenceCurveX == NULL)
484
 
        {
485
 
                s_pReferenceCurveX = g_new (double, RENDERING_INTERPOLATION_NB_PTS+1);
486
 
        }
487
 
        
488
 
        if (s_pReferenceCurveY == NULL)
489
 
        {
490
 
                s_pReferenceCurveY = g_new (double, RENDERING_INTERPOLATION_NB_PTS+1);
491
 
        }
492
 
        
493
 
        double s, x, y;
494
 
        int i;
495
 
        for (i = 0; i < RENDERING_INTERPOLATION_NB_PTS+1; i ++)
496
 
        {
497
 
                s = (double) i / RENDERING_INTERPOLATION_NB_PTS;
498
 
                
499
 
                s_pReferenceCurveS[i] = s;
500
 
                s_pReferenceCurveX[i] = xCurve (my_fCurveCurvature, s);
501
 
                s_pReferenceCurveY[i] = yCurve (s);
502
 
        }
503
 
}
504
 
 
505
 
double cd_rendering_interpol_curve_parameter (double x)
506
 
{
507
 
        return cd_rendering_interpol (x, s_pReferenceCurveX, s_pReferenceCurveS);
508
 
}
509
 
 
510
 
double cd_rendering_interpol_curve_height (double x)
511
 
{
512
 
        return cd_rendering_interpol (x, s_pReferenceCurveX, s_pReferenceCurveY);
513
 
}
514
 
 
515
 
 
516
 
void cd_rendering_render_curve (cairo_t *pCairoContext, CairoDock *pDock)
 
513
static void cd_rendering_render_curve (cairo_t *pCairoContext, CairoDock *pDock)
517
514
{
518
515
        //\____________________ On definit la position du cadre.
519
516
        double fLineWidth = myBackground.iDockLineWidth;
569
566
        
570
567
        //\____________________ On dessine la ficelle qui les joint.
571
568
        if (myIcons.iStringLineWidth > 0)
572
 
                cairo_dock_draw_string (pCairoContext, pDock, myIcons.iStringLineWidth, FALSE, (my_iDrawSeparator3D == CD_FLAT_SEPARATOR || my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR));
 
569
                cairo_dock_draw_string (pCairoContext, pDock, myIcons.iStringLineWidth, FALSE, (my_iDrawSeparator3D == CAIRO_DOCK_FLAT_SEPARATOR || my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR));
573
570
        
574
571
        //\____________________ On dessine les icones et les etiquettes, en tenant compte de l'ordre pour dessiner celles en arriere-plan avant celles en avant-plan.
575
572
        GList *pFirstDrawnElement = cairo_dock_get_first_drawn_element_linear (pDock->icons);
580
577
        Icon *icon;
581
578
        GList *ic = pFirstDrawnElement;
582
579
        
583
 
        if (my_iDrawSeparator3D == CD_FLAT_SEPARATOR || my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR)
 
580
        if (my_iDrawSeparator3D == CAIRO_DOCK_FLAT_SEPARATOR || my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR)
584
581
        {
585
582
                cairo_set_line_cap (pCairoContext, CAIRO_LINE_CAP_BUTT);
586
583
                do
611
608
                        ic = cairo_dock_get_next_element (ic, pDock->icons);
612
609
                } while (ic != pFirstDrawnElement);
613
610
                
614
 
                if (my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR)
 
611
                if (my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR)
615
612
                {
616
613
                        do
617
614
                        {
739
736
        return (fXLeft <= fXMax && floor (fXRight) > fXMin);
740
737
}
741
738
 
742
 
void cd_rendering_render_optimized_curve (cairo_t *pCairoContext, CairoDock *pDock, GdkRectangle *pArea)
 
739
static void cd_rendering_render_optimized_curve (cairo_t *pCairoContext, CairoDock *pDock, GdkRectangle *pArea)
743
740
{
744
741
        //\____________________ On trace le cadre.
745
742
        double fLineWidth = myBackground.iDockLineWidth;
893
890
                Icon *icon;
894
891
                GList *ic = pFirstDrawnElement;
895
892
                
896
 
                if (my_iDrawSeparator3D == CD_FLAT_SEPARATOR || my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR)
 
893
                if (my_iDrawSeparator3D == CAIRO_DOCK_FLAT_SEPARATOR || my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR)
897
894
                {
898
895
                        cairo_set_line_cap (pCairoContext, CAIRO_LINE_CAP_BUTT);
899
896
                        do
902
899
                                
903
900
                                if (CAIRO_DOCK_IS_SEPARATOR (icon) && icon->cFileName == NULL)
904
901
                                {
905
 
                                        if (_cd_separator_is_impacted (icon, pDock, fXMin, fXMax, TRUE, (my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR)))
 
902
                                        if (_cd_separator_is_impacted (icon, pDock, fXMin, fXMax, TRUE, (my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR)))
906
903
                                        {
907
904
                                                cairo_save (pCairoContext);
908
905
                                                cd_rendering_draw_3D_curve_separator (icon, pCairoContext, pDock, pDock->container.bIsHorizontal, TRUE);
938
935
                                ic = cairo_dock_get_next_element (ic, pDock->icons);
939
936
                        } while (ic != pFirstDrawnElement);
940
937
                        
941
 
                        if (my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR)
 
938
                        if (my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR)
942
939
                        {
943
940
                                do
944
941
                                {
946
943
                                        
947
944
                                        if (CAIRO_DOCK_IS_SEPARATOR (icon) && icon->cFileName == NULL)
948
945
                                        {
949
 
                                                if (_cd_separator_is_impacted (icon, pDock, fXMin, fXMax, FALSE, (my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR)))
 
946
                                                if (_cd_separator_is_impacted (icon, pDock, fXMin, fXMax, FALSE, (my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR)))
950
947
                                                {
951
948
                                                        cairo_save (pCairoContext);
952
949
                                                        cd_rendering_draw_3D_curve_separator (icon, pCairoContext, pDock, pDock->container.bIsHorizontal, FALSE);
1071
1068
#define DELTA_ROUND_DEGREE 1
1072
1069
#define RADIAN (G_PI / 180.0)  // Conversion Radian/Degres
1073
1070
#define P(t,p,q,r,s) (1-t) * (1-t) * (1-t) * p + 3 * t * (1-t) * (1 - t) * q + 3 * t * t * (1-t) * r + t * t * t * s
1074
 
GLfloat *cairo_dock_generate_curve_path (double fRelativeControlHeight, int *iNbPoints)
 
1071
const CairoDockGLPath *cairo_dock_generate_curve_path (double fRelativeControlHeight)
1075
1072
{
1076
 
        //static GLfloat pVertexTab[((180/DELTA_ROUND_DEGREE+1)+1)*3];
 
1073
        static CairoDockGLPath *pPath = NULL;
 
1074
        
 
1075
        double w = 1. / 2;
 
1076
        double h = 1. / 2;
 
1077
        double xp = -w, xq = - my_fCurveCurvature * w, xr = - xq, xs = - xp;
 
1078
        double yp = 0., yq = fRelativeControlHeight, yr = yq, ys = yp;
 
1079
        int iNbPoints = 180/DELTA_ROUND_DEGREE;
 
1080
        
 
1081
        if (pPath == NULL)
 
1082
                pPath = cairo_dock_new_gl_path (iNbPoints+1, xp, yp, 1., 1.);
 
1083
        else
 
1084
        {
 
1085
                cairo_dock_gl_path_move_to (pPath, xp, yp);
 
1086
        }
 
1087
        
 
1088
        cairo_dock_gl_path_curve_to (pPath, iNbPoints, xq, yq, xr, yr, xs, ys);
 
1089
        return pPath;
 
1090
        /** //static GLfloat pVertexTab[((180/DELTA_ROUND_DEGREE+1)+1)*3];
1077
1091
        _cairo_dock_define_static_vertex_tab ((180/DELTA_ROUND_DEGREE+1)+1);
1078
 
        /*0, 0
 
1092
        0, 0
1079
1093
        (1 - my_fCurveCurvature) * fFrameWidth / 2, -sens * fControlHeight,
1080
1094
        (1 + my_fCurveCurvature) * fFrameWidth / 2, -sens * fControlHeight,
1081
 
        fFrameWidth, 0*/
 
1095
        fFrameWidth, 0
1082
1096
        double w = 1. / 2;
1083
1097
        double h = 1. / 2;
1084
1098
        double xp = -w, xq = - my_fCurveCurvature * w, xr = - xq, xs = - xp;
1102
1116
        //vy(i) = vy(0);
1103
1117
        
1104
1118
        *iNbPoints = i+1;
1105
 
        _cairo_dock_return_vertex_tab ();
 
1119
        _cairo_dock_return_vertex_tab ();*/
1106
1120
}
1107
1121
 
1108
 
void cd_rendering_render_curve_opengl (CairoDock *pDock)
 
1122
 
 
1123
 
 
1124
static void cd_rendering_render_curve_opengl (CairoDock *pDock)
1109
1125
{
1110
1126
        //\____________________ On definit la position du cadre.
1111
1127
        double fLineWidth = myBackground.iDockLineWidth;
1115
1131
        w = cairo_dock_get_current_dock_width_linear (pDock) - 2 * myBackground.iFrameMargin;
1116
1132
        dw = w * xi / (1 - 2 * xi);
1117
1133
        
1118
 
        int sens;
1119
1134
        double dx, dy;  // position de la pointe gauche.
1120
1135
        if (cairo_dock_is_extended_dock (pDock))  // mode panel etendu.
1121
1136
        {
1128
1143
                Icon *pFirstIcon = cairo_dock_get_first_drawn_icon (pDock);
1129
1144
                dx = (pFirstIcon != NULL ? pFirstIcon->fDrawX - dw : fLineWidth / 2);
1130
1145
        }
1131
 
        if (! pDock->container.bIsHorizontal)
1132
 
                dx = pDock->container.iWidth - dx + 0;
1133
1146
        
1134
 
        if ((pDock->container.bIsHorizontal && ! pDock->container.bDirectionUp) || (! pDock->container.bIsHorizontal && pDock->container.bDirectionUp))
1135
 
                dy = pDock->container.iHeight - .5 * fLineWidth;
1136
 
        else
1137
 
                dy = pDock->iDecorationsHeight + 1.5 * fLineWidth;
 
1147
        dy = pDock->iDecorationsHeight + 1.5 * fLineWidth;
1138
1148
        double fFrameHeight = pDock->iDecorationsHeight + fLineWidth;
1139
1149
        
1140
 
        //\____________________ On genere le cadre.
1141
 
        int iNbVertex;
1142
 
        GLfloat *pVertexTab = cairo_dock_generate_curve_path (4./3, &iNbVertex);
 
1150
        //\_____________ On genere les coordonnees du contour.
 
1151
        const CairoDockGLPath *pFramePath = cairo_dock_generate_curve_path (4./3);
1143
1152
        
1144
1153
        //\________________ On met en place le clipping.
1145
1154
        glDisable (GL_DEPTH_TEST);
1149
1158
        glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE);  // on remplace tout ce qui est dedans.
1150
1159
        glColorMask (FALSE, FALSE, FALSE, FALSE);  // desactive l'ecriture dans toutes les composantes du Tampon Chromatique.
1151
1160
        
1152
 
        double fEpsilon = (my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR ? 2. : 0);  // erreur d'arrondi quand tu nous tiens.
 
1161
        //\_____________ On remplit avec le fond.
 
1162
        double fEpsilon = (my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR ? 2. : 0);  // erreur d'arrondi quand tu nous tiens.
1153
1163
        glPushMatrix ();
1154
 
        cairo_dock_draw_frame_background_opengl (0,
 
1164
        cairo_dock_set_container_orientation_opengl (CAIRO_CONTAINER (pDock));
 
1165
        glTranslatef (dx + (w+2*dw)/2,
 
1166
                fLineWidth/2,
 
1167
                0.);
 
1168
        glScalef (w + 2 * dw, fFrameHeight + fLineWidth + fEpsilon, 1.);
 
1169
        cairo_dock_fill_gl_path (pFramePath, 0);
 
1170
        
 
1171
        /*cairo_dock_draw_frame_background_opengl (0,
1155
1172
                w + 2 * dw, fFrameHeight + fLineWidth + fEpsilon,
1156
1173
                dx, dy + (fLineWidth+fEpsilon)/2,
1157
1174
                pVertexTab, iNbVertex,
1158
 
                pDock->container.bIsHorizontal, pDock->container.bDirectionUp, pDock->fDecorationsOffsetX);  // le cadre est trace au milieu de la ligne, donc on augmente de l la hauteur (et donc de l/2 pixels la hauteur du cadre, car [-.5, .5]), et pour compenser on se translate de l/2.
 
1175
                pDock->container.bIsHorizontal, pDock->container.bDirectionUp, pDock->fDecorationsOffsetX);  // le cadre est trace au milieu de la ligne, donc on augmente de l la hauteur (et donc de l/2 pixels la hauteur du cadre, car [-.5, .5]), et pour compenser on se translate de l/2.*/
1159
1176
        glPopMatrix ();
1160
1177
        
1161
1178
        glColorMask (TRUE, TRUE, TRUE, TRUE);
1165
1182
        
1166
1183
        //\____________________ On dessine les decorations dedans.
1167
1184
        glPushMatrix ();
1168
 
        cairo_dock_draw_frame_background_opengl (g_pDockBackgroundBuffer.iTexture,
 
1185
        cairo_dock_set_container_orientation_opengl (CAIRO_CONTAINER (pDock));
 
1186
        glTranslatef (dx + (w+2*dw)/2,
 
1187
                fLineWidth/2,
 
1188
                0.);
 
1189
        glScalef (w + 2 * dw, fFrameHeight, 1.);
 
1190
        cairo_dock_fill_gl_path (pFramePath, pDock->backgroundBuffer.iTexture);
 
1191
        /*cairo_dock_draw_frame_background_opengl (pDock->backgroundBuffer.iTexture,
1169
1192
                w + 2 * dw, fFrameHeight,
1170
1193
                dx, dy,
1171
1194
                pVertexTab, iNbVertex,
1172
 
                pDock->container.bIsHorizontal, pDock->container.bDirectionUp, pDock->fDecorationsOffsetX);
 
1195
                pDock->container.bIsHorizontal, pDock->container.bDirectionUp, pDock->fDecorationsOffsetX);*/
1173
1196
        
1174
1197
        //\____________________ On dessine le cadre.
1175
1198
        if (fLineWidth > 0)
1176
 
                cairo_dock_draw_current_path_opengl (fLineWidth, myBackground.fLineColor, iNbVertex);
1177
 
        
 
1199
        {
 
1200
                glLineWidth (fLineWidth);
 
1201
                glColor4f (myBackground.fLineColor[0], myBackground.fLineColor[1], myBackground.fLineColor[2], myBackground.fLineColor[3]);
 
1202
                _cairo_dock_set_blend_alpha ();
 
1203
                cairo_dock_stroke_gl_path (pFramePath, TRUE);
 
1204
        }
1178
1205
        glPopMatrix ();
1179
1206
        
1180
1207
        //\____________________ On dessine la ficelle qui les joint.
1181
1208
        if (myIcons.iStringLineWidth > 0)
1182
 
                cairo_dock_draw_string_opengl (pDock, myIcons.iStringLineWidth, FALSE, (my_iDrawSeparator3D == CD_FLAT_SEPARATOR || my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR));
 
1209
                cairo_dock_draw_string_opengl (pDock, myIcons.iStringLineWidth, FALSE, (my_iDrawSeparator3D == CAIRO_DOCK_FLAT_SEPARATOR || my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR));
1183
1210
        
1184
1211
        //\____________________ On dessine les icones et les etiquettes, en tenant compte de l'ordre pour dessiner celles en arriere-plan avant celles en avant-plan.
1185
1212
        GList *pFirstDrawnElement = cairo_dock_get_first_drawn_element_linear (pDock->icons);
1190
1217
        Icon *icon;
1191
1218
        GList *ic = pFirstDrawnElement;
1192
1219
        
1193
 
        if (my_iDrawSeparator3D == CD_FLAT_SEPARATOR || my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR)
 
1220
        if (my_iDrawSeparator3D == CAIRO_DOCK_FLAT_SEPARATOR || my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR)
1194
1221
        {
1195
1222
                do
1196
1223
                {
1203
1230
                                glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP);
1204
1231
                                
1205
1232
                                glPushMatrix ();
1206
 
                                if (my_iDrawSeparator3D == CD_FLAT_SEPARATOR)
 
1233
                                if (my_iDrawSeparator3D == CAIRO_DOCK_FLAT_SEPARATOR)
1207
1234
                                        cd_rendering_draw_flat_separator_opengl (icon, pDock);
1208
1235
                                else
1209
1236
                                        cd_rendering_draw_physical_separator_opengl (icon, pDock, TRUE, (ic->prev ? ic->prev->data : NULL), (ic->next ? ic->next->data : NULL));
1229
1256
                        ic = cairo_dock_get_next_element (ic, pDock->icons);
1230
1257
                } while (ic != pFirstDrawnElement);
1231
1258
                
1232
 
                if (my_iDrawSeparator3D == CD_PHYSICAL_SEPARATOR)
 
1259
                if (my_iDrawSeparator3D == CAIRO_DOCK_PHYSICAL_SEPARATOR)
1233
1260
                {
1234
1261
                        do
1235
1262
                        {