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

@@ -39,7 +39,7 @@ static RImage *renderMHGradient(unsigned width, unsigned height, RColor ** color
static RImage *renderMVGradient(unsigned width, unsigned height, RColor ** colors, int count);
static RImage *renderMDGradient(unsigned width, unsigned height, RColor ** colors, int count);
RImage *RRenderMultiGradient(unsigned width, unsigned height, RColor ** colors, int style)
RImage *RRenderMultiGradient(unsigned width, unsigned height, RColor **colors, RGradientStyle style)
{
int count;
@@ -65,7 +65,7 @@ RImage *RRenderMultiGradient(unsigned width, unsigned height, RColor ** colors,
return NULL;
}
RImage *RRenderGradient(unsigned width, unsigned height, const RColor * from, const RColor * to, int style)
RImage *RRenderGradient(unsigned width, unsigned height, const RColor *from, const RColor *to, RGradientStyle style)
{
switch (style) {
case RHorizontalGradient: