From 002c3c1a7c2ae7229afac3f1966892fd42895aec Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 24 Mar 2022 18:09:28 +0000 Subject: Bitmap API: Clean up creation flags. --- include/netsurf/bitmap.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'include/netsurf') diff --git a/include/netsurf/bitmap.h b/include/netsurf/bitmap.h index db207cf58..dfd11880d 100644 --- a/include/netsurf/bitmap.h +++ b/include/netsurf/bitmap.h @@ -54,9 +54,12 @@ #ifndef _NETSURF_BITMAP_H_ #define _NETSURF_BITMAP_H_ -#define BITMAP_NEW 0 -#define BITMAP_OPAQUE (1 << 0) /**< image is opaque */ -#define BITMAP_CLEAR_MEMORY (1 << 2) /**< memory should be wiped */ +/** Bitmap creation flags. */ +enum gui_bitmap_flags { + BITMAP_NONE = 0, + BITMAP_OPAQUE = (1 << 0), /**< image is opaque */ + BITMAP_CLEAR = (1 << 1), /**< memory should be wiped to 0 */ +}; struct content; struct bitmap; @@ -71,12 +74,12 @@ struct gui_bitmap_table { /** * Create a new bitmap. * - * \param width width of image in pixels - * \param height width of image in pixels - * \param state The state to create the bitmap in. + * \param width width of image in pixels + * \param height height of image in pixels + * \param flags flags for bitmap creation * \return A bitmap structure or NULL on error. */ - void *(*create)(int width, int height, unsigned int state); + void *(*create)(int width, int height, enum gui_bitmap_flags flags); /** * Destroy a bitmap. -- cgit v1.2.3