1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 13:28:05 +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

@@ -254,11 +254,11 @@ enum {
/* 2 pixel width */
#define RBEV_RAISED3 3
enum {
typedef enum {
RHorizontalGradient = 2,
RVerticalGradient = 3,
RDiagonalGradient = 4
};
} RGradientStyle;
/* for backwards compatibility */
#define RGRD_HORIZONTAL RHorizontalGradient
#define RGRD_VERTICAL RVerticalGradient
@@ -426,11 +426,11 @@ void RFillImage(RImage *image, const RColor *color);
void RBevelImage(RImage *image, int bevel_type);
RImage *RRenderGradient(unsigned width, unsigned height, const RColor *from,
const RColor *to, int style);
const RColor *to, RGradientStyle style);
RImage *RRenderMultiGradient(unsigned width, unsigned height, RColor **colors,
int style);
RGradientStyle style);
RImage *RRenderInterwovenGradient(unsigned width, unsigned height,