1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

wrlib: add explicit type definition in API to allow compiler Type Checks (3/3)

When defining enums as types instead of simple enums allows to use these
types at the places where the corresponding enum values are expected, then
allowing the compiler to check that, potentially reporting incorrect use
of values to the user.

This patch adds the type for the gradient style for RRender*Gradient.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-06-14 19:34:09 +02:00
committed by Carlos R. Mafra
parent bc4084e679
commit a772f2797d
4 changed files with 12 additions and 12 deletions

View File

@@ -326,7 +326,7 @@ static BackgroundTexture *parseTexture(RContext * rc, char *text)
RColor color1, color2;
RImage *image;
Pixmap pixmap;
int gtype;
RGradientStyle gtype;
int iwidth, iheight;
GETSTRORGOTO(val, tmp, 1, error);
@@ -396,7 +396,7 @@ static BackgroundTexture *parseTexture(RContext * rc, char *text)
RImage *image;
Pixmap pixmap;
int i, j;
int gtype;
RGradientStyle gtype;
int iwidth, iheight;
colors = malloc(sizeof(RColor *) * (count - 1));
@@ -587,7 +587,7 @@ static BackgroundTexture *parseTexture(RContext * rc, char *text)
Pixmap pixmap;
int opaq;
char *file;
int gtype;
RGradientStyle gtype;
int twidth, theight;
GETSTRORGOTO(val, file, 1, error);